##// END OF EJS Templates
test: test "trouble: " line in log output with multiple troubles...
Denis Laxalde -
r30711:c03627d8 default
parent child Browse files
Show More
@@ -1,1219 +1,1231
1 $ cat >> $HGRCPATH << EOF
1 $ cat >> $HGRCPATH << EOF
2 > [phases]
2 > [phases]
3 > # public changeset are not obsolete
3 > # public changeset are not obsolete
4 > publish=false
4 > publish=false
5 > [ui]
5 > [ui]
6 > logtemplate="{rev}:{node|short} ({phase}) [{tags} {bookmarks}] {desc|firstline}\n"
6 > logtemplate="{rev}:{node|short} ({phase}) [{tags} {bookmarks}] {desc|firstline}\n"
7 > EOF
7 > EOF
8 $ mkcommit() {
8 $ mkcommit() {
9 > echo "$1" > "$1"
9 > echo "$1" > "$1"
10 > hg add "$1"
10 > hg add "$1"
11 > hg ci -m "add $1"
11 > hg ci -m "add $1"
12 > }
12 > }
13 $ getid() {
13 $ getid() {
14 > hg log -T "{node}\n" --hidden -r "desc('$1')"
14 > hg log -T "{node}\n" --hidden -r "desc('$1')"
15 > }
15 > }
16
16
17 $ cat > debugkeys.py <<EOF
17 $ cat > debugkeys.py <<EOF
18 > def reposetup(ui, repo):
18 > def reposetup(ui, repo):
19 > class debugkeysrepo(repo.__class__):
19 > class debugkeysrepo(repo.__class__):
20 > def listkeys(self, namespace):
20 > def listkeys(self, namespace):
21 > ui.write('listkeys %s\n' % (namespace,))
21 > ui.write('listkeys %s\n' % (namespace,))
22 > return super(debugkeysrepo, self).listkeys(namespace)
22 > return super(debugkeysrepo, self).listkeys(namespace)
23 >
23 >
24 > if repo.local():
24 > if repo.local():
25 > repo.__class__ = debugkeysrepo
25 > repo.__class__ = debugkeysrepo
26 > EOF
26 > EOF
27
27
28 $ hg init tmpa
28 $ hg init tmpa
29 $ cd tmpa
29 $ cd tmpa
30 $ mkcommit kill_me
30 $ mkcommit kill_me
31
31
32 Checking that the feature is properly disabled
32 Checking that the feature is properly disabled
33
33
34 $ hg debugobsolete -d '0 0' `getid kill_me` -u babar
34 $ hg debugobsolete -d '0 0' `getid kill_me` -u babar
35 abort: creating obsolete markers is not enabled on this repo
35 abort: creating obsolete markers is not enabled on this repo
36 [255]
36 [255]
37
37
38 Enabling it
38 Enabling it
39
39
40 $ cat >> $HGRCPATH << EOF
40 $ cat >> $HGRCPATH << EOF
41 > [experimental]
41 > [experimental]
42 > evolution=createmarkers,exchange
42 > evolution=createmarkers,exchange
43 > EOF
43 > EOF
44
44
45 Killing a single changeset without replacement
45 Killing a single changeset without replacement
46
46
47 $ hg debugobsolete 0
47 $ hg debugobsolete 0
48 abort: changeset references must be full hexadecimal node identifiers
48 abort: changeset references must be full hexadecimal node identifiers
49 [255]
49 [255]
50 $ hg debugobsolete '00'
50 $ hg debugobsolete '00'
51 abort: changeset references must be full hexadecimal node identifiers
51 abort: changeset references must be full hexadecimal node identifiers
52 [255]
52 [255]
53 $ hg debugobsolete -d '0 0' `getid kill_me` -u babar
53 $ hg debugobsolete -d '0 0' `getid kill_me` -u babar
54 $ hg debugobsolete
54 $ hg debugobsolete
55 97b7c2d76b1845ed3eb988cd612611e72406cef0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'babar'}
55 97b7c2d76b1845ed3eb988cd612611e72406cef0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'babar'}
56
56
57 (test that mercurial is not confused)
57 (test that mercurial is not confused)
58
58
59 $ hg up null --quiet # having 0 as parent prevents it to be hidden
59 $ hg up null --quiet # having 0 as parent prevents it to be hidden
60 $ hg tip
60 $ hg tip
61 -1:000000000000 (public) [tip ]
61 -1:000000000000 (public) [tip ]
62 $ hg up --hidden tip --quiet
62 $ hg up --hidden tip --quiet
63
63
64 Killing a single changeset with itself should fail
64 Killing a single changeset with itself should fail
65 (simple local safeguard)
65 (simple local safeguard)
66
66
67 $ hg debugobsolete `getid kill_me` `getid kill_me`
67 $ hg debugobsolete `getid kill_me` `getid kill_me`
68 abort: bad obsmarker input: in-marker cycle with 97b7c2d76b1845ed3eb988cd612611e72406cef0
68 abort: bad obsmarker input: in-marker cycle with 97b7c2d76b1845ed3eb988cd612611e72406cef0
69 [255]
69 [255]
70
70
71 $ cd ..
71 $ cd ..
72
72
73 Killing a single changeset with replacement
73 Killing a single changeset with replacement
74 (and testing the format option)
74 (and testing the format option)
75
75
76 $ hg init tmpb
76 $ hg init tmpb
77 $ cd tmpb
77 $ cd tmpb
78 $ mkcommit a
78 $ mkcommit a
79 $ mkcommit b
79 $ mkcommit b
80 $ mkcommit original_c
80 $ mkcommit original_c
81 $ hg up "desc('b')"
81 $ hg up "desc('b')"
82 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
82 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
83 $ mkcommit new_c
83 $ mkcommit new_c
84 created new head
84 created new head
85 $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden
85 $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden
86 $ hg debugobsolete --config format.obsstore-version=0 --flag 12 `getid original_c` `getid new_c` -d '121 120'
86 $ hg debugobsolete --config format.obsstore-version=0 --flag 12 `getid original_c` `getid new_c` -d '121 120'
87 $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden
87 $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden
88 2:245bde4270cd add original_c
88 2:245bde4270cd add original_c
89 $ hg debugrevlog -cd
89 $ hg debugrevlog -cd
90 # rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen
90 # rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen
91 0 -1 -1 0 59 0 0 0 0 58 58 0 1 0
91 0 -1 -1 0 59 0 0 0 0 58 58 0 1 0
92 1 0 -1 59 118 59 59 0 0 58 116 0 1 0
92 1 0 -1 59 118 59 59 0 0 58 116 0 1 0
93 2 1 -1 118 193 118 118 59 0 76 192 0 1 0
93 2 1 -1 118 193 118 118 59 0 76 192 0 1 0
94 3 1 -1 193 260 193 193 59 0 66 258 0 2 0
94 3 1 -1 193 260 193 193 59 0 66 258 0 2 0
95 $ hg debugobsolete
95 $ hg debugobsolete
96 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
96 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
97
97
98 (check for version number of the obsstore)
98 (check for version number of the obsstore)
99
99
100 $ dd bs=1 count=1 if=.hg/store/obsstore 2>/dev/null
100 $ dd bs=1 count=1 if=.hg/store/obsstore 2>/dev/null
101 \x00 (no-eol) (esc)
101 \x00 (no-eol) (esc)
102
102
103 do it again (it read the obsstore before adding new changeset)
103 do it again (it read the obsstore before adding new changeset)
104
104
105 $ hg up '.^'
105 $ hg up '.^'
106 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
106 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
107 $ mkcommit new_2_c
107 $ mkcommit new_2_c
108 created new head
108 created new head
109 $ hg debugobsolete -d '1337 0' `getid new_c` `getid new_2_c`
109 $ hg debugobsolete -d '1337 0' `getid new_c` `getid new_2_c`
110 $ hg debugobsolete
110 $ hg debugobsolete
111 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
111 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
112 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
112 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
113
113
114 Register two markers with a missing node
114 Register two markers with a missing node
115
115
116 $ hg up '.^'
116 $ hg up '.^'
117 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
117 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
118 $ mkcommit new_3_c
118 $ mkcommit new_3_c
119 created new head
119 created new head
120 $ hg debugobsolete -d '1338 0' `getid new_2_c` 1337133713371337133713371337133713371337
120 $ hg debugobsolete -d '1338 0' `getid new_2_c` 1337133713371337133713371337133713371337
121 $ hg debugobsolete -d '1339 0' 1337133713371337133713371337133713371337 `getid new_3_c`
121 $ hg debugobsolete -d '1339 0' 1337133713371337133713371337133713371337 `getid new_3_c`
122 $ hg debugobsolete
122 $ hg debugobsolete
123 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
123 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
124 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
124 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
125 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
125 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
126 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
126 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
127
127
128 Test the --index option of debugobsolete command
128 Test the --index option of debugobsolete command
129 $ hg debugobsolete --index
129 $ hg debugobsolete --index
130 0 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
130 0 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
131 1 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
131 1 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
132 2 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
132 2 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
133 3 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
133 3 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
134
134
135 Refuse pathological nullid successors
135 Refuse pathological nullid successors
136 $ hg debugobsolete -d '9001 0' 1337133713371337133713371337133713371337 0000000000000000000000000000000000000000
136 $ hg debugobsolete -d '9001 0' 1337133713371337133713371337133713371337 0000000000000000000000000000000000000000
137 transaction abort!
137 transaction abort!
138 rollback completed
138 rollback completed
139 abort: bad obsolescence marker detected: invalid successors nullid
139 abort: bad obsolescence marker detected: invalid successors nullid
140 [255]
140 [255]
141
141
142 Check that graphlog detect that a changeset is obsolete:
142 Check that graphlog detect that a changeset is obsolete:
143
143
144 $ hg log -G
144 $ hg log -G
145 @ 5:5601fb93a350 (draft) [tip ] add new_3_c
145 @ 5:5601fb93a350 (draft) [tip ] add new_3_c
146 |
146 |
147 o 1:7c3bad9141dc (draft) [ ] add b
147 o 1:7c3bad9141dc (draft) [ ] add b
148 |
148 |
149 o 0:1f0dee641bb7 (draft) [ ] add a
149 o 0:1f0dee641bb7 (draft) [ ] add a
150
150
151
151
152 check that heads does not report them
152 check that heads does not report them
153
153
154 $ hg heads
154 $ hg heads
155 5:5601fb93a350 (draft) [tip ] add new_3_c
155 5:5601fb93a350 (draft) [tip ] add new_3_c
156 $ hg heads --hidden
156 $ hg heads --hidden
157 5:5601fb93a350 (draft) [tip ] add new_3_c
157 5:5601fb93a350 (draft) [tip ] add new_3_c
158 4:ca819180edb9 (draft) [ ] add new_2_c
158 4:ca819180edb9 (draft) [ ] add new_2_c
159 3:cdbce2fbb163 (draft) [ ] add new_c
159 3:cdbce2fbb163 (draft) [ ] add new_c
160 2:245bde4270cd (draft) [ ] add original_c
160 2:245bde4270cd (draft) [ ] add original_c
161
161
162
162
163 check that summary does not report them
163 check that summary does not report them
164
164
165 $ hg init ../sink
165 $ hg init ../sink
166 $ echo '[paths]' >> .hg/hgrc
166 $ echo '[paths]' >> .hg/hgrc
167 $ echo 'default=../sink' >> .hg/hgrc
167 $ echo 'default=../sink' >> .hg/hgrc
168 $ hg summary --remote
168 $ hg summary --remote
169 parent: 5:5601fb93a350 tip
169 parent: 5:5601fb93a350 tip
170 add new_3_c
170 add new_3_c
171 branch: default
171 branch: default
172 commit: (clean)
172 commit: (clean)
173 update: (current)
173 update: (current)
174 phases: 3 draft
174 phases: 3 draft
175 remote: 3 outgoing
175 remote: 3 outgoing
176
176
177 $ hg summary --remote --hidden
177 $ hg summary --remote --hidden
178 parent: 5:5601fb93a350 tip
178 parent: 5:5601fb93a350 tip
179 add new_3_c
179 add new_3_c
180 branch: default
180 branch: default
181 commit: (clean)
181 commit: (clean)
182 update: 3 new changesets, 4 branch heads (merge)
182 update: 3 new changesets, 4 branch heads (merge)
183 phases: 6 draft
183 phases: 6 draft
184 remote: 3 outgoing
184 remote: 3 outgoing
185
185
186 check that various commands work well with filtering
186 check that various commands work well with filtering
187
187
188 $ hg tip
188 $ hg tip
189 5:5601fb93a350 (draft) [tip ] add new_3_c
189 5:5601fb93a350 (draft) [tip ] add new_3_c
190 $ hg log -r 6
190 $ hg log -r 6
191 abort: unknown revision '6'!
191 abort: unknown revision '6'!
192 [255]
192 [255]
193 $ hg log -r 4
193 $ hg log -r 4
194 abort: hidden revision '4'!
194 abort: hidden revision '4'!
195 (use --hidden to access hidden revisions)
195 (use --hidden to access hidden revisions)
196 [255]
196 [255]
197 $ hg debugrevspec 'rev(6)'
197 $ hg debugrevspec 'rev(6)'
198 $ hg debugrevspec 'rev(4)'
198 $ hg debugrevspec 'rev(4)'
199 $ hg debugrevspec 'null'
199 $ hg debugrevspec 'null'
200 -1
200 -1
201
201
202 Check that public changeset are not accounted as obsolete:
202 Check that public changeset are not accounted as obsolete:
203
203
204 $ hg --hidden phase --public 2
204 $ hg --hidden phase --public 2
205 $ hg log -G
205 $ hg log -G
206 @ 5:5601fb93a350 (draft) [tip ] add new_3_c
206 @ 5:5601fb93a350 (draft) [tip ] add new_3_c
207 |
207 |
208 | o 2:245bde4270cd (public) [ ] add original_c
208 | o 2:245bde4270cd (public) [ ] add original_c
209 |/
209 |/
210 o 1:7c3bad9141dc (public) [ ] add b
210 o 1:7c3bad9141dc (public) [ ] add b
211 |
211 |
212 o 0:1f0dee641bb7 (public) [ ] add a
212 o 0:1f0dee641bb7 (public) [ ] add a
213
213
214
214
215 And that bumped changeset are detected
215 And that bumped changeset are detected
216 --------------------------------------
216 --------------------------------------
217
217
218 If we didn't filtered obsolete changesets out, 3 and 4 would show up too. Also
218 If we didn't filtered obsolete changesets out, 3 and 4 would show up too. Also
219 note that the bumped changeset (5:5601fb93a350) is not a direct successor of
219 note that the bumped changeset (5:5601fb93a350) is not a direct successor of
220 the public changeset
220 the public changeset
221
221
222 $ hg log --hidden -r 'bumped()'
222 $ hg log --hidden -r 'bumped()'
223 5:5601fb93a350 (draft) [tip ] add new_3_c
223 5:5601fb93a350 (draft) [tip ] add new_3_c
224
224
225 And that we can't push bumped changeset
225 And that we can't push bumped changeset
226
226
227 $ hg push ../tmpa -r 0 --force #(make repo related)
227 $ hg push ../tmpa -r 0 --force #(make repo related)
228 pushing to ../tmpa
228 pushing to ../tmpa
229 searching for changes
229 searching for changes
230 warning: repository is unrelated
230 warning: repository is unrelated
231 adding changesets
231 adding changesets
232 adding manifests
232 adding manifests
233 adding file changes
233 adding file changes
234 added 1 changesets with 1 changes to 1 files (+1 heads)
234 added 1 changesets with 1 changes to 1 files (+1 heads)
235 $ hg push ../tmpa
235 $ hg push ../tmpa
236 pushing to ../tmpa
236 pushing to ../tmpa
237 searching for changes
237 searching for changes
238 abort: push includes bumped changeset: 5601fb93a350!
238 abort: push includes bumped changeset: 5601fb93a350!
239 [255]
239 [255]
240
240
241 Fixing "bumped" situation
241 Fixing "bumped" situation
242 We need to create a clone of 5 and add a special marker with a flag
242 We need to create a clone of 5 and add a special marker with a flag
243
243
244 $ hg summary
244 $ hg summary
245 parent: 5:5601fb93a350 tip
245 parent: 5:5601fb93a350 tip
246 add new_3_c
246 add new_3_c
247 branch: default
247 branch: default
248 commit: (clean)
248 commit: (clean)
249 update: 1 new changesets, 2 branch heads (merge)
249 update: 1 new changesets, 2 branch heads (merge)
250 phases: 1 draft
250 phases: 1 draft
251 bumped: 1 changesets
251 bumped: 1 changesets
252 $ hg up '5^'
252 $ hg up '5^'
253 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
253 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
254 $ hg revert -ar 5
254 $ hg revert -ar 5
255 adding new_3_c
255 adding new_3_c
256 $ hg ci -m 'add n3w_3_c'
256 $ hg ci -m 'add n3w_3_c'
257 created new head
257 created new head
258 $ hg debugobsolete -d '1338 0' --flags 1 `getid new_3_c` `getid n3w_3_c`
258 $ hg debugobsolete -d '1338 0' --flags 1 `getid new_3_c` `getid n3w_3_c`
259 $ hg log -r 'bumped()'
259 $ hg log -r 'bumped()'
260 $ hg log -G
260 $ hg log -G
261 @ 6:6f9641995072 (draft) [tip ] add n3w_3_c
261 @ 6:6f9641995072 (draft) [tip ] add n3w_3_c
262 |
262 |
263 | o 2:245bde4270cd (public) [ ] add original_c
263 | o 2:245bde4270cd (public) [ ] add original_c
264 |/
264 |/
265 o 1:7c3bad9141dc (public) [ ] add b
265 o 1:7c3bad9141dc (public) [ ] add b
266 |
266 |
267 o 0:1f0dee641bb7 (public) [ ] add a
267 o 0:1f0dee641bb7 (public) [ ] add a
268
268
269
269
270 $ cd ..
270 $ cd ..
271
271
272 Revision 0 is hidden
272 Revision 0 is hidden
273 --------------------
273 --------------------
274
274
275 $ hg init rev0hidden
275 $ hg init rev0hidden
276 $ cd rev0hidden
276 $ cd rev0hidden
277
277
278 $ mkcommit kill0
278 $ mkcommit kill0
279 $ hg up -q null
279 $ hg up -q null
280 $ hg debugobsolete `getid kill0`
280 $ hg debugobsolete `getid kill0`
281 $ mkcommit a
281 $ mkcommit a
282 $ mkcommit b
282 $ mkcommit b
283
283
284 Should pick the first visible revision as "repo" node
284 Should pick the first visible revision as "repo" node
285
285
286 $ hg archive ../archive-null
286 $ hg archive ../archive-null
287 $ cat ../archive-null/.hg_archival.txt
287 $ cat ../archive-null/.hg_archival.txt
288 repo: 1f0dee641bb7258c56bd60e93edfa2405381c41e
288 repo: 1f0dee641bb7258c56bd60e93edfa2405381c41e
289 node: 7c3bad9141dcb46ff89abf5f61856facd56e476c
289 node: 7c3bad9141dcb46ff89abf5f61856facd56e476c
290 branch: default
290 branch: default
291 latesttag: null
291 latesttag: null
292 latesttagdistance: 2
292 latesttagdistance: 2
293 changessincelatesttag: 2
293 changessincelatesttag: 2
294
294
295
295
296 $ cd ..
296 $ cd ..
297
297
298 Exchange Test
298 Exchange Test
299 ============================
299 ============================
300
300
301 Destination repo does not have any data
301 Destination repo does not have any data
302 ---------------------------------------
302 ---------------------------------------
303
303
304 Simple incoming test
304 Simple incoming test
305
305
306 $ hg init tmpc
306 $ hg init tmpc
307 $ cd tmpc
307 $ cd tmpc
308 $ hg incoming ../tmpb
308 $ hg incoming ../tmpb
309 comparing with ../tmpb
309 comparing with ../tmpb
310 0:1f0dee641bb7 (public) [ ] add a
310 0:1f0dee641bb7 (public) [ ] add a
311 1:7c3bad9141dc (public) [ ] add b
311 1:7c3bad9141dc (public) [ ] add b
312 2:245bde4270cd (public) [ ] add original_c
312 2:245bde4270cd (public) [ ] add original_c
313 6:6f9641995072 (draft) [tip ] add n3w_3_c
313 6:6f9641995072 (draft) [tip ] add n3w_3_c
314
314
315 Try to pull markers
315 Try to pull markers
316 (extinct changeset are excluded but marker are pushed)
316 (extinct changeset are excluded but marker are pushed)
317
317
318 $ hg pull ../tmpb
318 $ hg pull ../tmpb
319 pulling from ../tmpb
319 pulling from ../tmpb
320 requesting all changes
320 requesting all changes
321 adding changesets
321 adding changesets
322 adding manifests
322 adding manifests
323 adding file changes
323 adding file changes
324 added 4 changesets with 4 changes to 4 files (+1 heads)
324 added 4 changesets with 4 changes to 4 files (+1 heads)
325 5 new obsolescence markers
325 5 new obsolescence markers
326 (run 'hg heads' to see heads, 'hg merge' to merge)
326 (run 'hg heads' to see heads, 'hg merge' to merge)
327 $ hg debugobsolete
327 $ hg debugobsolete
328 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
328 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
329 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
329 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
330 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
330 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
331 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
331 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
332 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
332 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
333
333
334 Rollback//Transaction support
334 Rollback//Transaction support
335
335
336 $ hg debugobsolete -d '1340 0' aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
336 $ hg debugobsolete -d '1340 0' aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
337 $ hg debugobsolete
337 $ hg debugobsolete
338 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
338 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
339 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
339 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
340 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
340 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
341 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
341 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
342 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
342 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
343 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:22:20 1970 +0000) {'user': 'test'}
343 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:22:20 1970 +0000) {'user': 'test'}
344 $ hg rollback -n
344 $ hg rollback -n
345 repository tip rolled back to revision 3 (undo debugobsolete)
345 repository tip rolled back to revision 3 (undo debugobsolete)
346 $ hg rollback
346 $ hg rollback
347 repository tip rolled back to revision 3 (undo debugobsolete)
347 repository tip rolled back to revision 3 (undo debugobsolete)
348 $ hg debugobsolete
348 $ hg debugobsolete
349 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
349 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
350 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
350 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
351 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
351 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
352 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
352 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
353 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
353 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
354
354
355 $ cd ..
355 $ cd ..
356
356
357 Try to push markers
357 Try to push markers
358
358
359 $ hg init tmpd
359 $ hg init tmpd
360 $ hg -R tmpb push tmpd
360 $ hg -R tmpb push tmpd
361 pushing to tmpd
361 pushing to tmpd
362 searching for changes
362 searching for changes
363 adding changesets
363 adding changesets
364 adding manifests
364 adding manifests
365 adding file changes
365 adding file changes
366 added 4 changesets with 4 changes to 4 files (+1 heads)
366 added 4 changesets with 4 changes to 4 files (+1 heads)
367 5 new obsolescence markers
367 5 new obsolescence markers
368 $ hg -R tmpd debugobsolete | sort
368 $ hg -R tmpd debugobsolete | sort
369 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
369 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
370 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
370 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
371 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
371 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
372 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
372 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
373 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
373 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
374
374
375 Check obsolete keys are exchanged only if source has an obsolete store
375 Check obsolete keys are exchanged only if source has an obsolete store
376
376
377 $ hg init empty
377 $ hg init empty
378 $ hg --config extensions.debugkeys=debugkeys.py -R empty push tmpd
378 $ hg --config extensions.debugkeys=debugkeys.py -R empty push tmpd
379 pushing to tmpd
379 pushing to tmpd
380 listkeys phases
380 listkeys phases
381 listkeys bookmarks
381 listkeys bookmarks
382 no changes found
382 no changes found
383 listkeys phases
383 listkeys phases
384 [1]
384 [1]
385
385
386 clone support
386 clone support
387 (markers are copied and extinct changesets are included to allow hardlinks)
387 (markers are copied and extinct changesets are included to allow hardlinks)
388
388
389 $ hg clone tmpb clone-dest
389 $ hg clone tmpb clone-dest
390 updating to branch default
390 updating to branch default
391 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
391 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
392 $ hg -R clone-dest log -G --hidden
392 $ hg -R clone-dest log -G --hidden
393 @ 6:6f9641995072 (draft) [tip ] add n3w_3_c
393 @ 6:6f9641995072 (draft) [tip ] add n3w_3_c
394 |
394 |
395 | x 5:5601fb93a350 (draft) [ ] add new_3_c
395 | x 5:5601fb93a350 (draft) [ ] add new_3_c
396 |/
396 |/
397 | x 4:ca819180edb9 (draft) [ ] add new_2_c
397 | x 4:ca819180edb9 (draft) [ ] add new_2_c
398 |/
398 |/
399 | x 3:cdbce2fbb163 (draft) [ ] add new_c
399 | x 3:cdbce2fbb163 (draft) [ ] add new_c
400 |/
400 |/
401 | o 2:245bde4270cd (public) [ ] add original_c
401 | o 2:245bde4270cd (public) [ ] add original_c
402 |/
402 |/
403 o 1:7c3bad9141dc (public) [ ] add b
403 o 1:7c3bad9141dc (public) [ ] add b
404 |
404 |
405 o 0:1f0dee641bb7 (public) [ ] add a
405 o 0:1f0dee641bb7 (public) [ ] add a
406
406
407 $ hg -R clone-dest debugobsolete
407 $ hg -R clone-dest debugobsolete
408 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
408 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
409 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
409 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
410 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
410 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
411 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
411 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
412 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
412 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
413
413
414
414
415 Destination repo have existing data
415 Destination repo have existing data
416 ---------------------------------------
416 ---------------------------------------
417
417
418 On pull
418 On pull
419
419
420 $ hg init tmpe
420 $ hg init tmpe
421 $ cd tmpe
421 $ cd tmpe
422 $ hg debugobsolete -d '1339 0' 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00
422 $ hg debugobsolete -d '1339 0' 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00
423 $ hg pull ../tmpb
423 $ hg pull ../tmpb
424 pulling from ../tmpb
424 pulling from ../tmpb
425 requesting all changes
425 requesting all changes
426 adding changesets
426 adding changesets
427 adding manifests
427 adding manifests
428 adding file changes
428 adding file changes
429 added 4 changesets with 4 changes to 4 files (+1 heads)
429 added 4 changesets with 4 changes to 4 files (+1 heads)
430 5 new obsolescence markers
430 5 new obsolescence markers
431 (run 'hg heads' to see heads, 'hg merge' to merge)
431 (run 'hg heads' to see heads, 'hg merge' to merge)
432 $ hg debugobsolete
432 $ hg debugobsolete
433 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
433 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
434 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
434 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
435 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
435 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
436 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
436 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
437 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
437 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
438 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
438 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
439
439
440
440
441 On push
441 On push
442
442
443 $ hg push ../tmpc
443 $ hg push ../tmpc
444 pushing to ../tmpc
444 pushing to ../tmpc
445 searching for changes
445 searching for changes
446 no changes found
446 no changes found
447 1 new obsolescence markers
447 1 new obsolescence markers
448 [1]
448 [1]
449 $ hg -R ../tmpc debugobsolete
449 $ hg -R ../tmpc debugobsolete
450 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
450 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
451 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
451 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
452 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
452 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
453 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
453 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
454 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
454 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
455 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
455 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
456
456
457 detect outgoing obsolete and unstable
457 detect outgoing obsolete and unstable
458 ---------------------------------------
458 ---------------------------------------
459
459
460
460
461 $ hg log -G
461 $ hg log -G
462 o 3:6f9641995072 (draft) [tip ] add n3w_3_c
462 o 3:6f9641995072 (draft) [tip ] add n3w_3_c
463 |
463 |
464 | o 2:245bde4270cd (public) [ ] add original_c
464 | o 2:245bde4270cd (public) [ ] add original_c
465 |/
465 |/
466 o 1:7c3bad9141dc (public) [ ] add b
466 o 1:7c3bad9141dc (public) [ ] add b
467 |
467 |
468 o 0:1f0dee641bb7 (public) [ ] add a
468 o 0:1f0dee641bb7 (public) [ ] add a
469
469
470 $ hg up 'desc("n3w_3_c")'
470 $ hg up 'desc("n3w_3_c")'
471 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
471 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
472 $ mkcommit original_d
472 $ mkcommit original_d
473 $ mkcommit original_e
473 $ mkcommit original_e
474 $ hg debugobsolete --record-parents `getid original_d` -d '0 0'
474 $ hg debugobsolete --record-parents `getid original_d` -d '0 0'
475 $ hg debugobsolete | grep `getid original_d`
475 $ hg debugobsolete | grep `getid original_d`
476 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
476 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
477 $ hg log -r 'obsolete()'
477 $ hg log -r 'obsolete()'
478 4:94b33453f93b (draft) [ ] add original_d
478 4:94b33453f93b (draft) [ ] add original_d
479 $ hg summary
479 $ hg summary
480 parent: 5:cda648ca50f5 tip
480 parent: 5:cda648ca50f5 tip
481 add original_e
481 add original_e
482 branch: default
482 branch: default
483 commit: (clean)
483 commit: (clean)
484 update: 1 new changesets, 2 branch heads (merge)
484 update: 1 new changesets, 2 branch heads (merge)
485 phases: 3 draft
485 phases: 3 draft
486 unstable: 1 changesets
486 unstable: 1 changesets
487 $ hg log -G -r '::unstable()'
487 $ hg log -G -r '::unstable()'
488 @ 5:cda648ca50f5 (draft) [tip ] add original_e
488 @ 5:cda648ca50f5 (draft) [tip ] add original_e
489 |
489 |
490 x 4:94b33453f93b (draft) [ ] add original_d
490 x 4:94b33453f93b (draft) [ ] add original_d
491 |
491 |
492 o 3:6f9641995072 (draft) [ ] add n3w_3_c
492 o 3:6f9641995072 (draft) [ ] add n3w_3_c
493 |
493 |
494 o 1:7c3bad9141dc (public) [ ] add b
494 o 1:7c3bad9141dc (public) [ ] add b
495 |
495 |
496 o 0:1f0dee641bb7 (public) [ ] add a
496 o 0:1f0dee641bb7 (public) [ ] add a
497
497
498
498
499 refuse to push obsolete changeset
499 refuse to push obsolete changeset
500
500
501 $ hg push ../tmpc/ -r 'desc("original_d")'
501 $ hg push ../tmpc/ -r 'desc("original_d")'
502 pushing to ../tmpc/
502 pushing to ../tmpc/
503 searching for changes
503 searching for changes
504 abort: push includes obsolete changeset: 94b33453f93b!
504 abort: push includes obsolete changeset: 94b33453f93b!
505 [255]
505 [255]
506
506
507 refuse to push unstable changeset
507 refuse to push unstable changeset
508
508
509 $ hg push ../tmpc/
509 $ hg push ../tmpc/
510 pushing to ../tmpc/
510 pushing to ../tmpc/
511 searching for changes
511 searching for changes
512 abort: push includes unstable changeset: cda648ca50f5!
512 abort: push includes unstable changeset: cda648ca50f5!
513 [255]
513 [255]
514
514
515 Test that extinct changeset are properly detected
515 Test that extinct changeset are properly detected
516
516
517 $ hg log -r 'extinct()'
517 $ hg log -r 'extinct()'
518
518
519 Don't try to push extinct changeset
519 Don't try to push extinct changeset
520
520
521 $ hg init ../tmpf
521 $ hg init ../tmpf
522 $ hg out ../tmpf
522 $ hg out ../tmpf
523 comparing with ../tmpf
523 comparing with ../tmpf
524 searching for changes
524 searching for changes
525 0:1f0dee641bb7 (public) [ ] add a
525 0:1f0dee641bb7 (public) [ ] add a
526 1:7c3bad9141dc (public) [ ] add b
526 1:7c3bad9141dc (public) [ ] add b
527 2:245bde4270cd (public) [ ] add original_c
527 2:245bde4270cd (public) [ ] add original_c
528 3:6f9641995072 (draft) [ ] add n3w_3_c
528 3:6f9641995072 (draft) [ ] add n3w_3_c
529 4:94b33453f93b (draft) [ ] add original_d
529 4:94b33453f93b (draft) [ ] add original_d
530 5:cda648ca50f5 (draft) [tip ] add original_e
530 5:cda648ca50f5 (draft) [tip ] add original_e
531 $ hg push ../tmpf -f # -f because be push unstable too
531 $ hg push ../tmpf -f # -f because be push unstable too
532 pushing to ../tmpf
532 pushing to ../tmpf
533 searching for changes
533 searching for changes
534 adding changesets
534 adding changesets
535 adding manifests
535 adding manifests
536 adding file changes
536 adding file changes
537 added 6 changesets with 6 changes to 6 files (+1 heads)
537 added 6 changesets with 6 changes to 6 files (+1 heads)
538 7 new obsolescence markers
538 7 new obsolescence markers
539
539
540 no warning displayed
540 no warning displayed
541
541
542 $ hg push ../tmpf
542 $ hg push ../tmpf
543 pushing to ../tmpf
543 pushing to ../tmpf
544 searching for changes
544 searching for changes
545 no changes found
545 no changes found
546 [1]
546 [1]
547
547
548 Do not warn about new head when the new head is a successors of a remote one
548 Do not warn about new head when the new head is a successors of a remote one
549
549
550 $ hg log -G
550 $ hg log -G
551 @ 5:cda648ca50f5 (draft) [tip ] add original_e
551 @ 5:cda648ca50f5 (draft) [tip ] add original_e
552 |
552 |
553 x 4:94b33453f93b (draft) [ ] add original_d
553 x 4:94b33453f93b (draft) [ ] add original_d
554 |
554 |
555 o 3:6f9641995072 (draft) [ ] add n3w_3_c
555 o 3:6f9641995072 (draft) [ ] add n3w_3_c
556 |
556 |
557 | o 2:245bde4270cd (public) [ ] add original_c
557 | o 2:245bde4270cd (public) [ ] add original_c
558 |/
558 |/
559 o 1:7c3bad9141dc (public) [ ] add b
559 o 1:7c3bad9141dc (public) [ ] add b
560 |
560 |
561 o 0:1f0dee641bb7 (public) [ ] add a
561 o 0:1f0dee641bb7 (public) [ ] add a
562
562
563 $ hg up -q 'desc(n3w_3_c)'
563 $ hg up -q 'desc(n3w_3_c)'
564 $ mkcommit obsolete_e
564 $ mkcommit obsolete_e
565 created new head
565 created new head
566 $ hg debugobsolete `getid 'original_e'` `getid 'obsolete_e'`
566 $ hg debugobsolete `getid 'original_e'` `getid 'obsolete_e'`
567 $ hg outgoing ../tmpf # parasite hg outgoing testin
567 $ hg outgoing ../tmpf # parasite hg outgoing testin
568 comparing with ../tmpf
568 comparing with ../tmpf
569 searching for changes
569 searching for changes
570 6:3de5eca88c00 (draft) [tip ] add obsolete_e
570 6:3de5eca88c00 (draft) [tip ] add obsolete_e
571 $ hg push ../tmpf
571 $ hg push ../tmpf
572 pushing to ../tmpf
572 pushing to ../tmpf
573 searching for changes
573 searching for changes
574 adding changesets
574 adding changesets
575 adding manifests
575 adding manifests
576 adding file changes
576 adding file changes
577 added 1 changesets with 1 changes to 1 files (+1 heads)
577 added 1 changesets with 1 changes to 1 files (+1 heads)
578 1 new obsolescence markers
578 1 new obsolescence markers
579
579
580 test relevance computation
580 test relevance computation
581 ---------------------------------------
581 ---------------------------------------
582
582
583 Checking simple case of "marker relevance".
583 Checking simple case of "marker relevance".
584
584
585
585
586 Reminder of the repo situation
586 Reminder of the repo situation
587
587
588 $ hg log --hidden --graph
588 $ hg log --hidden --graph
589 @ 6:3de5eca88c00 (draft) [tip ] add obsolete_e
589 @ 6:3de5eca88c00 (draft) [tip ] add obsolete_e
590 |
590 |
591 | x 5:cda648ca50f5 (draft) [ ] add original_e
591 | x 5:cda648ca50f5 (draft) [ ] add original_e
592 | |
592 | |
593 | x 4:94b33453f93b (draft) [ ] add original_d
593 | x 4:94b33453f93b (draft) [ ] add original_d
594 |/
594 |/
595 o 3:6f9641995072 (draft) [ ] add n3w_3_c
595 o 3:6f9641995072 (draft) [ ] add n3w_3_c
596 |
596 |
597 | o 2:245bde4270cd (public) [ ] add original_c
597 | o 2:245bde4270cd (public) [ ] add original_c
598 |/
598 |/
599 o 1:7c3bad9141dc (public) [ ] add b
599 o 1:7c3bad9141dc (public) [ ] add b
600 |
600 |
601 o 0:1f0dee641bb7 (public) [ ] add a
601 o 0:1f0dee641bb7 (public) [ ] add a
602
602
603
603
604 List of all markers
604 List of all markers
605
605
606 $ hg debugobsolete
606 $ hg debugobsolete
607 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
607 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
608 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
608 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
609 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
609 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
610 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
610 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
611 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
611 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
612 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
612 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
613 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
613 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
614 cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test'} (glob)
614 cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test'} (glob)
615
615
616 List of changesets with no chain
616 List of changesets with no chain
617
617
618 $ hg debugobsolete --hidden --rev ::2
618 $ hg debugobsolete --hidden --rev ::2
619
619
620 List of changesets that are included on marker chain
620 List of changesets that are included on marker chain
621
621
622 $ hg debugobsolete --hidden --rev 6
622 $ hg debugobsolete --hidden --rev 6
623 cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test'} (glob)
623 cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test'} (glob)
624
624
625 List of changesets with a longer chain, (including a pruned children)
625 List of changesets with a longer chain, (including a pruned children)
626
626
627 $ hg debugobsolete --hidden --rev 3
627 $ hg debugobsolete --hidden --rev 3
628 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
628 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
629 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
629 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
630 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
630 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
631 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
631 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
632 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
632 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
633 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
633 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
634 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
634 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
635
635
636 List of both
636 List of both
637
637
638 $ hg debugobsolete --hidden --rev 3::6
638 $ hg debugobsolete --hidden --rev 3::6
639 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
639 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
640 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
640 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
641 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
641 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
642 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
642 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
643 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
643 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
644 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
644 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
645 cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test'} (glob)
645 cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test'} (glob)
646 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
646 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
647
647
648 List of all markers in JSON
648 List of all markers in JSON
649
649
650 $ hg debugobsolete -Tjson
650 $ hg debugobsolete -Tjson
651 [
651 [
652 {
652 {
653 "date": [1339.0, 0],
653 "date": [1339.0, 0],
654 "flag": 0,
654 "flag": 0,
655 "metadata": {"user": "test"},
655 "metadata": {"user": "test"},
656 "precnode": "1339133913391339133913391339133913391339",
656 "precnode": "1339133913391339133913391339133913391339",
657 "succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"]
657 "succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"]
658 },
658 },
659 {
659 {
660 "date": [1339.0, 0],
660 "date": [1339.0, 0],
661 "flag": 0,
661 "flag": 0,
662 "metadata": {"user": "test"},
662 "metadata": {"user": "test"},
663 "precnode": "1337133713371337133713371337133713371337",
663 "precnode": "1337133713371337133713371337133713371337",
664 "succnodes": ["5601fb93a350734d935195fee37f4054c529ff39"]
664 "succnodes": ["5601fb93a350734d935195fee37f4054c529ff39"]
665 },
665 },
666 {
666 {
667 "date": [121.0, 120],
667 "date": [121.0, 120],
668 "flag": 12,
668 "flag": 12,
669 "metadata": {"user": "test"},
669 "metadata": {"user": "test"},
670 "precnode": "245bde4270cd1072a27757984f9cda8ba26f08ca",
670 "precnode": "245bde4270cd1072a27757984f9cda8ba26f08ca",
671 "succnodes": ["cdbce2fbb16313928851e97e0d85413f3f7eb77f"]
671 "succnodes": ["cdbce2fbb16313928851e97e0d85413f3f7eb77f"]
672 },
672 },
673 {
673 {
674 "date": [1338.0, 0],
674 "date": [1338.0, 0],
675 "flag": 1,
675 "flag": 1,
676 "metadata": {"user": "test"},
676 "metadata": {"user": "test"},
677 "precnode": "5601fb93a350734d935195fee37f4054c529ff39",
677 "precnode": "5601fb93a350734d935195fee37f4054c529ff39",
678 "succnodes": ["6f96419950729f3671185b847352890f074f7557"]
678 "succnodes": ["6f96419950729f3671185b847352890f074f7557"]
679 },
679 },
680 {
680 {
681 "date": [1338.0, 0],
681 "date": [1338.0, 0],
682 "flag": 0,
682 "flag": 0,
683 "metadata": {"user": "test"},
683 "metadata": {"user": "test"},
684 "precnode": "ca819180edb99ed25ceafb3e9584ac287e240b00",
684 "precnode": "ca819180edb99ed25ceafb3e9584ac287e240b00",
685 "succnodes": ["1337133713371337133713371337133713371337"]
685 "succnodes": ["1337133713371337133713371337133713371337"]
686 },
686 },
687 {
687 {
688 "date": [1337.0, 0],
688 "date": [1337.0, 0],
689 "flag": 0,
689 "flag": 0,
690 "metadata": {"user": "test"},
690 "metadata": {"user": "test"},
691 "precnode": "cdbce2fbb16313928851e97e0d85413f3f7eb77f",
691 "precnode": "cdbce2fbb16313928851e97e0d85413f3f7eb77f",
692 "succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"]
692 "succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"]
693 },
693 },
694 {
694 {
695 "date": [0.0, 0],
695 "date": [0.0, 0],
696 "flag": 0,
696 "flag": 0,
697 "metadata": {"user": "test"},
697 "metadata": {"user": "test"},
698 "parentnodes": ["6f96419950729f3671185b847352890f074f7557"],
698 "parentnodes": ["6f96419950729f3671185b847352890f074f7557"],
699 "precnode": "94b33453f93bdb8d457ef9b770851a618bf413e1",
699 "precnode": "94b33453f93bdb8d457ef9b770851a618bf413e1",
700 "succnodes": []
700 "succnodes": []
701 },
701 },
702 {
702 {
703 "date": *, (glob)
703 "date": *, (glob)
704 "flag": 0,
704 "flag": 0,
705 "metadata": {"user": "test"},
705 "metadata": {"user": "test"},
706 "precnode": "cda648ca50f50482b7055c0b0c4c117bba6733d9",
706 "precnode": "cda648ca50f50482b7055c0b0c4c117bba6733d9",
707 "succnodes": ["3de5eca88c00aa039da7399a220f4a5221faa585"]
707 "succnodes": ["3de5eca88c00aa039da7399a220f4a5221faa585"]
708 }
708 }
709 ]
709 ]
710
710
711 Template keywords
711 Template keywords
712
712
713 $ hg debugobsolete -r6 -T '{succnodes % "{node|short}"} {date|shortdate}\n'
713 $ hg debugobsolete -r6 -T '{succnodes % "{node|short}"} {date|shortdate}\n'
714 3de5eca88c00 ????-??-?? (glob)
714 3de5eca88c00 ????-??-?? (glob)
715 $ hg debugobsolete -r6 -T '{join(metadata % "{key}={value}", " ")}\n'
715 $ hg debugobsolete -r6 -T '{join(metadata % "{key}={value}", " ")}\n'
716 user=test
716 user=test
717 $ hg debugobsolete -r6 -T '{metadata}\n'
717 $ hg debugobsolete -r6 -T '{metadata}\n'
718 'user': 'test'
718 'user': 'test'
719 $ hg debugobsolete -r6 -T '{flag} {get(metadata, "user")}\n'
719 $ hg debugobsolete -r6 -T '{flag} {get(metadata, "user")}\n'
720 0 test
720 0 test
721
721
722 #if serve
722 #if serve
723
723
724 Test the debug output for exchange
724 Test the debug output for exchange
725 ----------------------------------
725 ----------------------------------
726
726
727 $ hg pull ../tmpb --config 'experimental.obsmarkers-exchange-debug=True' # bundle2
727 $ hg pull ../tmpb --config 'experimental.obsmarkers-exchange-debug=True' # bundle2
728 pulling from ../tmpb
728 pulling from ../tmpb
729 searching for changes
729 searching for changes
730 no changes found
730 no changes found
731 obsmarker-exchange: 346 bytes received
731 obsmarker-exchange: 346 bytes received
732
732
733 check hgweb does not explode
733 check hgweb does not explode
734 ====================================
734 ====================================
735
735
736 $ hg unbundle $TESTDIR/bundles/hgweb+obs.hg
736 $ hg unbundle $TESTDIR/bundles/hgweb+obs.hg
737 adding changesets
737 adding changesets
738 adding manifests
738 adding manifests
739 adding file changes
739 adding file changes
740 added 62 changesets with 63 changes to 9 files (+60 heads)
740 added 62 changesets with 63 changes to 9 files (+60 heads)
741 (run 'hg heads .' to see heads, 'hg merge' to merge)
741 (run 'hg heads .' to see heads, 'hg merge' to merge)
742 $ for node in `hg log -r 'desc(babar_)' --template '{node}\n'`;
742 $ for node in `hg log -r 'desc(babar_)' --template '{node}\n'`;
743 > do
743 > do
744 > hg debugobsolete $node
744 > hg debugobsolete $node
745 > done
745 > done
746 $ hg up tip
746 $ hg up tip
747 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
747 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
748
748
749 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
749 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
750 $ cat hg.pid >> $DAEMON_PIDS
750 $ cat hg.pid >> $DAEMON_PIDS
751
751
752 check changelog view
752 check changelog view
753
753
754 $ get-with-headers.py --headeronly localhost:$HGPORT 'shortlog/'
754 $ get-with-headers.py --headeronly localhost:$HGPORT 'shortlog/'
755 200 Script output follows
755 200 Script output follows
756
756
757 check graph view
757 check graph view
758
758
759 $ get-with-headers.py --headeronly localhost:$HGPORT 'graph'
759 $ get-with-headers.py --headeronly localhost:$HGPORT 'graph'
760 200 Script output follows
760 200 Script output follows
761
761
762 check filelog view
762 check filelog view
763
763
764 $ get-with-headers.py --headeronly localhost:$HGPORT 'log/'`hg log -r . -T "{node}"`/'babar'
764 $ get-with-headers.py --headeronly localhost:$HGPORT 'log/'`hg log -r . -T "{node}"`/'babar'
765 200 Script output follows
765 200 Script output follows
766
766
767 $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/68'
767 $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/68'
768 200 Script output follows
768 200 Script output follows
769 $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67'
769 $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67'
770 404 Not Found
770 404 Not Found
771 [1]
771 [1]
772
772
773 check that web.view config option:
773 check that web.view config option:
774
774
775 $ killdaemons.py hg.pid
775 $ killdaemons.py hg.pid
776 $ cat >> .hg/hgrc << EOF
776 $ cat >> .hg/hgrc << EOF
777 > [web]
777 > [web]
778 > view=all
778 > view=all
779 > EOF
779 > EOF
780 $ wait
780 $ wait
781 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
781 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
782 $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67'
782 $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67'
783 200 Script output follows
783 200 Script output follows
784 $ killdaemons.py hg.pid
784 $ killdaemons.py hg.pid
785
785
786 Checking _enable=False warning if obsolete marker exists
786 Checking _enable=False warning if obsolete marker exists
787
787
788 $ echo '[experimental]' >> $HGRCPATH
788 $ echo '[experimental]' >> $HGRCPATH
789 $ echo "evolution=" >> $HGRCPATH
789 $ echo "evolution=" >> $HGRCPATH
790 $ hg log -r tip
790 $ hg log -r tip
791 obsolete feature not enabled but 68 markers found!
791 obsolete feature not enabled but 68 markers found!
792 68:c15e9edfca13 (draft) [tip ] add celestine
792 68:c15e9edfca13 (draft) [tip ] add celestine
793
793
794 reenable for later test
794 reenable for later test
795
795
796 $ echo '[experimental]' >> $HGRCPATH
796 $ echo '[experimental]' >> $HGRCPATH
797 $ echo "evolution=createmarkers,exchange" >> $HGRCPATH
797 $ echo "evolution=createmarkers,exchange" >> $HGRCPATH
798
798
799 #endif
799 #endif
800
800
801 Several troubles on the same changeset (create an unstable and bumped changeset)
802
803 $ hg debugobsolete `getid obsolete_e`
804 $ hg debugobsolete `getid original_c` `getid babar`
805 $ hg log --config ui.logtemplate= -r 'bumped() and unstable()'
806 changeset: 7:50c51b361e60
807 user: test
808 date: Thu Jan 01 00:00:00 1970 +0000
809 trouble: unstable, bumped
810 summary: add babar
811
812
801 Test incoming/outcoming with changesets obsoleted remotely, known locally
813 Test incoming/outcoming with changesets obsoleted remotely, known locally
802 ===============================================================================
814 ===============================================================================
803
815
804 This test issue 3805
816 This test issue 3805
805
817
806 $ hg init repo-issue3805
818 $ hg init repo-issue3805
807 $ cd repo-issue3805
819 $ cd repo-issue3805
808 $ echo "base" > base
820 $ echo "base" > base
809 $ hg ci -Am "base"
821 $ hg ci -Am "base"
810 adding base
822 adding base
811 $ echo "foo" > foo
823 $ echo "foo" > foo
812 $ hg ci -Am "A"
824 $ hg ci -Am "A"
813 adding foo
825 adding foo
814 $ hg clone . ../other-issue3805
826 $ hg clone . ../other-issue3805
815 updating to branch default
827 updating to branch default
816 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
828 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
817 $ echo "bar" >> foo
829 $ echo "bar" >> foo
818 $ hg ci --amend
830 $ hg ci --amend
819 $ cd ../other-issue3805
831 $ cd ../other-issue3805
820 $ hg log -G
832 $ hg log -G
821 @ 1:29f0c6921ddd (draft) [tip ] A
833 @ 1:29f0c6921ddd (draft) [tip ] A
822 |
834 |
823 o 0:d20a80d4def3 (draft) [ ] base
835 o 0:d20a80d4def3 (draft) [ ] base
824
836
825 $ hg log -G -R ../repo-issue3805
837 $ hg log -G -R ../repo-issue3805
826 @ 3:323a9c3ddd91 (draft) [tip ] A
838 @ 3:323a9c3ddd91 (draft) [tip ] A
827 |
839 |
828 o 0:d20a80d4def3 (draft) [ ] base
840 o 0:d20a80d4def3 (draft) [ ] base
829
841
830 $ hg incoming
842 $ hg incoming
831 comparing with $TESTTMP/tmpe/repo-issue3805 (glob)
843 comparing with $TESTTMP/tmpe/repo-issue3805 (glob)
832 searching for changes
844 searching for changes
833 3:323a9c3ddd91 (draft) [tip ] A
845 3:323a9c3ddd91 (draft) [tip ] A
834 $ hg incoming --bundle ../issue3805.hg
846 $ hg incoming --bundle ../issue3805.hg
835 comparing with $TESTTMP/tmpe/repo-issue3805 (glob)
847 comparing with $TESTTMP/tmpe/repo-issue3805 (glob)
836 searching for changes
848 searching for changes
837 3:323a9c3ddd91 (draft) [tip ] A
849 3:323a9c3ddd91 (draft) [tip ] A
838 $ hg outgoing
850 $ hg outgoing
839 comparing with $TESTTMP/tmpe/repo-issue3805 (glob)
851 comparing with $TESTTMP/tmpe/repo-issue3805 (glob)
840 searching for changes
852 searching for changes
841 1:29f0c6921ddd (draft) [tip ] A
853 1:29f0c6921ddd (draft) [tip ] A
842
854
843 #if serve
855 #if serve
844
856
845 $ hg serve -R ../repo-issue3805 -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
857 $ hg serve -R ../repo-issue3805 -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
846 $ cat hg.pid >> $DAEMON_PIDS
858 $ cat hg.pid >> $DAEMON_PIDS
847
859
848 $ hg incoming http://localhost:$HGPORT
860 $ hg incoming http://localhost:$HGPORT
849 comparing with http://localhost:$HGPORT/
861 comparing with http://localhost:$HGPORT/
850 searching for changes
862 searching for changes
851 2:323a9c3ddd91 (draft) [tip ] A
863 2:323a9c3ddd91 (draft) [tip ] A
852 $ hg outgoing http://localhost:$HGPORT
864 $ hg outgoing http://localhost:$HGPORT
853 comparing with http://localhost:$HGPORT/
865 comparing with http://localhost:$HGPORT/
854 searching for changes
866 searching for changes
855 1:29f0c6921ddd (draft) [tip ] A
867 1:29f0c6921ddd (draft) [tip ] A
856
868
857 $ killdaemons.py
869 $ killdaemons.py
858
870
859 #endif
871 #endif
860
872
861 This test issue 3814
873 This test issue 3814
862
874
863 (nothing to push but locally hidden changeset)
875 (nothing to push but locally hidden changeset)
864
876
865 $ cd ..
877 $ cd ..
866 $ hg init repo-issue3814
878 $ hg init repo-issue3814
867 $ cd repo-issue3805
879 $ cd repo-issue3805
868 $ hg push -r 323a9c3ddd91 ../repo-issue3814
880 $ hg push -r 323a9c3ddd91 ../repo-issue3814
869 pushing to ../repo-issue3814
881 pushing to ../repo-issue3814
870 searching for changes
882 searching for changes
871 adding changesets
883 adding changesets
872 adding manifests
884 adding manifests
873 adding file changes
885 adding file changes
874 added 2 changesets with 2 changes to 2 files
886 added 2 changesets with 2 changes to 2 files
875 2 new obsolescence markers
887 2 new obsolescence markers
876 $ hg out ../repo-issue3814
888 $ hg out ../repo-issue3814
877 comparing with ../repo-issue3814
889 comparing with ../repo-issue3814
878 searching for changes
890 searching for changes
879 no changes found
891 no changes found
880 [1]
892 [1]
881
893
882 Test that a local tag blocks a changeset from being hidden
894 Test that a local tag blocks a changeset from being hidden
883
895
884 $ hg tag -l visible -r 1 --hidden
896 $ hg tag -l visible -r 1 --hidden
885 $ hg log -G
897 $ hg log -G
886 @ 3:323a9c3ddd91 (draft) [tip ] A
898 @ 3:323a9c3ddd91 (draft) [tip ] A
887 |
899 |
888 | x 1:29f0c6921ddd (draft) [visible ] A
900 | x 1:29f0c6921ddd (draft) [visible ] A
889 |/
901 |/
890 o 0:d20a80d4def3 (draft) [ ] base
902 o 0:d20a80d4def3 (draft) [ ] base
891
903
892 Test that removing a local tag does not cause some commands to fail
904 Test that removing a local tag does not cause some commands to fail
893
905
894 $ hg tag -l -r tip tiptag
906 $ hg tag -l -r tip tiptag
895 $ hg tags
907 $ hg tags
896 tiptag 3:323a9c3ddd91
908 tiptag 3:323a9c3ddd91
897 tip 3:323a9c3ddd91
909 tip 3:323a9c3ddd91
898 visible 1:29f0c6921ddd
910 visible 1:29f0c6921ddd
899 $ hg --config extensions.strip= strip -r tip --no-backup
911 $ hg --config extensions.strip= strip -r tip --no-backup
900 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
912 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
901 $ hg tags
913 $ hg tags
902 visible 1:29f0c6921ddd
914 visible 1:29f0c6921ddd
903 tip 1:29f0c6921ddd
915 tip 1:29f0c6921ddd
904
916
905 Test bundle overlay onto hidden revision
917 Test bundle overlay onto hidden revision
906
918
907 $ cd ..
919 $ cd ..
908 $ hg init repo-bundleoverlay
920 $ hg init repo-bundleoverlay
909 $ cd repo-bundleoverlay
921 $ cd repo-bundleoverlay
910 $ echo "A" > foo
922 $ echo "A" > foo
911 $ hg ci -Am "A"
923 $ hg ci -Am "A"
912 adding foo
924 adding foo
913 $ echo "B" >> foo
925 $ echo "B" >> foo
914 $ hg ci -m "B"
926 $ hg ci -m "B"
915 $ hg up 0
927 $ hg up 0
916 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
928 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
917 $ echo "C" >> foo
929 $ echo "C" >> foo
918 $ hg ci -m "C"
930 $ hg ci -m "C"
919 created new head
931 created new head
920 $ hg log -G
932 $ hg log -G
921 @ 2:c186d7714947 (draft) [tip ] C
933 @ 2:c186d7714947 (draft) [tip ] C
922 |
934 |
923 | o 1:44526ebb0f98 (draft) [ ] B
935 | o 1:44526ebb0f98 (draft) [ ] B
924 |/
936 |/
925 o 0:4b34ecfb0d56 (draft) [ ] A
937 o 0:4b34ecfb0d56 (draft) [ ] A
926
938
927
939
928 $ hg clone -r1 . ../other-bundleoverlay
940 $ hg clone -r1 . ../other-bundleoverlay
929 adding changesets
941 adding changesets
930 adding manifests
942 adding manifests
931 adding file changes
943 adding file changes
932 added 2 changesets with 2 changes to 1 files
944 added 2 changesets with 2 changes to 1 files
933 updating to branch default
945 updating to branch default
934 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
946 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
935 $ cd ../other-bundleoverlay
947 $ cd ../other-bundleoverlay
936 $ echo "B+" >> foo
948 $ echo "B+" >> foo
937 $ hg ci --amend -m "B+"
949 $ hg ci --amend -m "B+"
938 $ hg log -G --hidden
950 $ hg log -G --hidden
939 @ 3:b7d587542d40 (draft) [tip ] B+
951 @ 3:b7d587542d40 (draft) [tip ] B+
940 |
952 |
941 | x 2:eb95e9297e18 (draft) [ ] temporary amend commit for 44526ebb0f98
953 | x 2:eb95e9297e18 (draft) [ ] temporary amend commit for 44526ebb0f98
942 | |
954 | |
943 | x 1:44526ebb0f98 (draft) [ ] B
955 | x 1:44526ebb0f98 (draft) [ ] B
944 |/
956 |/
945 o 0:4b34ecfb0d56 (draft) [ ] A
957 o 0:4b34ecfb0d56 (draft) [ ] A
946
958
947
959
948 $ hg incoming ../repo-bundleoverlay --bundle ../bundleoverlay.hg
960 $ hg incoming ../repo-bundleoverlay --bundle ../bundleoverlay.hg
949 comparing with ../repo-bundleoverlay
961 comparing with ../repo-bundleoverlay
950 searching for changes
962 searching for changes
951 1:44526ebb0f98 (draft) [ ] B
963 1:44526ebb0f98 (draft) [ ] B
952 2:c186d7714947 (draft) [tip ] C
964 2:c186d7714947 (draft) [tip ] C
953 $ hg log -G -R ../bundleoverlay.hg
965 $ hg log -G -R ../bundleoverlay.hg
954 o 4:c186d7714947 (draft) [tip ] C
966 o 4:c186d7714947 (draft) [tip ] C
955 |
967 |
956 | @ 3:b7d587542d40 (draft) [ ] B+
968 | @ 3:b7d587542d40 (draft) [ ] B+
957 |/
969 |/
958 o 0:4b34ecfb0d56 (draft) [ ] A
970 o 0:4b34ecfb0d56 (draft) [ ] A
959
971
960
972
961 #if serve
973 #if serve
962
974
963 Test issue 4506
975 Test issue 4506
964
976
965 $ cd ..
977 $ cd ..
966 $ hg init repo-issue4506
978 $ hg init repo-issue4506
967 $ cd repo-issue4506
979 $ cd repo-issue4506
968 $ echo "0" > foo
980 $ echo "0" > foo
969 $ hg add foo
981 $ hg add foo
970 $ hg ci -m "content-0"
982 $ hg ci -m "content-0"
971
983
972 $ hg up null
984 $ hg up null
973 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
985 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
974 $ echo "1" > bar
986 $ echo "1" > bar
975 $ hg add bar
987 $ hg add bar
976 $ hg ci -m "content-1"
988 $ hg ci -m "content-1"
977 created new head
989 created new head
978 $ hg up 0
990 $ hg up 0
979 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
991 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
980 $ hg graft 1
992 $ hg graft 1
981 grafting 1:1c9eddb02162 "content-1" (tip)
993 grafting 1:1c9eddb02162 "content-1" (tip)
982
994
983 $ hg debugobsolete `hg log -r1 -T'{node}'` `hg log -r2 -T'{node}'`
995 $ hg debugobsolete `hg log -r1 -T'{node}'` `hg log -r2 -T'{node}'`
984
996
985 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
997 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
986 $ cat hg.pid >> $DAEMON_PIDS
998 $ cat hg.pid >> $DAEMON_PIDS
987
999
988 $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/1'
1000 $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/1'
989 404 Not Found
1001 404 Not Found
990 [1]
1002 [1]
991 $ get-with-headers.py --headeronly localhost:$HGPORT 'file/tip/bar'
1003 $ get-with-headers.py --headeronly localhost:$HGPORT 'file/tip/bar'
992 200 Script output follows
1004 200 Script output follows
993 $ get-with-headers.py --headeronly localhost:$HGPORT 'annotate/tip/bar'
1005 $ get-with-headers.py --headeronly localhost:$HGPORT 'annotate/tip/bar'
994 200 Script output follows
1006 200 Script output follows
995
1007
996 $ killdaemons.py
1008 $ killdaemons.py
997
1009
998 #endif
1010 #endif
999
1011
1000 Test heads computation on pending index changes with obsolescence markers
1012 Test heads computation on pending index changes with obsolescence markers
1001 $ cd ..
1013 $ cd ..
1002 $ cat >$TESTTMP/test_extension.py << EOF
1014 $ cat >$TESTTMP/test_extension.py << EOF
1003 > from mercurial import cmdutil
1015 > from mercurial import cmdutil
1004 > from mercurial.i18n import _
1016 > from mercurial.i18n import _
1005 >
1017 >
1006 > cmdtable = {}
1018 > cmdtable = {}
1007 > command = cmdutil.command(cmdtable)
1019 > command = cmdutil.command(cmdtable)
1008 > @command("amendtransient",[], _('hg amendtransient [rev]'))
1020 > @command("amendtransient",[], _('hg amendtransient [rev]'))
1009 > def amend(ui, repo, *pats, **opts):
1021 > def amend(ui, repo, *pats, **opts):
1010 > def commitfunc(ui, repo, message, match, opts):
1022 > def commitfunc(ui, repo, message, match, opts):
1011 > return repo.commit(message, repo['.'].user(), repo['.'].date(), match)
1023 > return repo.commit(message, repo['.'].user(), repo['.'].date(), match)
1012 > opts['message'] = 'Test'
1024 > opts['message'] = 'Test'
1013 > opts['logfile'] = None
1025 > opts['logfile'] = None
1014 > cmdutil.amend(ui, repo, commitfunc, repo['.'], {}, pats, opts)
1026 > cmdutil.amend(ui, repo, commitfunc, repo['.'], {}, pats, opts)
1015 > ui.write('%s\n' % repo.changelog.headrevs())
1027 > ui.write('%s\n' % repo.changelog.headrevs())
1016 > EOF
1028 > EOF
1017 $ cat >> $HGRCPATH << EOF
1029 $ cat >> $HGRCPATH << EOF
1018 > [extensions]
1030 > [extensions]
1019 > testextension=$TESTTMP/test_extension.py
1031 > testextension=$TESTTMP/test_extension.py
1020 > EOF
1032 > EOF
1021 $ hg init repo-issue-nativerevs-pending-changes
1033 $ hg init repo-issue-nativerevs-pending-changes
1022 $ cd repo-issue-nativerevs-pending-changes
1034 $ cd repo-issue-nativerevs-pending-changes
1023 $ mkcommit a
1035 $ mkcommit a
1024 $ mkcommit b
1036 $ mkcommit b
1025 $ hg up ".^"
1037 $ hg up ".^"
1026 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1038 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1027 $ echo aa > a
1039 $ echo aa > a
1028 $ hg amendtransient
1040 $ hg amendtransient
1029 [1, 3]
1041 [1, 3]
1030
1042
1031 Check that corrupted hidden cache does not crash
1043 Check that corrupted hidden cache does not crash
1032
1044
1033 $ printf "" > .hg/cache/hidden
1045 $ printf "" > .hg/cache/hidden
1034 $ hg log -r . -T '{node}' --debug
1046 $ hg log -r . -T '{node}' --debug
1035 corrupted hidden cache
1047 corrupted hidden cache
1036 8fd96dfc63e51ed5a8af1bec18eb4b19dbf83812 (no-eol)
1048 8fd96dfc63e51ed5a8af1bec18eb4b19dbf83812 (no-eol)
1037 $ hg log -r . -T '{node}' --debug
1049 $ hg log -r . -T '{node}' --debug
1038 8fd96dfc63e51ed5a8af1bec18eb4b19dbf83812 (no-eol)
1050 8fd96dfc63e51ed5a8af1bec18eb4b19dbf83812 (no-eol)
1039
1051
1040 #if unix-permissions
1052 #if unix-permissions
1041 Check that wrong hidden cache permission does not crash
1053 Check that wrong hidden cache permission does not crash
1042
1054
1043 $ chmod 000 .hg/cache/hidden
1055 $ chmod 000 .hg/cache/hidden
1044 $ hg log -r . -T '{node}' --debug
1056 $ hg log -r . -T '{node}' --debug
1045 cannot read hidden cache
1057 cannot read hidden cache
1046 error writing hidden changesets cache
1058 error writing hidden changesets cache
1047 8fd96dfc63e51ed5a8af1bec18eb4b19dbf83812 (no-eol)
1059 8fd96dfc63e51ed5a8af1bec18eb4b19dbf83812 (no-eol)
1048 #endif
1060 #endif
1049
1061
1050 Test cache consistency for the visible filter
1062 Test cache consistency for the visible filter
1051 1) We want to make sure that the cached filtered revs are invalidated when
1063 1) We want to make sure that the cached filtered revs are invalidated when
1052 bookmarks change
1064 bookmarks change
1053 $ cd ..
1065 $ cd ..
1054 $ cat >$TESTTMP/test_extension.py << EOF
1066 $ cat >$TESTTMP/test_extension.py << EOF
1055 > import weakref
1067 > import weakref
1056 > from mercurial import cmdutil, extensions, bookmarks, repoview
1068 > from mercurial import cmdutil, extensions, bookmarks, repoview
1057 > def _bookmarkchanged(orig, bkmstoreinst, *args, **kwargs):
1069 > def _bookmarkchanged(orig, bkmstoreinst, *args, **kwargs):
1058 > reporef = weakref.ref(bkmstoreinst._repo)
1070 > reporef = weakref.ref(bkmstoreinst._repo)
1059 > def trhook(tr):
1071 > def trhook(tr):
1060 > repo = reporef()
1072 > repo = reporef()
1061 > hidden1 = repoview.computehidden(repo)
1073 > hidden1 = repoview.computehidden(repo)
1062 > hidden = repoview.filterrevs(repo, 'visible')
1074 > hidden = repoview.filterrevs(repo, 'visible')
1063 > if sorted(hidden1) != sorted(hidden):
1075 > if sorted(hidden1) != sorted(hidden):
1064 > print "cache inconsistency"
1076 > print "cache inconsistency"
1065 > bkmstoreinst._repo.currenttransaction().addpostclose('test_extension', trhook)
1077 > bkmstoreinst._repo.currenttransaction().addpostclose('test_extension', trhook)
1066 > orig(bkmstoreinst, *args, **kwargs)
1078 > orig(bkmstoreinst, *args, **kwargs)
1067 > def extsetup(ui):
1079 > def extsetup(ui):
1068 > extensions.wrapfunction(bookmarks.bmstore, 'recordchange',
1080 > extensions.wrapfunction(bookmarks.bmstore, 'recordchange',
1069 > _bookmarkchanged)
1081 > _bookmarkchanged)
1070 > EOF
1082 > EOF
1071
1083
1072 $ hg init repo-cache-inconsistency
1084 $ hg init repo-cache-inconsistency
1073 $ cd repo-issue-nativerevs-pending-changes
1085 $ cd repo-issue-nativerevs-pending-changes
1074 $ mkcommit a
1086 $ mkcommit a
1075 a already tracked!
1087 a already tracked!
1076 $ mkcommit b
1088 $ mkcommit b
1077 $ hg id
1089 $ hg id
1078 13bedc178fce tip
1090 13bedc178fce tip
1079 $ echo "hello" > b
1091 $ echo "hello" > b
1080 $ hg commit --amend -m "message"
1092 $ hg commit --amend -m "message"
1081 $ hg book bookb -r 13bedc178fce --hidden
1093 $ hg book bookb -r 13bedc178fce --hidden
1082 $ hg log -r 13bedc178fce
1094 $ hg log -r 13bedc178fce
1083 5:13bedc178fce (draft) [ bookb] add b
1095 5:13bedc178fce (draft) [ bookb] add b
1084 $ hg book -d bookb
1096 $ hg book -d bookb
1085 $ hg log -r 13bedc178fce
1097 $ hg log -r 13bedc178fce
1086 abort: hidden revision '13bedc178fce'!
1098 abort: hidden revision '13bedc178fce'!
1087 (use --hidden to access hidden revisions)
1099 (use --hidden to access hidden revisions)
1088 [255]
1100 [255]
1089
1101
1090 Empty out the test extension, as it isn't compatible with later parts
1102 Empty out the test extension, as it isn't compatible with later parts
1091 of the test.
1103 of the test.
1092 $ echo > $TESTTMP/test_extension.py
1104 $ echo > $TESTTMP/test_extension.py
1093
1105
1094 Test ability to pull changeset with locally applying obsolescence markers
1106 Test ability to pull changeset with locally applying obsolescence markers
1095 (issue4945)
1107 (issue4945)
1096
1108
1097 $ cd ..
1109 $ cd ..
1098 $ hg init issue4845
1110 $ hg init issue4845
1099 $ cd issue4845
1111 $ cd issue4845
1100
1112
1101 $ echo foo > f0
1113 $ echo foo > f0
1102 $ hg add f0
1114 $ hg add f0
1103 $ hg ci -m '0'
1115 $ hg ci -m '0'
1104 $ echo foo > f1
1116 $ echo foo > f1
1105 $ hg add f1
1117 $ hg add f1
1106 $ hg ci -m '1'
1118 $ hg ci -m '1'
1107 $ echo foo > f2
1119 $ echo foo > f2
1108 $ hg add f2
1120 $ hg add f2
1109 $ hg ci -m '2'
1121 $ hg ci -m '2'
1110
1122
1111 $ echo bar > f2
1123 $ echo bar > f2
1112 $ hg commit --amend --config experimetnal.evolution=createmarkers
1124 $ hg commit --amend --config experimetnal.evolution=createmarkers
1113 $ hg log -G
1125 $ hg log -G
1114 @ 4:b0551702f918 (draft) [tip ] 2
1126 @ 4:b0551702f918 (draft) [tip ] 2
1115 |
1127 |
1116 o 1:e016b03fd86f (draft) [ ] 1
1128 o 1:e016b03fd86f (draft) [ ] 1
1117 |
1129 |
1118 o 0:a78f55e5508c (draft) [ ] 0
1130 o 0:a78f55e5508c (draft) [ ] 0
1119
1131
1120 $ hg log -G --hidden
1132 $ hg log -G --hidden
1121 @ 4:b0551702f918 (draft) [tip ] 2
1133 @ 4:b0551702f918 (draft) [tip ] 2
1122 |
1134 |
1123 | x 3:f27abbcc1f77 (draft) [ ] temporary amend commit for e008cf283490
1135 | x 3:f27abbcc1f77 (draft) [ ] temporary amend commit for e008cf283490
1124 | |
1136 | |
1125 | x 2:e008cf283490 (draft) [ ] 2
1137 | x 2:e008cf283490 (draft) [ ] 2
1126 |/
1138 |/
1127 o 1:e016b03fd86f (draft) [ ] 1
1139 o 1:e016b03fd86f (draft) [ ] 1
1128 |
1140 |
1129 o 0:a78f55e5508c (draft) [ ] 0
1141 o 0:a78f55e5508c (draft) [ ] 0
1130
1142
1131
1143
1132 $ hg strip -r 1 --config extensions.strip=
1144 $ hg strip -r 1 --config extensions.strip=
1133 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
1145 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
1134 saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e016b03fd86f-c41c6bcc-backup.hg (glob)
1146 saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e016b03fd86f-c41c6bcc-backup.hg (glob)
1135 $ hg log -G
1147 $ hg log -G
1136 @ 0:a78f55e5508c (draft) [tip ] 0
1148 @ 0:a78f55e5508c (draft) [tip ] 0
1137
1149
1138 $ hg log -G --hidden
1150 $ hg log -G --hidden
1139 @ 0:a78f55e5508c (draft) [tip ] 0
1151 @ 0:a78f55e5508c (draft) [tip ] 0
1140
1152
1141
1153
1142 $ hg pull .hg/strip-backup/*
1154 $ hg pull .hg/strip-backup/*
1143 pulling from .hg/strip-backup/e016b03fd86f-c41c6bcc-backup.hg
1155 pulling from .hg/strip-backup/e016b03fd86f-c41c6bcc-backup.hg
1144 searching for changes
1156 searching for changes
1145 adding changesets
1157 adding changesets
1146 adding manifests
1158 adding manifests
1147 adding file changes
1159 adding file changes
1148 added 2 changesets with 2 changes to 2 files
1160 added 2 changesets with 2 changes to 2 files
1149 (run 'hg update' to get a working copy)
1161 (run 'hg update' to get a working copy)
1150 $ hg log -G
1162 $ hg log -G
1151 o 2:b0551702f918 (draft) [tip ] 2
1163 o 2:b0551702f918 (draft) [tip ] 2
1152 |
1164 |
1153 o 1:e016b03fd86f (draft) [ ] 1
1165 o 1:e016b03fd86f (draft) [ ] 1
1154 |
1166 |
1155 @ 0:a78f55e5508c (draft) [ ] 0
1167 @ 0:a78f55e5508c (draft) [ ] 0
1156
1168
1157 $ hg log -G --hidden
1169 $ hg log -G --hidden
1158 o 2:b0551702f918 (draft) [tip ] 2
1170 o 2:b0551702f918 (draft) [tip ] 2
1159 |
1171 |
1160 o 1:e016b03fd86f (draft) [ ] 1
1172 o 1:e016b03fd86f (draft) [ ] 1
1161 |
1173 |
1162 @ 0:a78f55e5508c (draft) [ ] 0
1174 @ 0:a78f55e5508c (draft) [ ] 0
1163
1175
1164 Test that 'hg debugobsolete --index --rev' can show indices of obsmarkers when
1176 Test that 'hg debugobsolete --index --rev' can show indices of obsmarkers when
1165 only a subset of those are displayed (because of --rev option)
1177 only a subset of those are displayed (because of --rev option)
1166 $ hg init doindexrev
1178 $ hg init doindexrev
1167 $ cd doindexrev
1179 $ cd doindexrev
1168 $ echo a > a
1180 $ echo a > a
1169 $ hg ci -Am a
1181 $ hg ci -Am a
1170 adding a
1182 adding a
1171 $ hg ci --amend -m aa
1183 $ hg ci --amend -m aa
1172 $ echo b > b
1184 $ echo b > b
1173 $ hg ci -Am b
1185 $ hg ci -Am b
1174 adding b
1186 adding b
1175 $ hg ci --amend -m bb
1187 $ hg ci --amend -m bb
1176 $ echo c > c
1188 $ echo c > c
1177 $ hg ci -Am c
1189 $ hg ci -Am c
1178 adding c
1190 adding c
1179 $ hg ci --amend -m cc
1191 $ hg ci --amend -m cc
1180 $ echo d > d
1192 $ echo d > d
1181 $ hg ci -Am d
1193 $ hg ci -Am d
1182 adding d
1194 adding d
1183 $ hg ci --amend -m dd
1195 $ hg ci --amend -m dd
1184 $ hg debugobsolete --index --rev "3+7"
1196 $ hg debugobsolete --index --rev "3+7"
1185 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 \(.*\) {'user': 'test'} (re)
1197 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 \(.*\) {'user': 'test'} (re)
1186 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 \(.*\) {'user': 'test'} (re)
1198 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 \(.*\) {'user': 'test'} (re)
1187 $ hg debugobsolete --index --rev "3+7" -Tjson
1199 $ hg debugobsolete --index --rev "3+7" -Tjson
1188 [
1200 [
1189 {
1201 {
1190 "date": *, (glob)
1202 "date": *, (glob)
1191 "flag": 0,
1203 "flag": 0,
1192 "index": 1,
1204 "index": 1,
1193 "metadata": {"user": "test"},
1205 "metadata": {"user": "test"},
1194 "precnode": "6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1",
1206 "precnode": "6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1",
1195 "succnodes": ["d27fb9b066076fd921277a4b9e8b9cb48c95bc6a"]
1207 "succnodes": ["d27fb9b066076fd921277a4b9e8b9cb48c95bc6a"]
1196 },
1208 },
1197 {
1209 {
1198 "date": *, (glob)
1210 "date": *, (glob)
1199 "flag": 0,
1211 "flag": 0,
1200 "index": 3,
1212 "index": 3,
1201 "metadata": {"user": "test"},
1213 "metadata": {"user": "test"},
1202 "precnode": "4715cf767440ed891755448016c2b8cf70760c30",
1214 "precnode": "4715cf767440ed891755448016c2b8cf70760c30",
1203 "succnodes": ["7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d"]
1215 "succnodes": ["7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d"]
1204 }
1216 }
1205 ]
1217 ]
1206
1218
1207 Test the --delete option of debugobsolete command
1219 Test the --delete option of debugobsolete command
1208 $ hg debugobsolete --index
1220 $ hg debugobsolete --index
1209 0 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 \(.*\) {'user': 'test'} (re)
1221 0 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 \(.*\) {'user': 'test'} (re)
1210 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 \(.*\) {'user': 'test'} (re)
1222 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 \(.*\) {'user': 'test'} (re)
1211 2 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 \(.*\) {'user': 'test'} (re)
1223 2 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 \(.*\) {'user': 'test'} (re)
1212 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 \(.*\) {'user': 'test'} (re)
1224 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 \(.*\) {'user': 'test'} (re)
1213 $ hg debugobsolete --delete 1 --delete 3
1225 $ hg debugobsolete --delete 1 --delete 3
1214 deleted 2 obsolescence markers
1226 deleted 2 obsolescence markers
1215 $ hg debugobsolete
1227 $ hg debugobsolete
1216 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 \(.*\) {'user': 'test'} (re)
1228 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 \(.*\) {'user': 'test'} (re)
1217 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 \(.*\) {'user': 'test'} (re)
1229 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 \(.*\) {'user': 'test'} (re)
1218 $ cd ..
1230 $ cd ..
1219
1231
General Comments 0
You need to be logged in to leave comments. Login now