##// END OF EJS Templates
config: use 'experimental.evolution.exchange'...
Boris Feld -
r34869:44797aed default
parent child Browse files
Show More
@@ -1,906 +1,906 b''
1 #require serve
1 #require serve
2
2
3 $ cat << EOF >> $HGRCPATH
3 $ cat << EOF >> $HGRCPATH
4 > [ui]
4 > [ui]
5 > logtemplate={rev}:{node|short} {desc|firstline}
5 > logtemplate={rev}:{node|short} {desc|firstline}
6 > [phases]
6 > [phases]
7 > publish=False
7 > publish=False
8 > [experimental]
8 > [experimental]
9 > evolution=exchange
10 > evolution.createmarkers=True
9 > evolution.createmarkers=True
10 > evolution.exchange=True
11 > EOF
11 > EOF
12
12
13 $ TESTHOOK='hooks.txnclose-bookmark.test=echo "test-hook-bookmark: $HG_BOOKMARK: $HG_OLDNODE -> $HG_NODE"'
13 $ TESTHOOK='hooks.txnclose-bookmark.test=echo "test-hook-bookmark: $HG_BOOKMARK: $HG_OLDNODE -> $HG_NODE"'
14
14
15 initialize
15 initialize
16
16
17 $ hg init a
17 $ hg init a
18 $ cd a
18 $ cd a
19 $ echo 'test' > test
19 $ echo 'test' > test
20 $ hg commit -Am'test'
20 $ hg commit -Am'test'
21 adding test
21 adding test
22
22
23 set bookmarks
23 set bookmarks
24
24
25 $ hg bookmark X
25 $ hg bookmark X
26 $ hg bookmark Y
26 $ hg bookmark Y
27 $ hg bookmark Z
27 $ hg bookmark Z
28
28
29 import bookmark by name
29 import bookmark by name
30
30
31 $ hg init ../b
31 $ hg init ../b
32 $ cd ../b
32 $ cd ../b
33 $ hg book Y
33 $ hg book Y
34 $ hg book
34 $ hg book
35 * Y -1:000000000000
35 * Y -1:000000000000
36 $ hg pull ../a --config "$TESTHOOK"
36 $ hg pull ../a --config "$TESTHOOK"
37 pulling from ../a
37 pulling from ../a
38 requesting all changes
38 requesting all changes
39 adding changesets
39 adding changesets
40 adding manifests
40 adding manifests
41 adding file changes
41 adding file changes
42 added 1 changesets with 1 changes to 1 files
42 added 1 changesets with 1 changes to 1 files
43 adding remote bookmark X
43 adding remote bookmark X
44 updating bookmark Y
44 updating bookmark Y
45 adding remote bookmark Z
45 adding remote bookmark Z
46 new changesets 4e3505fd9583
46 new changesets 4e3505fd9583
47 test-hook-bookmark: X: -> 4e3505fd95835d721066b76e75dbb8cc554d7f77
47 test-hook-bookmark: X: -> 4e3505fd95835d721066b76e75dbb8cc554d7f77
48 test-hook-bookmark: Y: 0000000000000000000000000000000000000000 -> 4e3505fd95835d721066b76e75dbb8cc554d7f77
48 test-hook-bookmark: Y: 0000000000000000000000000000000000000000 -> 4e3505fd95835d721066b76e75dbb8cc554d7f77
49 test-hook-bookmark: Z: -> 4e3505fd95835d721066b76e75dbb8cc554d7f77
49 test-hook-bookmark: Z: -> 4e3505fd95835d721066b76e75dbb8cc554d7f77
50 (run 'hg update' to get a working copy)
50 (run 'hg update' to get a working copy)
51 $ hg bookmarks
51 $ hg bookmarks
52 X 0:4e3505fd9583
52 X 0:4e3505fd9583
53 * Y 0:4e3505fd9583
53 * Y 0:4e3505fd9583
54 Z 0:4e3505fd9583
54 Z 0:4e3505fd9583
55 $ hg debugpushkey ../a namespaces
55 $ hg debugpushkey ../a namespaces
56 bookmarks
56 bookmarks
57 namespaces
57 namespaces
58 obsolete
58 obsolete
59 phases
59 phases
60 $ hg debugpushkey ../a bookmarks
60 $ hg debugpushkey ../a bookmarks
61 X 4e3505fd95835d721066b76e75dbb8cc554d7f77
61 X 4e3505fd95835d721066b76e75dbb8cc554d7f77
62 Y 4e3505fd95835d721066b76e75dbb8cc554d7f77
62 Y 4e3505fd95835d721066b76e75dbb8cc554d7f77
63 Z 4e3505fd95835d721066b76e75dbb8cc554d7f77
63 Z 4e3505fd95835d721066b76e75dbb8cc554d7f77
64
64
65 delete the bookmark to re-pull it
65 delete the bookmark to re-pull it
66
66
67 $ hg book -d X
67 $ hg book -d X
68 $ hg pull -B X ../a
68 $ hg pull -B X ../a
69 pulling from ../a
69 pulling from ../a
70 no changes found
70 no changes found
71 adding remote bookmark X
71 adding remote bookmark X
72
72
73 finally no-op pull
73 finally no-op pull
74
74
75 $ hg pull -B X ../a
75 $ hg pull -B X ../a
76 pulling from ../a
76 pulling from ../a
77 no changes found
77 no changes found
78 $ hg bookmark
78 $ hg bookmark
79 X 0:4e3505fd9583
79 X 0:4e3505fd9583
80 * Y 0:4e3505fd9583
80 * Y 0:4e3505fd9583
81 Z 0:4e3505fd9583
81 Z 0:4e3505fd9583
82
82
83 export bookmark by name
83 export bookmark by name
84
84
85 $ hg bookmark W
85 $ hg bookmark W
86 $ hg bookmark foo
86 $ hg bookmark foo
87 $ hg bookmark foobar
87 $ hg bookmark foobar
88 $ hg push -B W ../a
88 $ hg push -B W ../a
89 pushing to ../a
89 pushing to ../a
90 searching for changes
90 searching for changes
91 no changes found
91 no changes found
92 exporting bookmark W
92 exporting bookmark W
93 [1]
93 [1]
94 $ hg -R ../a bookmarks
94 $ hg -R ../a bookmarks
95 W -1:000000000000
95 W -1:000000000000
96 X 0:4e3505fd9583
96 X 0:4e3505fd9583
97 Y 0:4e3505fd9583
97 Y 0:4e3505fd9583
98 * Z 0:4e3505fd9583
98 * Z 0:4e3505fd9583
99
99
100 delete a remote bookmark
100 delete a remote bookmark
101
101
102 $ hg book -d W
102 $ hg book -d W
103 $ hg push -B W ../a --config "$TESTHOOK"
103 $ hg push -B W ../a --config "$TESTHOOK"
104 pushing to ../a
104 pushing to ../a
105 searching for changes
105 searching for changes
106 no changes found
106 no changes found
107 test-hook-bookmark: W: 0000000000000000000000000000000000000000 ->
107 test-hook-bookmark: W: 0000000000000000000000000000000000000000 ->
108 deleting remote bookmark W
108 deleting remote bookmark W
109 [1]
109 [1]
110
110
111 export the active bookmark
111 export the active bookmark
112
112
113 $ hg bookmark V
113 $ hg bookmark V
114 $ hg push -B . ../a
114 $ hg push -B . ../a
115 pushing to ../a
115 pushing to ../a
116 searching for changes
116 searching for changes
117 no changes found
117 no changes found
118 exporting bookmark V
118 exporting bookmark V
119 [1]
119 [1]
120
120
121 exporting the active bookmark with 'push -B .'
121 exporting the active bookmark with 'push -B .'
122 demand that one of the bookmarks is activated
122 demand that one of the bookmarks is activated
123
123
124 $ hg update -r default
124 $ hg update -r default
125 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
125 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
126 (leaving bookmark V)
126 (leaving bookmark V)
127 $ hg push -B . ../a
127 $ hg push -B . ../a
128 abort: no active bookmark
128 abort: no active bookmark
129 [255]
129 [255]
130 $ hg update -r V
130 $ hg update -r V
131 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
131 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
132 (activating bookmark V)
132 (activating bookmark V)
133
133
134 delete the bookmark
134 delete the bookmark
135
135
136 $ hg book -d V
136 $ hg book -d V
137 $ hg push -B V ../a
137 $ hg push -B V ../a
138 pushing to ../a
138 pushing to ../a
139 searching for changes
139 searching for changes
140 no changes found
140 no changes found
141 deleting remote bookmark V
141 deleting remote bookmark V
142 [1]
142 [1]
143 $ hg up foobar
143 $ hg up foobar
144 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
144 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
145 (activating bookmark foobar)
145 (activating bookmark foobar)
146
146
147 push/pull name that doesn't exist
147 push/pull name that doesn't exist
148
148
149 $ hg push -B badname ../a
149 $ hg push -B badname ../a
150 pushing to ../a
150 pushing to ../a
151 searching for changes
151 searching for changes
152 bookmark badname does not exist on the local or remote repository!
152 bookmark badname does not exist on the local or remote repository!
153 no changes found
153 no changes found
154 [2]
154 [2]
155 $ hg pull -B anotherbadname ../a
155 $ hg pull -B anotherbadname ../a
156 pulling from ../a
156 pulling from ../a
157 abort: remote bookmark anotherbadname not found!
157 abort: remote bookmark anotherbadname not found!
158 [255]
158 [255]
159
159
160 divergent bookmarks
160 divergent bookmarks
161
161
162 $ cd ../a
162 $ cd ../a
163 $ echo c1 > f1
163 $ echo c1 > f1
164 $ hg ci -Am1
164 $ hg ci -Am1
165 adding f1
165 adding f1
166 $ hg book -f @
166 $ hg book -f @
167 $ hg book -f X
167 $ hg book -f X
168 $ hg book
168 $ hg book
169 @ 1:0d2164f0ce0d
169 @ 1:0d2164f0ce0d
170 * X 1:0d2164f0ce0d
170 * X 1:0d2164f0ce0d
171 Y 0:4e3505fd9583
171 Y 0:4e3505fd9583
172 Z 1:0d2164f0ce0d
172 Z 1:0d2164f0ce0d
173
173
174 $ cd ../b
174 $ cd ../b
175 $ hg up --config
175 $ hg up --config
176 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
176 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
177 updating bookmark foobar
177 updating bookmark foobar
178 $ echo c2 > f2
178 $ echo c2 > f2
179 $ hg ci -Am2
179 $ hg ci -Am2
180 adding f2
180 adding f2
181 $ hg book -if @
181 $ hg book -if @
182 $ hg book -if X
182 $ hg book -if X
183 $ hg book
183 $ hg book
184 @ 1:9b140be10808
184 @ 1:9b140be10808
185 X 1:9b140be10808
185 X 1:9b140be10808
186 Y 0:4e3505fd9583
186 Y 0:4e3505fd9583
187 Z 0:4e3505fd9583
187 Z 0:4e3505fd9583
188 foo -1:000000000000
188 foo -1:000000000000
189 * foobar 1:9b140be10808
189 * foobar 1:9b140be10808
190
190
191 $ hg pull --config paths.foo=../a foo --config "$TESTHOOK"
191 $ hg pull --config paths.foo=../a foo --config "$TESTHOOK"
192 pulling from $TESTTMP/a (glob)
192 pulling from $TESTTMP/a (glob)
193 searching for changes
193 searching for changes
194 adding changesets
194 adding changesets
195 adding manifests
195 adding manifests
196 adding file changes
196 adding file changes
197 added 1 changesets with 1 changes to 1 files (+1 heads)
197 added 1 changesets with 1 changes to 1 files (+1 heads)
198 divergent bookmark @ stored as @foo
198 divergent bookmark @ stored as @foo
199 divergent bookmark X stored as X@foo
199 divergent bookmark X stored as X@foo
200 updating bookmark Z
200 updating bookmark Z
201 new changesets 0d2164f0ce0d
201 new changesets 0d2164f0ce0d
202 test-hook-bookmark: @foo: -> 0d2164f0ce0d8f1d6f94351eba04b794909be66c
202 test-hook-bookmark: @foo: -> 0d2164f0ce0d8f1d6f94351eba04b794909be66c
203 test-hook-bookmark: X@foo: -> 0d2164f0ce0d8f1d6f94351eba04b794909be66c
203 test-hook-bookmark: X@foo: -> 0d2164f0ce0d8f1d6f94351eba04b794909be66c
204 test-hook-bookmark: Z: 4e3505fd95835d721066b76e75dbb8cc554d7f77 -> 0d2164f0ce0d8f1d6f94351eba04b794909be66c
204 test-hook-bookmark: Z: 4e3505fd95835d721066b76e75dbb8cc554d7f77 -> 0d2164f0ce0d8f1d6f94351eba04b794909be66c
205 (run 'hg heads' to see heads, 'hg merge' to merge)
205 (run 'hg heads' to see heads, 'hg merge' to merge)
206 $ hg book
206 $ hg book
207 @ 1:9b140be10808
207 @ 1:9b140be10808
208 @foo 2:0d2164f0ce0d
208 @foo 2:0d2164f0ce0d
209 X 1:9b140be10808
209 X 1:9b140be10808
210 X@foo 2:0d2164f0ce0d
210 X@foo 2:0d2164f0ce0d
211 Y 0:4e3505fd9583
211 Y 0:4e3505fd9583
212 Z 2:0d2164f0ce0d
212 Z 2:0d2164f0ce0d
213 foo -1:000000000000
213 foo -1:000000000000
214 * foobar 1:9b140be10808
214 * foobar 1:9b140be10808
215
215
216 (test that too many divergence of bookmark)
216 (test that too many divergence of bookmark)
217
217
218 $ $PYTHON $TESTDIR/seq.py 1 100 | while read i; do hg bookmarks -r 000000000000 "X@${i}"; done
218 $ $PYTHON $TESTDIR/seq.py 1 100 | while read i; do hg bookmarks -r 000000000000 "X@${i}"; done
219 $ hg pull ../a
219 $ hg pull ../a
220 pulling from ../a
220 pulling from ../a
221 searching for changes
221 searching for changes
222 no changes found
222 no changes found
223 warning: failed to assign numbered name to divergent bookmark X
223 warning: failed to assign numbered name to divergent bookmark X
224 divergent bookmark @ stored as @1
224 divergent bookmark @ stored as @1
225 $ hg bookmarks | grep '^ X' | grep -v ':000000000000'
225 $ hg bookmarks | grep '^ X' | grep -v ':000000000000'
226 X 1:9b140be10808
226 X 1:9b140be10808
227 X@foo 2:0d2164f0ce0d
227 X@foo 2:0d2164f0ce0d
228
228
229 (test that remotely diverged bookmarks are reused if they aren't changed)
229 (test that remotely diverged bookmarks are reused if they aren't changed)
230
230
231 $ hg bookmarks | grep '^ @'
231 $ hg bookmarks | grep '^ @'
232 @ 1:9b140be10808
232 @ 1:9b140be10808
233 @1 2:0d2164f0ce0d
233 @1 2:0d2164f0ce0d
234 @foo 2:0d2164f0ce0d
234 @foo 2:0d2164f0ce0d
235 $ hg pull ../a
235 $ hg pull ../a
236 pulling from ../a
236 pulling from ../a
237 searching for changes
237 searching for changes
238 no changes found
238 no changes found
239 warning: failed to assign numbered name to divergent bookmark X
239 warning: failed to assign numbered name to divergent bookmark X
240 divergent bookmark @ stored as @1
240 divergent bookmark @ stored as @1
241 $ hg bookmarks | grep '^ @'
241 $ hg bookmarks | grep '^ @'
242 @ 1:9b140be10808
242 @ 1:9b140be10808
243 @1 2:0d2164f0ce0d
243 @1 2:0d2164f0ce0d
244 @foo 2:0d2164f0ce0d
244 @foo 2:0d2164f0ce0d
245
245
246 $ $PYTHON $TESTDIR/seq.py 1 100 | while read i; do hg bookmarks -d "X@${i}"; done
246 $ $PYTHON $TESTDIR/seq.py 1 100 | while read i; do hg bookmarks -d "X@${i}"; done
247 $ hg bookmarks -d "@1"
247 $ hg bookmarks -d "@1"
248
248
249 $ hg push -f ../a
249 $ hg push -f ../a
250 pushing to ../a
250 pushing to ../a
251 searching for changes
251 searching for changes
252 adding changesets
252 adding changesets
253 adding manifests
253 adding manifests
254 adding file changes
254 adding file changes
255 added 1 changesets with 1 changes to 1 files (+1 heads)
255 added 1 changesets with 1 changes to 1 files (+1 heads)
256 $ hg -R ../a book
256 $ hg -R ../a book
257 @ 1:0d2164f0ce0d
257 @ 1:0d2164f0ce0d
258 * X 1:0d2164f0ce0d
258 * X 1:0d2164f0ce0d
259 Y 0:4e3505fd9583
259 Y 0:4e3505fd9583
260 Z 1:0d2164f0ce0d
260 Z 1:0d2164f0ce0d
261
261
262 explicit pull should overwrite the local version (issue4439)
262 explicit pull should overwrite the local version (issue4439)
263
263
264 $ hg update -r X
264 $ hg update -r X
265 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
265 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
266 (activating bookmark X)
266 (activating bookmark X)
267 $ hg pull --config paths.foo=../a foo -B . --config "$TESTHOOK"
267 $ hg pull --config paths.foo=../a foo -B . --config "$TESTHOOK"
268 pulling from $TESTTMP/a (glob)
268 pulling from $TESTTMP/a (glob)
269 no changes found
269 no changes found
270 divergent bookmark @ stored as @foo
270 divergent bookmark @ stored as @foo
271 importing bookmark X
271 importing bookmark X
272 test-hook-bookmark: @foo: 0d2164f0ce0d8f1d6f94351eba04b794909be66c -> 0d2164f0ce0d8f1d6f94351eba04b794909be66c
272 test-hook-bookmark: @foo: 0d2164f0ce0d8f1d6f94351eba04b794909be66c -> 0d2164f0ce0d8f1d6f94351eba04b794909be66c
273 test-hook-bookmark: X: 9b140be1080824d768c5a4691a564088eede71f9 -> 0d2164f0ce0d8f1d6f94351eba04b794909be66c
273 test-hook-bookmark: X: 9b140be1080824d768c5a4691a564088eede71f9 -> 0d2164f0ce0d8f1d6f94351eba04b794909be66c
274
274
275 reinstall state for further testing:
275 reinstall state for further testing:
276
276
277 $ hg book -fr 9b140be10808 X
277 $ hg book -fr 9b140be10808 X
278
278
279 revsets should not ignore divergent bookmarks
279 revsets should not ignore divergent bookmarks
280
280
281 $ hg bookmark -fr 1 Z
281 $ hg bookmark -fr 1 Z
282 $ hg log -r 'bookmark()' --template '{rev}:{node|short} {bookmarks}\n'
282 $ hg log -r 'bookmark()' --template '{rev}:{node|short} {bookmarks}\n'
283 0:4e3505fd9583 Y
283 0:4e3505fd9583 Y
284 1:9b140be10808 @ X Z foobar
284 1:9b140be10808 @ X Z foobar
285 2:0d2164f0ce0d @foo X@foo
285 2:0d2164f0ce0d @foo X@foo
286 $ hg log -r 'bookmark("X@foo")' --template '{rev}:{node|short} {bookmarks}\n'
286 $ hg log -r 'bookmark("X@foo")' --template '{rev}:{node|short} {bookmarks}\n'
287 2:0d2164f0ce0d @foo X@foo
287 2:0d2164f0ce0d @foo X@foo
288 $ hg log -r 'bookmark("re:X@foo")' --template '{rev}:{node|short} {bookmarks}\n'
288 $ hg log -r 'bookmark("re:X@foo")' --template '{rev}:{node|short} {bookmarks}\n'
289 2:0d2164f0ce0d @foo X@foo
289 2:0d2164f0ce0d @foo X@foo
290
290
291 update a remote bookmark from a non-head to a head
291 update a remote bookmark from a non-head to a head
292
292
293 $ hg up -q Y
293 $ hg up -q Y
294 $ echo c3 > f2
294 $ echo c3 > f2
295 $ hg ci -Am3
295 $ hg ci -Am3
296 adding f2
296 adding f2
297 created new head
297 created new head
298 $ hg push ../a --config "$TESTHOOK"
298 $ hg push ../a --config "$TESTHOOK"
299 pushing to ../a
299 pushing to ../a
300 searching for changes
300 searching for changes
301 adding changesets
301 adding changesets
302 adding manifests
302 adding manifests
303 adding file changes
303 adding file changes
304 added 1 changesets with 1 changes to 1 files (+1 heads)
304 added 1 changesets with 1 changes to 1 files (+1 heads)
305 test-hook-bookmark: Y: 4e3505fd95835d721066b76e75dbb8cc554d7f77 -> f6fc62dde3c0771e29704af56ba4d8af77abcc2f
305 test-hook-bookmark: Y: 4e3505fd95835d721066b76e75dbb8cc554d7f77 -> f6fc62dde3c0771e29704af56ba4d8af77abcc2f
306 updating bookmark Y
306 updating bookmark Y
307 $ hg -R ../a book
307 $ hg -R ../a book
308 @ 1:0d2164f0ce0d
308 @ 1:0d2164f0ce0d
309 * X 1:0d2164f0ce0d
309 * X 1:0d2164f0ce0d
310 Y 3:f6fc62dde3c0
310 Y 3:f6fc62dde3c0
311 Z 1:0d2164f0ce0d
311 Z 1:0d2164f0ce0d
312
312
313 update a bookmark in the middle of a client pulling changes
313 update a bookmark in the middle of a client pulling changes
314
314
315 $ cd ..
315 $ cd ..
316 $ hg clone -q a pull-race
316 $ hg clone -q a pull-race
317
317
318 We want to use http because it is stateless and therefore more susceptible to
318 We want to use http because it is stateless and therefore more susceptible to
319 race conditions
319 race conditions
320
320
321 $ hg serve -R pull-race -p $HGPORT -d --pid-file=pull-race.pid -E main-error.log
321 $ hg serve -R pull-race -p $HGPORT -d --pid-file=pull-race.pid -E main-error.log
322 $ cat pull-race.pid >> $DAEMON_PIDS
322 $ cat pull-race.pid >> $DAEMON_PIDS
323
323
324 $ cat <<EOF > $TESTTMP/out_makecommit.sh
324 $ cat <<EOF > $TESTTMP/out_makecommit.sh
325 > #!/bin/sh
325 > #!/bin/sh
326 > hg ci -Am5
326 > hg ci -Am5
327 > echo committed in pull-race
327 > echo committed in pull-race
328 > EOF
328 > EOF
329
329
330 $ hg clone -q http://localhost:$HGPORT/ pull-race2 --config "$TESTHOOK"
330 $ hg clone -q http://localhost:$HGPORT/ pull-race2 --config "$TESTHOOK"
331 test-hook-bookmark: @: -> 0d2164f0ce0d8f1d6f94351eba04b794909be66c
331 test-hook-bookmark: @: -> 0d2164f0ce0d8f1d6f94351eba04b794909be66c
332 test-hook-bookmark: X: -> 0d2164f0ce0d8f1d6f94351eba04b794909be66c
332 test-hook-bookmark: X: -> 0d2164f0ce0d8f1d6f94351eba04b794909be66c
333 test-hook-bookmark: Y: -> f6fc62dde3c0771e29704af56ba4d8af77abcc2f
333 test-hook-bookmark: Y: -> f6fc62dde3c0771e29704af56ba4d8af77abcc2f
334 test-hook-bookmark: Z: -> 0d2164f0ce0d8f1d6f94351eba04b794909be66c
334 test-hook-bookmark: Z: -> 0d2164f0ce0d8f1d6f94351eba04b794909be66c
335 $ cd pull-race
335 $ cd pull-race
336 $ hg up -q Y
336 $ hg up -q Y
337 $ echo c4 > f2
337 $ echo c4 > f2
338 $ hg ci -Am4
338 $ hg ci -Am4
339 $ echo c5 > f3
339 $ echo c5 > f3
340 $ cat <<EOF > .hg/hgrc
340 $ cat <<EOF > .hg/hgrc
341 > [hooks]
341 > [hooks]
342 > outgoing.makecommit = sh $TESTTMP/out_makecommit.sh
342 > outgoing.makecommit = sh $TESTTMP/out_makecommit.sh
343 > EOF
343 > EOF
344
344
345 (new config needs a server restart)
345 (new config needs a server restart)
346
346
347 $ cd ..
347 $ cd ..
348 $ killdaemons.py
348 $ killdaemons.py
349 $ hg serve -R pull-race -p $HGPORT -d --pid-file=pull-race.pid -E main-error.log
349 $ hg serve -R pull-race -p $HGPORT -d --pid-file=pull-race.pid -E main-error.log
350 $ cat pull-race.pid >> $DAEMON_PIDS
350 $ cat pull-race.pid >> $DAEMON_PIDS
351 $ cd pull-race2
351 $ cd pull-race2
352 $ hg -R $TESTTMP/pull-race book
352 $ hg -R $TESTTMP/pull-race book
353 @ 1:0d2164f0ce0d
353 @ 1:0d2164f0ce0d
354 X 1:0d2164f0ce0d
354 X 1:0d2164f0ce0d
355 * Y 4:b0a5eff05604
355 * Y 4:b0a5eff05604
356 Z 1:0d2164f0ce0d
356 Z 1:0d2164f0ce0d
357 $ hg pull
357 $ hg pull
358 pulling from http://localhost:$HGPORT/
358 pulling from http://localhost:$HGPORT/
359 searching for changes
359 searching for changes
360 adding changesets
360 adding changesets
361 adding manifests
361 adding manifests
362 adding file changes
362 adding file changes
363 added 1 changesets with 1 changes to 1 files
363 added 1 changesets with 1 changes to 1 files
364 updating bookmark Y
364 updating bookmark Y
365 new changesets b0a5eff05604
365 new changesets b0a5eff05604
366 (run 'hg update' to get a working copy)
366 (run 'hg update' to get a working copy)
367 $ hg book
367 $ hg book
368 * @ 1:0d2164f0ce0d
368 * @ 1:0d2164f0ce0d
369 X 1:0d2164f0ce0d
369 X 1:0d2164f0ce0d
370 Y 4:b0a5eff05604
370 Y 4:b0a5eff05604
371 Z 1:0d2164f0ce0d
371 Z 1:0d2164f0ce0d
372
372
373 Update a bookmark right after the initial lookup -B (issue4689)
373 Update a bookmark right after the initial lookup -B (issue4689)
374
374
375 $ echo c6 > ../pull-race/f3 # to be committed during the race
375 $ echo c6 > ../pull-race/f3 # to be committed during the race
376 $ cat <<EOF > $TESTTMP/listkeys_makecommit.sh
376 $ cat <<EOF > $TESTTMP/listkeys_makecommit.sh
377 > #!/bin/sh
377 > #!/bin/sh
378 > if hg st | grep -q M; then
378 > if hg st | grep -q M; then
379 > hg commit -m race
379 > hg commit -m race
380 > echo committed in pull-race
380 > echo committed in pull-race
381 > else
381 > else
382 > exit 0
382 > exit 0
383 > fi
383 > fi
384 > EOF
384 > EOF
385 $ cat <<EOF > ../pull-race/.hg/hgrc
385 $ cat <<EOF > ../pull-race/.hg/hgrc
386 > [hooks]
386 > [hooks]
387 > # If anything to commit, commit it right after the first key listing used
387 > # If anything to commit, commit it right after the first key listing used
388 > # during lookup. This makes the commit appear before the actual getbundle
388 > # during lookup. This makes the commit appear before the actual getbundle
389 > # call.
389 > # call.
390 > listkeys.makecommit= sh $TESTTMP/listkeys_makecommit.sh
390 > listkeys.makecommit= sh $TESTTMP/listkeys_makecommit.sh
391 > EOF
391 > EOF
392
392
393 (new config need server restart)
393 (new config need server restart)
394
394
395 $ killdaemons.py
395 $ killdaemons.py
396 $ hg serve -R ../pull-race -p $HGPORT -d --pid-file=../pull-race.pid -E main-error.log
396 $ hg serve -R ../pull-race -p $HGPORT -d --pid-file=../pull-race.pid -E main-error.log
397 $ cat ../pull-race.pid >> $DAEMON_PIDS
397 $ cat ../pull-race.pid >> $DAEMON_PIDS
398
398
399 $ hg -R $TESTTMP/pull-race book
399 $ hg -R $TESTTMP/pull-race book
400 @ 1:0d2164f0ce0d
400 @ 1:0d2164f0ce0d
401 X 1:0d2164f0ce0d
401 X 1:0d2164f0ce0d
402 * Y 5:35d1ef0a8d1b
402 * Y 5:35d1ef0a8d1b
403 Z 1:0d2164f0ce0d
403 Z 1:0d2164f0ce0d
404 $ hg update -r Y
404 $ hg update -r Y
405 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
405 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
406 (activating bookmark Y)
406 (activating bookmark Y)
407 $ hg pull -B .
407 $ hg pull -B .
408 pulling from http://localhost:$HGPORT/
408 pulling from http://localhost:$HGPORT/
409 searching for changes
409 searching for changes
410 adding changesets
410 adding changesets
411 adding manifests
411 adding manifests
412 adding file changes
412 adding file changes
413 added 1 changesets with 1 changes to 1 files
413 added 1 changesets with 1 changes to 1 files
414 updating bookmark Y
414 updating bookmark Y
415 new changesets 35d1ef0a8d1b
415 new changesets 35d1ef0a8d1b
416 (run 'hg update' to get a working copy)
416 (run 'hg update' to get a working copy)
417 $ hg book
417 $ hg book
418 @ 1:0d2164f0ce0d
418 @ 1:0d2164f0ce0d
419 X 1:0d2164f0ce0d
419 X 1:0d2164f0ce0d
420 * Y 5:35d1ef0a8d1b
420 * Y 5:35d1ef0a8d1b
421 Z 1:0d2164f0ce0d
421 Z 1:0d2164f0ce0d
422
422
423 (done with this section of the test)
423 (done with this section of the test)
424
424
425 $ killdaemons.py
425 $ killdaemons.py
426 $ cd ../b
426 $ cd ../b
427
427
428 diverging a remote bookmark fails
428 diverging a remote bookmark fails
429
429
430 $ hg up -q 4e3505fd9583
430 $ hg up -q 4e3505fd9583
431 $ echo c4 > f2
431 $ echo c4 > f2
432 $ hg ci -Am4
432 $ hg ci -Am4
433 adding f2
433 adding f2
434 created new head
434 created new head
435 $ echo c5 > f2
435 $ echo c5 > f2
436 $ hg ci -Am5
436 $ hg ci -Am5
437 $ hg log -G
437 $ hg log -G
438 @ 5:c922c0139ca0 5
438 @ 5:c922c0139ca0 5
439 |
439 |
440 o 4:4efff6d98829 4
440 o 4:4efff6d98829 4
441 |
441 |
442 | o 3:f6fc62dde3c0 3
442 | o 3:f6fc62dde3c0 3
443 |/
443 |/
444 | o 2:0d2164f0ce0d 1
444 | o 2:0d2164f0ce0d 1
445 |/
445 |/
446 | o 1:9b140be10808 2
446 | o 1:9b140be10808 2
447 |/
447 |/
448 o 0:4e3505fd9583 test
448 o 0:4e3505fd9583 test
449
449
450
450
451 $ hg book -f Y
451 $ hg book -f Y
452
452
453 $ cat <<EOF > ../a/.hg/hgrc
453 $ cat <<EOF > ../a/.hg/hgrc
454 > [web]
454 > [web]
455 > push_ssl = false
455 > push_ssl = false
456 > allow_push = *
456 > allow_push = *
457 > EOF
457 > EOF
458
458
459 $ hg serve -R ../a -p $HGPORT2 -d --pid-file=../hg2.pid
459 $ hg serve -R ../a -p $HGPORT2 -d --pid-file=../hg2.pid
460 $ cat ../hg2.pid >> $DAEMON_PIDS
460 $ cat ../hg2.pid >> $DAEMON_PIDS
461
461
462 $ hg push http://localhost:$HGPORT2/
462 $ hg push http://localhost:$HGPORT2/
463 pushing to http://localhost:$HGPORT2/
463 pushing to http://localhost:$HGPORT2/
464 searching for changes
464 searching for changes
465 abort: push creates new remote head c922c0139ca0 with bookmark 'Y'!
465 abort: push creates new remote head c922c0139ca0 with bookmark 'Y'!
466 (merge or see 'hg help push' for details about pushing new heads)
466 (merge or see 'hg help push' for details about pushing new heads)
467 [255]
467 [255]
468 $ hg -R ../a book
468 $ hg -R ../a book
469 @ 1:0d2164f0ce0d
469 @ 1:0d2164f0ce0d
470 * X 1:0d2164f0ce0d
470 * X 1:0d2164f0ce0d
471 Y 3:f6fc62dde3c0
471 Y 3:f6fc62dde3c0
472 Z 1:0d2164f0ce0d
472 Z 1:0d2164f0ce0d
473
473
474
474
475 Unrelated marker does not alter the decision
475 Unrelated marker does not alter the decision
476
476
477 $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
477 $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
478 $ hg push http://localhost:$HGPORT2/
478 $ hg push http://localhost:$HGPORT2/
479 pushing to http://localhost:$HGPORT2/
479 pushing to http://localhost:$HGPORT2/
480 searching for changes
480 searching for changes
481 abort: push creates new remote head c922c0139ca0 with bookmark 'Y'!
481 abort: push creates new remote head c922c0139ca0 with bookmark 'Y'!
482 (merge or see 'hg help push' for details about pushing new heads)
482 (merge or see 'hg help push' for details about pushing new heads)
483 [255]
483 [255]
484 $ hg -R ../a book
484 $ hg -R ../a book
485 @ 1:0d2164f0ce0d
485 @ 1:0d2164f0ce0d
486 * X 1:0d2164f0ce0d
486 * X 1:0d2164f0ce0d
487 Y 3:f6fc62dde3c0
487 Y 3:f6fc62dde3c0
488 Z 1:0d2164f0ce0d
488 Z 1:0d2164f0ce0d
489
489
490 Update to a successor works
490 Update to a successor works
491
491
492 $ hg id --debug -r 3
492 $ hg id --debug -r 3
493 f6fc62dde3c0771e29704af56ba4d8af77abcc2f
493 f6fc62dde3c0771e29704af56ba4d8af77abcc2f
494 $ hg id --debug -r 4
494 $ hg id --debug -r 4
495 4efff6d98829d9c824c621afd6e3f01865f5439f
495 4efff6d98829d9c824c621afd6e3f01865f5439f
496 $ hg id --debug -r 5
496 $ hg id --debug -r 5
497 c922c0139ca03858f655e4a2af4dd02796a63969 tip Y
497 c922c0139ca03858f655e4a2af4dd02796a63969 tip Y
498 $ hg debugobsolete f6fc62dde3c0771e29704af56ba4d8af77abcc2f cccccccccccccccccccccccccccccccccccccccc
498 $ hg debugobsolete f6fc62dde3c0771e29704af56ba4d8af77abcc2f cccccccccccccccccccccccccccccccccccccccc
499 obsoleted 1 changesets
499 obsoleted 1 changesets
500 $ hg debugobsolete cccccccccccccccccccccccccccccccccccccccc 4efff6d98829d9c824c621afd6e3f01865f5439f
500 $ hg debugobsolete cccccccccccccccccccccccccccccccccccccccc 4efff6d98829d9c824c621afd6e3f01865f5439f
501 $ hg push http://localhost:$HGPORT2/
501 $ hg push http://localhost:$HGPORT2/
502 pushing to http://localhost:$HGPORT2/
502 pushing to http://localhost:$HGPORT2/
503 searching for changes
503 searching for changes
504 remote: adding changesets
504 remote: adding changesets
505 remote: adding manifests
505 remote: adding manifests
506 remote: adding file changes
506 remote: adding file changes
507 remote: added 2 changesets with 2 changes to 1 files (+1 heads)
507 remote: added 2 changesets with 2 changes to 1 files (+1 heads)
508 remote: 2 new obsolescence markers
508 remote: 2 new obsolescence markers
509 remote: obsoleted 1 changesets
509 remote: obsoleted 1 changesets
510 updating bookmark Y
510 updating bookmark Y
511 $ hg -R ../a book
511 $ hg -R ../a book
512 @ 1:0d2164f0ce0d
512 @ 1:0d2164f0ce0d
513 * X 1:0d2164f0ce0d
513 * X 1:0d2164f0ce0d
514 Y 5:c922c0139ca0
514 Y 5:c922c0139ca0
515 Z 1:0d2164f0ce0d
515 Z 1:0d2164f0ce0d
516
516
517 hgweb
517 hgweb
518
518
519 $ cat <<EOF > .hg/hgrc
519 $ cat <<EOF > .hg/hgrc
520 > [web]
520 > [web]
521 > push_ssl = false
521 > push_ssl = false
522 > allow_push = *
522 > allow_push = *
523 > EOF
523 > EOF
524
524
525 $ hg serve -p $HGPORT -d --pid-file=../hg.pid -E errors.log
525 $ hg serve -p $HGPORT -d --pid-file=../hg.pid -E errors.log
526 $ cat ../hg.pid >> $DAEMON_PIDS
526 $ cat ../hg.pid >> $DAEMON_PIDS
527 $ cd ../a
527 $ cd ../a
528
528
529 $ hg debugpushkey http://localhost:$HGPORT/ namespaces
529 $ hg debugpushkey http://localhost:$HGPORT/ namespaces
530 bookmarks
530 bookmarks
531 namespaces
531 namespaces
532 obsolete
532 obsolete
533 phases
533 phases
534 $ hg debugpushkey http://localhost:$HGPORT/ bookmarks
534 $ hg debugpushkey http://localhost:$HGPORT/ bookmarks
535 @ 9b140be1080824d768c5a4691a564088eede71f9
535 @ 9b140be1080824d768c5a4691a564088eede71f9
536 X 9b140be1080824d768c5a4691a564088eede71f9
536 X 9b140be1080824d768c5a4691a564088eede71f9
537 Y c922c0139ca03858f655e4a2af4dd02796a63969
537 Y c922c0139ca03858f655e4a2af4dd02796a63969
538 Z 9b140be1080824d768c5a4691a564088eede71f9
538 Z 9b140be1080824d768c5a4691a564088eede71f9
539 foo 0000000000000000000000000000000000000000
539 foo 0000000000000000000000000000000000000000
540 foobar 9b140be1080824d768c5a4691a564088eede71f9
540 foobar 9b140be1080824d768c5a4691a564088eede71f9
541 $ hg out -B http://localhost:$HGPORT/
541 $ hg out -B http://localhost:$HGPORT/
542 comparing with http://localhost:$HGPORT/
542 comparing with http://localhost:$HGPORT/
543 searching for changed bookmarks
543 searching for changed bookmarks
544 @ 0d2164f0ce0d
544 @ 0d2164f0ce0d
545 X 0d2164f0ce0d
545 X 0d2164f0ce0d
546 Z 0d2164f0ce0d
546 Z 0d2164f0ce0d
547 foo
547 foo
548 foobar
548 foobar
549 $ hg push -B Z http://localhost:$HGPORT/
549 $ hg push -B Z http://localhost:$HGPORT/
550 pushing to http://localhost:$HGPORT/
550 pushing to http://localhost:$HGPORT/
551 searching for changes
551 searching for changes
552 no changes found
552 no changes found
553 updating bookmark Z
553 updating bookmark Z
554 [1]
554 [1]
555 $ hg book -d Z
555 $ hg book -d Z
556 $ hg in -B http://localhost:$HGPORT/
556 $ hg in -B http://localhost:$HGPORT/
557 comparing with http://localhost:$HGPORT/
557 comparing with http://localhost:$HGPORT/
558 searching for changed bookmarks
558 searching for changed bookmarks
559 @ 9b140be10808
559 @ 9b140be10808
560 X 9b140be10808
560 X 9b140be10808
561 Z 0d2164f0ce0d
561 Z 0d2164f0ce0d
562 foo 000000000000
562 foo 000000000000
563 foobar 9b140be10808
563 foobar 9b140be10808
564 $ hg pull -B Z http://localhost:$HGPORT/
564 $ hg pull -B Z http://localhost:$HGPORT/
565 pulling from http://localhost:$HGPORT/
565 pulling from http://localhost:$HGPORT/
566 no changes found
566 no changes found
567 divergent bookmark @ stored as @1
567 divergent bookmark @ stored as @1
568 divergent bookmark X stored as X@1
568 divergent bookmark X stored as X@1
569 adding remote bookmark Z
569 adding remote bookmark Z
570 adding remote bookmark foo
570 adding remote bookmark foo
571 adding remote bookmark foobar
571 adding remote bookmark foobar
572 $ hg clone http://localhost:$HGPORT/ cloned-bookmarks
572 $ hg clone http://localhost:$HGPORT/ cloned-bookmarks
573 requesting all changes
573 requesting all changes
574 adding changesets
574 adding changesets
575 adding manifests
575 adding manifests
576 adding file changes
576 adding file changes
577 added 5 changesets with 5 changes to 3 files (+2 heads)
577 added 5 changesets with 5 changes to 3 files (+2 heads)
578 2 new obsolescence markers
578 2 new obsolescence markers
579 new changesets 4e3505fd9583:c922c0139ca0
579 new changesets 4e3505fd9583:c922c0139ca0
580 updating to bookmark @
580 updating to bookmark @
581 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
581 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
582 $ hg -R cloned-bookmarks bookmarks
582 $ hg -R cloned-bookmarks bookmarks
583 * @ 1:9b140be10808
583 * @ 1:9b140be10808
584 X 1:9b140be10808
584 X 1:9b140be10808
585 Y 4:c922c0139ca0
585 Y 4:c922c0139ca0
586 Z 2:0d2164f0ce0d
586 Z 2:0d2164f0ce0d
587 foo -1:000000000000
587 foo -1:000000000000
588 foobar 1:9b140be10808
588 foobar 1:9b140be10808
589
589
590 $ cd ..
590 $ cd ..
591
591
592 Test to show result of bookmarks comparison
592 Test to show result of bookmarks comparison
593
593
594 $ mkdir bmcomparison
594 $ mkdir bmcomparison
595 $ cd bmcomparison
595 $ cd bmcomparison
596
596
597 $ hg init source
597 $ hg init source
598 $ hg -R source debugbuilddag '+2*2*3*4'
598 $ hg -R source debugbuilddag '+2*2*3*4'
599 $ hg -R source log -G --template '{rev}:{node|short}'
599 $ hg -R source log -G --template '{rev}:{node|short}'
600 o 4:e7bd5218ca15
600 o 4:e7bd5218ca15
601 |
601 |
602 | o 3:6100d3090acf
602 | o 3:6100d3090acf
603 |/
603 |/
604 | o 2:fa942426a6fd
604 | o 2:fa942426a6fd
605 |/
605 |/
606 | o 1:66f7d451a68b
606 | o 1:66f7d451a68b
607 |/
607 |/
608 o 0:1ea73414a91b
608 o 0:1ea73414a91b
609
609
610 $ hg -R source bookmarks -r 0 SAME
610 $ hg -R source bookmarks -r 0 SAME
611 $ hg -R source bookmarks -r 0 ADV_ON_REPO1
611 $ hg -R source bookmarks -r 0 ADV_ON_REPO1
612 $ hg -R source bookmarks -r 0 ADV_ON_REPO2
612 $ hg -R source bookmarks -r 0 ADV_ON_REPO2
613 $ hg -R source bookmarks -r 0 DIFF_ADV_ON_REPO1
613 $ hg -R source bookmarks -r 0 DIFF_ADV_ON_REPO1
614 $ hg -R source bookmarks -r 0 DIFF_ADV_ON_REPO2
614 $ hg -R source bookmarks -r 0 DIFF_ADV_ON_REPO2
615 $ hg -R source bookmarks -r 1 DIVERGED
615 $ hg -R source bookmarks -r 1 DIVERGED
616
616
617 $ hg clone -U source repo1
617 $ hg clone -U source repo1
618
618
619 (test that incoming/outgoing exit with 1, if there is no bookmark to
619 (test that incoming/outgoing exit with 1, if there is no bookmark to
620 be exchanged)
620 be exchanged)
621
621
622 $ hg -R repo1 incoming -B
622 $ hg -R repo1 incoming -B
623 comparing with $TESTTMP/bmcomparison/source (glob)
623 comparing with $TESTTMP/bmcomparison/source (glob)
624 searching for changed bookmarks
624 searching for changed bookmarks
625 no changed bookmarks found
625 no changed bookmarks found
626 [1]
626 [1]
627 $ hg -R repo1 outgoing -B
627 $ hg -R repo1 outgoing -B
628 comparing with $TESTTMP/bmcomparison/source (glob)
628 comparing with $TESTTMP/bmcomparison/source (glob)
629 searching for changed bookmarks
629 searching for changed bookmarks
630 no changed bookmarks found
630 no changed bookmarks found
631 [1]
631 [1]
632
632
633 $ hg -R repo1 bookmarks -f -r 1 ADD_ON_REPO1
633 $ hg -R repo1 bookmarks -f -r 1 ADD_ON_REPO1
634 $ hg -R repo1 bookmarks -f -r 2 ADV_ON_REPO1
634 $ hg -R repo1 bookmarks -f -r 2 ADV_ON_REPO1
635 $ hg -R repo1 bookmarks -f -r 3 DIFF_ADV_ON_REPO1
635 $ hg -R repo1 bookmarks -f -r 3 DIFF_ADV_ON_REPO1
636 $ hg -R repo1 bookmarks -f -r 3 DIFF_DIVERGED
636 $ hg -R repo1 bookmarks -f -r 3 DIFF_DIVERGED
637 $ hg -R repo1 -q --config extensions.mq= strip 4
637 $ hg -R repo1 -q --config extensions.mq= strip 4
638 $ hg -R repo1 log -G --template '{node|short} ({bookmarks})'
638 $ hg -R repo1 log -G --template '{node|short} ({bookmarks})'
639 o 6100d3090acf (DIFF_ADV_ON_REPO1 DIFF_DIVERGED)
639 o 6100d3090acf (DIFF_ADV_ON_REPO1 DIFF_DIVERGED)
640 |
640 |
641 | o fa942426a6fd (ADV_ON_REPO1)
641 | o fa942426a6fd (ADV_ON_REPO1)
642 |/
642 |/
643 | o 66f7d451a68b (ADD_ON_REPO1 DIVERGED)
643 | o 66f7d451a68b (ADD_ON_REPO1 DIVERGED)
644 |/
644 |/
645 o 1ea73414a91b (ADV_ON_REPO2 DIFF_ADV_ON_REPO2 SAME)
645 o 1ea73414a91b (ADV_ON_REPO2 DIFF_ADV_ON_REPO2 SAME)
646
646
647
647
648 $ hg clone -U source repo2
648 $ hg clone -U source repo2
649 $ hg -R repo2 bookmarks -f -r 1 ADD_ON_REPO2
649 $ hg -R repo2 bookmarks -f -r 1 ADD_ON_REPO2
650 $ hg -R repo2 bookmarks -f -r 1 ADV_ON_REPO2
650 $ hg -R repo2 bookmarks -f -r 1 ADV_ON_REPO2
651 $ hg -R repo2 bookmarks -f -r 2 DIVERGED
651 $ hg -R repo2 bookmarks -f -r 2 DIVERGED
652 $ hg -R repo2 bookmarks -f -r 4 DIFF_ADV_ON_REPO2
652 $ hg -R repo2 bookmarks -f -r 4 DIFF_ADV_ON_REPO2
653 $ hg -R repo2 bookmarks -f -r 4 DIFF_DIVERGED
653 $ hg -R repo2 bookmarks -f -r 4 DIFF_DIVERGED
654 $ hg -R repo2 -q --config extensions.mq= strip 3
654 $ hg -R repo2 -q --config extensions.mq= strip 3
655 $ hg -R repo2 log -G --template '{node|short} ({bookmarks})'
655 $ hg -R repo2 log -G --template '{node|short} ({bookmarks})'
656 o e7bd5218ca15 (DIFF_ADV_ON_REPO2 DIFF_DIVERGED)
656 o e7bd5218ca15 (DIFF_ADV_ON_REPO2 DIFF_DIVERGED)
657 |
657 |
658 | o fa942426a6fd (DIVERGED)
658 | o fa942426a6fd (DIVERGED)
659 |/
659 |/
660 | o 66f7d451a68b (ADD_ON_REPO2 ADV_ON_REPO2)
660 | o 66f7d451a68b (ADD_ON_REPO2 ADV_ON_REPO2)
661 |/
661 |/
662 o 1ea73414a91b (ADV_ON_REPO1 DIFF_ADV_ON_REPO1 SAME)
662 o 1ea73414a91b (ADV_ON_REPO1 DIFF_ADV_ON_REPO1 SAME)
663
663
664
664
665 (test that difference of bookmarks between repositories are fully shown)
665 (test that difference of bookmarks between repositories are fully shown)
666
666
667 $ hg -R repo1 incoming -B repo2 -v
667 $ hg -R repo1 incoming -B repo2 -v
668 comparing with repo2
668 comparing with repo2
669 searching for changed bookmarks
669 searching for changed bookmarks
670 ADD_ON_REPO2 66f7d451a68b added
670 ADD_ON_REPO2 66f7d451a68b added
671 ADV_ON_REPO2 66f7d451a68b advanced
671 ADV_ON_REPO2 66f7d451a68b advanced
672 DIFF_ADV_ON_REPO2 e7bd5218ca15 changed
672 DIFF_ADV_ON_REPO2 e7bd5218ca15 changed
673 DIFF_DIVERGED e7bd5218ca15 changed
673 DIFF_DIVERGED e7bd5218ca15 changed
674 DIVERGED fa942426a6fd diverged
674 DIVERGED fa942426a6fd diverged
675 $ hg -R repo1 outgoing -B repo2 -v
675 $ hg -R repo1 outgoing -B repo2 -v
676 comparing with repo2
676 comparing with repo2
677 searching for changed bookmarks
677 searching for changed bookmarks
678 ADD_ON_REPO1 66f7d451a68b added
678 ADD_ON_REPO1 66f7d451a68b added
679 ADD_ON_REPO2 deleted
679 ADD_ON_REPO2 deleted
680 ADV_ON_REPO1 fa942426a6fd advanced
680 ADV_ON_REPO1 fa942426a6fd advanced
681 DIFF_ADV_ON_REPO1 6100d3090acf advanced
681 DIFF_ADV_ON_REPO1 6100d3090acf advanced
682 DIFF_ADV_ON_REPO2 1ea73414a91b changed
682 DIFF_ADV_ON_REPO2 1ea73414a91b changed
683 DIFF_DIVERGED 6100d3090acf changed
683 DIFF_DIVERGED 6100d3090acf changed
684 DIVERGED 66f7d451a68b diverged
684 DIVERGED 66f7d451a68b diverged
685
685
686 $ hg -R repo2 incoming -B repo1 -v
686 $ hg -R repo2 incoming -B repo1 -v
687 comparing with repo1
687 comparing with repo1
688 searching for changed bookmarks
688 searching for changed bookmarks
689 ADD_ON_REPO1 66f7d451a68b added
689 ADD_ON_REPO1 66f7d451a68b added
690 ADV_ON_REPO1 fa942426a6fd advanced
690 ADV_ON_REPO1 fa942426a6fd advanced
691 DIFF_ADV_ON_REPO1 6100d3090acf changed
691 DIFF_ADV_ON_REPO1 6100d3090acf changed
692 DIFF_DIVERGED 6100d3090acf changed
692 DIFF_DIVERGED 6100d3090acf changed
693 DIVERGED 66f7d451a68b diverged
693 DIVERGED 66f7d451a68b diverged
694 $ hg -R repo2 outgoing -B repo1 -v
694 $ hg -R repo2 outgoing -B repo1 -v
695 comparing with repo1
695 comparing with repo1
696 searching for changed bookmarks
696 searching for changed bookmarks
697 ADD_ON_REPO1 deleted
697 ADD_ON_REPO1 deleted
698 ADD_ON_REPO2 66f7d451a68b added
698 ADD_ON_REPO2 66f7d451a68b added
699 ADV_ON_REPO2 66f7d451a68b advanced
699 ADV_ON_REPO2 66f7d451a68b advanced
700 DIFF_ADV_ON_REPO1 1ea73414a91b changed
700 DIFF_ADV_ON_REPO1 1ea73414a91b changed
701 DIFF_ADV_ON_REPO2 e7bd5218ca15 advanced
701 DIFF_ADV_ON_REPO2 e7bd5218ca15 advanced
702 DIFF_DIVERGED e7bd5218ca15 changed
702 DIFF_DIVERGED e7bd5218ca15 changed
703 DIVERGED fa942426a6fd diverged
703 DIVERGED fa942426a6fd diverged
704
704
705 $ cd ..
705 $ cd ..
706
706
707 Pushing a bookmark should only push the changes required by that
707 Pushing a bookmark should only push the changes required by that
708 bookmark, not all outgoing changes:
708 bookmark, not all outgoing changes:
709 $ hg clone http://localhost:$HGPORT/ addmarks
709 $ hg clone http://localhost:$HGPORT/ addmarks
710 requesting all changes
710 requesting all changes
711 adding changesets
711 adding changesets
712 adding manifests
712 adding manifests
713 adding file changes
713 adding file changes
714 added 5 changesets with 5 changes to 3 files (+2 heads)
714 added 5 changesets with 5 changes to 3 files (+2 heads)
715 2 new obsolescence markers
715 2 new obsolescence markers
716 new changesets 4e3505fd9583:c922c0139ca0
716 new changesets 4e3505fd9583:c922c0139ca0
717 updating to bookmark @
717 updating to bookmark @
718 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
718 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
719 $ cd addmarks
719 $ cd addmarks
720 $ echo foo > foo
720 $ echo foo > foo
721 $ hg add foo
721 $ hg add foo
722 $ hg commit -m 'add foo'
722 $ hg commit -m 'add foo'
723 $ echo bar > bar
723 $ echo bar > bar
724 $ hg add bar
724 $ hg add bar
725 $ hg commit -m 'add bar'
725 $ hg commit -m 'add bar'
726 $ hg co "tip^"
726 $ hg co "tip^"
727 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
727 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
728 (leaving bookmark @)
728 (leaving bookmark @)
729 $ hg book add-foo
729 $ hg book add-foo
730 $ hg book -r tip add-bar
730 $ hg book -r tip add-bar
731 Note: this push *must* push only a single changeset, as that's the point
731 Note: this push *must* push only a single changeset, as that's the point
732 of this test.
732 of this test.
733 $ hg push -B add-foo --traceback
733 $ hg push -B add-foo --traceback
734 pushing to http://localhost:$HGPORT/
734 pushing to http://localhost:$HGPORT/
735 searching for changes
735 searching for changes
736 remote: adding changesets
736 remote: adding changesets
737 remote: adding manifests
737 remote: adding manifests
738 remote: adding file changes
738 remote: adding file changes
739 remote: added 1 changesets with 1 changes to 1 files
739 remote: added 1 changesets with 1 changes to 1 files
740 exporting bookmark add-foo
740 exporting bookmark add-foo
741
741
742 pushing a new bookmark on a new head does not require -f if -B is specified
742 pushing a new bookmark on a new head does not require -f if -B is specified
743
743
744 $ hg up -q X
744 $ hg up -q X
745 $ hg book W
745 $ hg book W
746 $ echo c5 > f2
746 $ echo c5 > f2
747 $ hg ci -Am5
747 $ hg ci -Am5
748 created new head
748 created new head
749 $ hg push -B .
749 $ hg push -B .
750 pushing to http://localhost:$HGPORT/
750 pushing to http://localhost:$HGPORT/
751 searching for changes
751 searching for changes
752 remote: adding changesets
752 remote: adding changesets
753 remote: adding manifests
753 remote: adding manifests
754 remote: adding file changes
754 remote: adding file changes
755 remote: added 1 changesets with 1 changes to 1 files (+1 heads)
755 remote: added 1 changesets with 1 changes to 1 files (+1 heads)
756 exporting bookmark W
756 exporting bookmark W
757 $ hg -R ../b id -r W
757 $ hg -R ../b id -r W
758 cc978a373a53 tip W
758 cc978a373a53 tip W
759
759
760 pushing an existing but divergent bookmark with -B still requires -f
760 pushing an existing but divergent bookmark with -B still requires -f
761
761
762 $ hg clone -q . ../r
762 $ hg clone -q . ../r
763 $ hg up -q X
763 $ hg up -q X
764 $ echo 1 > f2
764 $ echo 1 > f2
765 $ hg ci -qAml
765 $ hg ci -qAml
766
766
767 $ cd ../r
767 $ cd ../r
768 $ hg up -q X
768 $ hg up -q X
769 $ echo 2 > f2
769 $ echo 2 > f2
770 $ hg ci -qAmr
770 $ hg ci -qAmr
771 $ hg push -B X
771 $ hg push -B X
772 pushing to $TESTTMP/addmarks (glob)
772 pushing to $TESTTMP/addmarks (glob)
773 searching for changes
773 searching for changes
774 remote has heads on branch 'default' that are not known locally: a2a606d9ff1b
774 remote has heads on branch 'default' that are not known locally: a2a606d9ff1b
775 abort: push creates new remote head 54694f811df9 with bookmark 'X'!
775 abort: push creates new remote head 54694f811df9 with bookmark 'X'!
776 (pull and merge or see 'hg help push' for details about pushing new heads)
776 (pull and merge or see 'hg help push' for details about pushing new heads)
777 [255]
777 [255]
778 $ cd ../addmarks
778 $ cd ../addmarks
779
779
780 Check summary output for incoming/outgoing bookmarks
780 Check summary output for incoming/outgoing bookmarks
781
781
782 $ hg bookmarks -d X
782 $ hg bookmarks -d X
783 $ hg bookmarks -d Y
783 $ hg bookmarks -d Y
784 $ hg summary --remote | grep '^remote:'
784 $ hg summary --remote | grep '^remote:'
785 remote: *, 2 incoming bookmarks, 1 outgoing bookmarks (glob)
785 remote: *, 2 incoming bookmarks, 1 outgoing bookmarks (glob)
786
786
787 $ cd ..
787 $ cd ..
788
788
789 pushing an unchanged bookmark should result in no changes
789 pushing an unchanged bookmark should result in no changes
790
790
791 $ hg init unchanged-a
791 $ hg init unchanged-a
792 $ hg init unchanged-b
792 $ hg init unchanged-b
793 $ cd unchanged-a
793 $ cd unchanged-a
794 $ echo initial > foo
794 $ echo initial > foo
795 $ hg commit -A -m initial
795 $ hg commit -A -m initial
796 adding foo
796 adding foo
797 $ hg bookmark @
797 $ hg bookmark @
798 $ hg push -B @ ../unchanged-b
798 $ hg push -B @ ../unchanged-b
799 pushing to ../unchanged-b
799 pushing to ../unchanged-b
800 searching for changes
800 searching for changes
801 adding changesets
801 adding changesets
802 adding manifests
802 adding manifests
803 adding file changes
803 adding file changes
804 added 1 changesets with 1 changes to 1 files
804 added 1 changesets with 1 changes to 1 files
805 exporting bookmark @
805 exporting bookmark @
806
806
807 $ hg push -B @ ../unchanged-b
807 $ hg push -B @ ../unchanged-b
808 pushing to ../unchanged-b
808 pushing to ../unchanged-b
809 searching for changes
809 searching for changes
810 no changes found
810 no changes found
811 [1]
811 [1]
812
812
813
813
814 Check hook preventing push (issue4455)
814 Check hook preventing push (issue4455)
815 ======================================
815 ======================================
816
816
817 $ hg bookmarks
817 $ hg bookmarks
818 * @ 0:55482a6fb4b1
818 * @ 0:55482a6fb4b1
819 $ hg log -G
819 $ hg log -G
820 @ 0:55482a6fb4b1 initial
820 @ 0:55482a6fb4b1 initial
821
821
822 $ hg init ../issue4455-dest
822 $ hg init ../issue4455-dest
823 $ hg push ../issue4455-dest # changesets only
823 $ hg push ../issue4455-dest # changesets only
824 pushing to ../issue4455-dest
824 pushing to ../issue4455-dest
825 searching for changes
825 searching for changes
826 adding changesets
826 adding changesets
827 adding manifests
827 adding manifests
828 adding file changes
828 adding file changes
829 added 1 changesets with 1 changes to 1 files
829 added 1 changesets with 1 changes to 1 files
830 $ cat >> .hg/hgrc << EOF
830 $ cat >> .hg/hgrc << EOF
831 > [paths]
831 > [paths]
832 > local=../issue4455-dest/
832 > local=../issue4455-dest/
833 > ssh=ssh://user@dummy/issue4455-dest
833 > ssh=ssh://user@dummy/issue4455-dest
834 > http=http://localhost:$HGPORT/
834 > http=http://localhost:$HGPORT/
835 > [ui]
835 > [ui]
836 > ssh=$PYTHON "$TESTDIR/dummyssh"
836 > ssh=$PYTHON "$TESTDIR/dummyssh"
837 > EOF
837 > EOF
838 $ cat >> ../issue4455-dest/.hg/hgrc << EOF
838 $ cat >> ../issue4455-dest/.hg/hgrc << EOF
839 > [hooks]
839 > [hooks]
840 > prepushkey=false
840 > prepushkey=false
841 > [web]
841 > [web]
842 > push_ssl = false
842 > push_ssl = false
843 > allow_push = *
843 > allow_push = *
844 > EOF
844 > EOF
845 $ killdaemons.py
845 $ killdaemons.py
846 $ hg serve -R ../issue4455-dest -p $HGPORT -d --pid-file=../issue4455.pid -E ../issue4455-error.log
846 $ hg serve -R ../issue4455-dest -p $HGPORT -d --pid-file=../issue4455.pid -E ../issue4455-error.log
847 $ cat ../issue4455.pid >> $DAEMON_PIDS
847 $ cat ../issue4455.pid >> $DAEMON_PIDS
848
848
849 Local push
849 Local push
850 ----------
850 ----------
851
851
852 $ hg push -B @ local
852 $ hg push -B @ local
853 pushing to $TESTTMP/issue4455-dest (glob)
853 pushing to $TESTTMP/issue4455-dest (glob)
854 searching for changes
854 searching for changes
855 no changes found
855 no changes found
856 pushkey-abort: prepushkey hook exited with status 1
856 pushkey-abort: prepushkey hook exited with status 1
857 abort: exporting bookmark @ failed!
857 abort: exporting bookmark @ failed!
858 [255]
858 [255]
859 $ hg -R ../issue4455-dest/ bookmarks
859 $ hg -R ../issue4455-dest/ bookmarks
860 no bookmarks set
860 no bookmarks set
861
861
862 Using ssh
862 Using ssh
863 ---------
863 ---------
864
864
865 $ hg push -B @ ssh # bundle2+
865 $ hg push -B @ ssh # bundle2+
866 pushing to ssh://user@dummy/issue4455-dest
866 pushing to ssh://user@dummy/issue4455-dest
867 searching for changes
867 searching for changes
868 no changes found
868 no changes found
869 remote: pushkey-abort: prepushkey hook exited with status 1
869 remote: pushkey-abort: prepushkey hook exited with status 1
870 abort: exporting bookmark @ failed!
870 abort: exporting bookmark @ failed!
871 [255]
871 [255]
872 $ hg -R ../issue4455-dest/ bookmarks
872 $ hg -R ../issue4455-dest/ bookmarks
873 no bookmarks set
873 no bookmarks set
874
874
875 $ hg push -B @ ssh --config devel.legacy.exchange=bundle1
875 $ hg push -B @ ssh --config devel.legacy.exchange=bundle1
876 pushing to ssh://user@dummy/issue4455-dest
876 pushing to ssh://user@dummy/issue4455-dest
877 searching for changes
877 searching for changes
878 no changes found
878 no changes found
879 remote: pushkey-abort: prepushkey hook exited with status 1
879 remote: pushkey-abort: prepushkey hook exited with status 1
880 exporting bookmark @ failed!
880 exporting bookmark @ failed!
881 [1]
881 [1]
882 $ hg -R ../issue4455-dest/ bookmarks
882 $ hg -R ../issue4455-dest/ bookmarks
883 no bookmarks set
883 no bookmarks set
884
884
885 Using http
885 Using http
886 ----------
886 ----------
887
887
888 $ hg push -B @ http # bundle2+
888 $ hg push -B @ http # bundle2+
889 pushing to http://localhost:$HGPORT/
889 pushing to http://localhost:$HGPORT/
890 searching for changes
890 searching for changes
891 no changes found
891 no changes found
892 remote: pushkey-abort: prepushkey hook exited with status 1
892 remote: pushkey-abort: prepushkey hook exited with status 1
893 abort: exporting bookmark @ failed!
893 abort: exporting bookmark @ failed!
894 [255]
894 [255]
895 $ hg -R ../issue4455-dest/ bookmarks
895 $ hg -R ../issue4455-dest/ bookmarks
896 no bookmarks set
896 no bookmarks set
897
897
898 $ hg push -B @ http --config devel.legacy.exchange=bundle1
898 $ hg push -B @ http --config devel.legacy.exchange=bundle1
899 pushing to http://localhost:$HGPORT/
899 pushing to http://localhost:$HGPORT/
900 searching for changes
900 searching for changes
901 no changes found
901 no changes found
902 remote: pushkey-abort: prepushkey hook exited with status 1
902 remote: pushkey-abort: prepushkey hook exited with status 1
903 exporting bookmark @ failed!
903 exporting bookmark @ failed!
904 [1]
904 [1]
905 $ hg -R ../issue4455-dest/ bookmarks
905 $ hg -R ../issue4455-dest/ bookmarks
906 no bookmarks set
906 no bookmarks set
@@ -1,1148 +1,1148 b''
1 Test exchange of common information using bundle2
1 Test exchange of common information using bundle2
2
2
3
3
4 $ getmainid() {
4 $ getmainid() {
5 > hg -R main log --template '{node}\n' --rev "$1"
5 > hg -R main log --template '{node}\n' --rev "$1"
6 > }
6 > }
7
7
8 enable obsolescence
8 enable obsolescence
9
9
10 $ cp $HGRCPATH $TESTTMP/hgrc.orig
10 $ cp $HGRCPATH $TESTTMP/hgrc.orig
11 $ cat > $TESTTMP/bundle2-pushkey-hook.sh << EOF
11 $ cat > $TESTTMP/bundle2-pushkey-hook.sh << EOF
12 > echo pushkey: lock state after \"\$HG_NAMESPACE\"
12 > echo pushkey: lock state after \"\$HG_NAMESPACE\"
13 > hg debuglock
13 > hg debuglock
14 > EOF
14 > EOF
15
15
16 $ cat >> $HGRCPATH << EOF
16 $ cat >> $HGRCPATH << EOF
17 > [experimental]
17 > [experimental]
18 > evolution=exchange
19 > evolution.createmarkers=True
18 > evolution.createmarkers=True
19 > evolution.exchange=True
20 > bundle2-output-capture=True
20 > bundle2-output-capture=True
21 > [ui]
21 > [ui]
22 > ssh="$PYTHON" "$TESTDIR/dummyssh"
22 > ssh="$PYTHON" "$TESTDIR/dummyssh"
23 > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline}
23 > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline}
24 > [web]
24 > [web]
25 > push_ssl = false
25 > push_ssl = false
26 > allow_push = *
26 > allow_push = *
27 > [phases]
27 > [phases]
28 > publish=False
28 > publish=False
29 > [hooks]
29 > [hooks]
30 > pretxnclose.tip = hg log -r tip -T "pre-close-tip:{node|short} {phase} {bookmarks}\n"
30 > pretxnclose.tip = hg log -r tip -T "pre-close-tip:{node|short} {phase} {bookmarks}\n"
31 > txnclose.tip = hg log -r tip -T "postclose-tip:{node|short} {phase} {bookmarks}\n"
31 > txnclose.tip = hg log -r tip -T "postclose-tip:{node|short} {phase} {bookmarks}\n"
32 > txnclose.env = sh -c "HG_LOCAL= printenv.py txnclose"
32 > txnclose.env = sh -c "HG_LOCAL= printenv.py txnclose"
33 > pushkey= sh "$TESTTMP/bundle2-pushkey-hook.sh"
33 > pushkey= sh "$TESTTMP/bundle2-pushkey-hook.sh"
34 > EOF
34 > EOF
35
35
36 The extension requires a repo (currently unused)
36 The extension requires a repo (currently unused)
37
37
38 $ hg init main
38 $ hg init main
39 $ cd main
39 $ cd main
40 $ touch a
40 $ touch a
41 $ hg add a
41 $ hg add a
42 $ hg commit -m 'a'
42 $ hg commit -m 'a'
43 pre-close-tip:3903775176ed draft
43 pre-close-tip:3903775176ed draft
44 postclose-tip:3903775176ed draft
44 postclose-tip:3903775176ed draft
45 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
45 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
46
46
47 $ hg unbundle $TESTDIR/bundles/rebase.hg
47 $ hg unbundle $TESTDIR/bundles/rebase.hg
48 adding changesets
48 adding changesets
49 adding manifests
49 adding manifests
50 adding file changes
50 adding file changes
51 added 8 changesets with 7 changes to 7 files (+3 heads)
51 added 8 changesets with 7 changes to 7 files (+3 heads)
52 pre-close-tip:02de42196ebe draft
52 pre-close-tip:02de42196ebe draft
53 new changesets cd010b8cd998:02de42196ebe
53 new changesets cd010b8cd998:02de42196ebe
54 postclose-tip:02de42196ebe draft
54 postclose-tip:02de42196ebe draft
55 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_NODE_LAST=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_PHASES_MOVED=1 HG_SOURCE=unbundle HG_TXNID=TXN:$ID$ HG_TXNNAME=unbundle
55 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_NODE_LAST=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_PHASES_MOVED=1 HG_SOURCE=unbundle HG_TXNID=TXN:$ID$ HG_TXNNAME=unbundle
56 bundle:*/tests/bundles/rebase.hg HG_URL=bundle:*/tests/bundles/rebase.hg (glob)
56 bundle:*/tests/bundles/rebase.hg HG_URL=bundle:*/tests/bundles/rebase.hg (glob)
57 (run 'hg heads' to see heads, 'hg merge' to merge)
57 (run 'hg heads' to see heads, 'hg merge' to merge)
58
58
59 $ cd ..
59 $ cd ..
60
60
61 Real world exchange
61 Real world exchange
62 =====================
62 =====================
63
63
64 Add more obsolescence information
64 Add more obsolescence information
65
65
66 $ hg -R main debugobsolete -d '0 0' 1111111111111111111111111111111111111111 `getmainid 9520eea781bc`
66 $ hg -R main debugobsolete -d '0 0' 1111111111111111111111111111111111111111 `getmainid 9520eea781bc`
67 pre-close-tip:02de42196ebe draft
67 pre-close-tip:02de42196ebe draft
68 postclose-tip:02de42196ebe draft
68 postclose-tip:02de42196ebe draft
69 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
69 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
70 $ hg -R main debugobsolete -d '0 0' 2222222222222222222222222222222222222222 `getmainid 24b6387c8c8c`
70 $ hg -R main debugobsolete -d '0 0' 2222222222222222222222222222222222222222 `getmainid 24b6387c8c8c`
71 pre-close-tip:02de42196ebe draft
71 pre-close-tip:02de42196ebe draft
72 postclose-tip:02de42196ebe draft
72 postclose-tip:02de42196ebe draft
73 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
73 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
74
74
75 clone --pull
75 clone --pull
76
76
77 $ hg -R main phase --public cd010b8cd998
77 $ hg -R main phase --public cd010b8cd998
78 pre-close-tip:02de42196ebe draft
78 pre-close-tip:02de42196ebe draft
79 postclose-tip:02de42196ebe draft
79 postclose-tip:02de42196ebe draft
80 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
80 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
81 $ hg clone main other --pull --rev 9520eea781bc
81 $ hg clone main other --pull --rev 9520eea781bc
82 adding changesets
82 adding changesets
83 adding manifests
83 adding manifests
84 adding file changes
84 adding file changes
85 added 2 changesets with 2 changes to 2 files
85 added 2 changesets with 2 changes to 2 files
86 1 new obsolescence markers
86 1 new obsolescence markers
87 pre-close-tip:9520eea781bc draft
87 pre-close-tip:9520eea781bc draft
88 new changesets cd010b8cd998:9520eea781bc
88 new changesets cd010b8cd998:9520eea781bc
89 postclose-tip:9520eea781bc draft
89 postclose-tip:9520eea781bc draft
90 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_NODE_LAST=9520eea781bcca16c1e15acc0ba14335a0e8e5ba HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
90 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_NODE_LAST=9520eea781bcca16c1e15acc0ba14335a0e8e5ba HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
91 file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
91 file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
92 updating to branch default
92 updating to branch default
93 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
93 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
94 $ hg -R other log -G
94 $ hg -R other log -G
95 @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
95 @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
96 |
96 |
97 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
97 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
98
98
99 $ hg -R other debugobsolete
99 $ hg -R other debugobsolete
100 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
100 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
101
101
102 pull
102 pull
103
103
104 $ hg -R main phase --public 9520eea781bc
104 $ hg -R main phase --public 9520eea781bc
105 pre-close-tip:02de42196ebe draft
105 pre-close-tip:02de42196ebe draft
106 postclose-tip:02de42196ebe draft
106 postclose-tip:02de42196ebe draft
107 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
107 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
108 $ hg -R other pull -r 24b6387c8c8c
108 $ hg -R other pull -r 24b6387c8c8c
109 pulling from $TESTTMP/main (glob)
109 pulling from $TESTTMP/main (glob)
110 searching for changes
110 searching for changes
111 adding changesets
111 adding changesets
112 adding manifests
112 adding manifests
113 adding file changes
113 adding file changes
114 added 1 changesets with 1 changes to 1 files (+1 heads)
114 added 1 changesets with 1 changes to 1 files (+1 heads)
115 1 new obsolescence markers
115 1 new obsolescence markers
116 pre-close-tip:24b6387c8c8c draft
116 pre-close-tip:24b6387c8c8c draft
117 new changesets 24b6387c8c8c
117 new changesets 24b6387c8c8c
118 postclose-tip:24b6387c8c8c draft
118 postclose-tip:24b6387c8c8c draft
119 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_NODE_LAST=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
119 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_NODE_LAST=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
120 file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
120 file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
121 (run 'hg heads' to see heads, 'hg merge' to merge)
121 (run 'hg heads' to see heads, 'hg merge' to merge)
122 $ hg -R other log -G
122 $ hg -R other log -G
123 o 2:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F
123 o 2:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F
124 |
124 |
125 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
125 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
126 |/
126 |/
127 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
127 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
128
128
129 $ hg -R other debugobsolete
129 $ hg -R other debugobsolete
130 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
130 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
131 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
131 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
132
132
133 pull empty (with phase movement)
133 pull empty (with phase movement)
134
134
135 $ hg -R main phase --public 24b6387c8c8c
135 $ hg -R main phase --public 24b6387c8c8c
136 pre-close-tip:02de42196ebe draft
136 pre-close-tip:02de42196ebe draft
137 postclose-tip:02de42196ebe draft
137 postclose-tip:02de42196ebe draft
138 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
138 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
139 $ hg -R other pull -r 24b6387c8c8c
139 $ hg -R other pull -r 24b6387c8c8c
140 pulling from $TESTTMP/main (glob)
140 pulling from $TESTTMP/main (glob)
141 no changes found
141 no changes found
142 pre-close-tip:24b6387c8c8c public
142 pre-close-tip:24b6387c8c8c public
143 postclose-tip:24b6387c8c8c public
143 postclose-tip:24b6387c8c8c public
144 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=0 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
144 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=0 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
145 file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
145 file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
146 $ hg -R other log -G
146 $ hg -R other log -G
147 o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
147 o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
148 |
148 |
149 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
149 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
150 |/
150 |/
151 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
151 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
152
152
153 $ hg -R other debugobsolete
153 $ hg -R other debugobsolete
154 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
154 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
155 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
155 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
156
156
157 pull empty
157 pull empty
158
158
159 $ hg -R other pull -r 24b6387c8c8c
159 $ hg -R other pull -r 24b6387c8c8c
160 pulling from $TESTTMP/main (glob)
160 pulling from $TESTTMP/main (glob)
161 no changes found
161 no changes found
162 pre-close-tip:24b6387c8c8c public
162 pre-close-tip:24b6387c8c8c public
163 postclose-tip:24b6387c8c8c public
163 postclose-tip:24b6387c8c8c public
164 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=0 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
164 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=0 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
165 file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
165 file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
166 $ hg -R other log -G
166 $ hg -R other log -G
167 o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
167 o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
168 |
168 |
169 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
169 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
170 |/
170 |/
171 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
171 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
172
172
173 $ hg -R other debugobsolete
173 $ hg -R other debugobsolete
174 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
174 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
175 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
175 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
176
176
177 add extra data to test their exchange during push
177 add extra data to test their exchange during push
178
178
179 $ hg -R main bookmark --rev eea13746799a book_eea1
179 $ hg -R main bookmark --rev eea13746799a book_eea1
180 pre-close-tip:02de42196ebe draft
180 pre-close-tip:02de42196ebe draft
181 postclose-tip:02de42196ebe draft
181 postclose-tip:02de42196ebe draft
182 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
182 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
183 $ hg -R main debugobsolete -d '0 0' 3333333333333333333333333333333333333333 `getmainid eea13746799a`
183 $ hg -R main debugobsolete -d '0 0' 3333333333333333333333333333333333333333 `getmainid eea13746799a`
184 pre-close-tip:02de42196ebe draft
184 pre-close-tip:02de42196ebe draft
185 postclose-tip:02de42196ebe draft
185 postclose-tip:02de42196ebe draft
186 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
186 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
187 $ hg -R main bookmark --rev 02de42196ebe book_02de
187 $ hg -R main bookmark --rev 02de42196ebe book_02de
188 pre-close-tip:02de42196ebe draft book_02de
188 pre-close-tip:02de42196ebe draft book_02de
189 postclose-tip:02de42196ebe draft book_02de
189 postclose-tip:02de42196ebe draft book_02de
190 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
190 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
191 $ hg -R main debugobsolete -d '0 0' 4444444444444444444444444444444444444444 `getmainid 02de42196ebe`
191 $ hg -R main debugobsolete -d '0 0' 4444444444444444444444444444444444444444 `getmainid 02de42196ebe`
192 pre-close-tip:02de42196ebe draft book_02de
192 pre-close-tip:02de42196ebe draft book_02de
193 postclose-tip:02de42196ebe draft book_02de
193 postclose-tip:02de42196ebe draft book_02de
194 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
194 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
195 $ hg -R main bookmark --rev 42ccdea3bb16 book_42cc
195 $ hg -R main bookmark --rev 42ccdea3bb16 book_42cc
196 pre-close-tip:02de42196ebe draft book_02de
196 pre-close-tip:02de42196ebe draft book_02de
197 postclose-tip:02de42196ebe draft book_02de
197 postclose-tip:02de42196ebe draft book_02de
198 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
198 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
199 $ hg -R main debugobsolete -d '0 0' 5555555555555555555555555555555555555555 `getmainid 42ccdea3bb16`
199 $ hg -R main debugobsolete -d '0 0' 5555555555555555555555555555555555555555 `getmainid 42ccdea3bb16`
200 pre-close-tip:02de42196ebe draft book_02de
200 pre-close-tip:02de42196ebe draft book_02de
201 postclose-tip:02de42196ebe draft book_02de
201 postclose-tip:02de42196ebe draft book_02de
202 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
202 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
203 $ hg -R main bookmark --rev 5fddd98957c8 book_5fdd
203 $ hg -R main bookmark --rev 5fddd98957c8 book_5fdd
204 pre-close-tip:02de42196ebe draft book_02de
204 pre-close-tip:02de42196ebe draft book_02de
205 postclose-tip:02de42196ebe draft book_02de
205 postclose-tip:02de42196ebe draft book_02de
206 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
206 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
207 $ hg -R main debugobsolete -d '0 0' 6666666666666666666666666666666666666666 `getmainid 5fddd98957c8`
207 $ hg -R main debugobsolete -d '0 0' 6666666666666666666666666666666666666666 `getmainid 5fddd98957c8`
208 pre-close-tip:02de42196ebe draft book_02de
208 pre-close-tip:02de42196ebe draft book_02de
209 postclose-tip:02de42196ebe draft book_02de
209 postclose-tip:02de42196ebe draft book_02de
210 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
210 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
211 $ hg -R main bookmark --rev 32af7686d403 book_32af
211 $ hg -R main bookmark --rev 32af7686d403 book_32af
212 pre-close-tip:02de42196ebe draft book_02de
212 pre-close-tip:02de42196ebe draft book_02de
213 postclose-tip:02de42196ebe draft book_02de
213 postclose-tip:02de42196ebe draft book_02de
214 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
214 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
215 $ hg -R main debugobsolete -d '0 0' 7777777777777777777777777777777777777777 `getmainid 32af7686d403`
215 $ hg -R main debugobsolete -d '0 0' 7777777777777777777777777777777777777777 `getmainid 32af7686d403`
216 pre-close-tip:02de42196ebe draft book_02de
216 pre-close-tip:02de42196ebe draft book_02de
217 postclose-tip:02de42196ebe draft book_02de
217 postclose-tip:02de42196ebe draft book_02de
218 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
218 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
219
219
220 $ hg -R other bookmark --rev cd010b8cd998 book_eea1
220 $ hg -R other bookmark --rev cd010b8cd998 book_eea1
221 pre-close-tip:24b6387c8c8c public
221 pre-close-tip:24b6387c8c8c public
222 postclose-tip:24b6387c8c8c public
222 postclose-tip:24b6387c8c8c public
223 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
223 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
224 $ hg -R other bookmark --rev cd010b8cd998 book_02de
224 $ hg -R other bookmark --rev cd010b8cd998 book_02de
225 pre-close-tip:24b6387c8c8c public
225 pre-close-tip:24b6387c8c8c public
226 postclose-tip:24b6387c8c8c public
226 postclose-tip:24b6387c8c8c public
227 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
227 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
228 $ hg -R other bookmark --rev cd010b8cd998 book_42cc
228 $ hg -R other bookmark --rev cd010b8cd998 book_42cc
229 pre-close-tip:24b6387c8c8c public
229 pre-close-tip:24b6387c8c8c public
230 postclose-tip:24b6387c8c8c public
230 postclose-tip:24b6387c8c8c public
231 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
231 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
232 $ hg -R other bookmark --rev cd010b8cd998 book_5fdd
232 $ hg -R other bookmark --rev cd010b8cd998 book_5fdd
233 pre-close-tip:24b6387c8c8c public
233 pre-close-tip:24b6387c8c8c public
234 postclose-tip:24b6387c8c8c public
234 postclose-tip:24b6387c8c8c public
235 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
235 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
236 $ hg -R other bookmark --rev cd010b8cd998 book_32af
236 $ hg -R other bookmark --rev cd010b8cd998 book_32af
237 pre-close-tip:24b6387c8c8c public
237 pre-close-tip:24b6387c8c8c public
238 postclose-tip:24b6387c8c8c public
238 postclose-tip:24b6387c8c8c public
239 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
239 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
240
240
241 $ hg -R main phase --public eea13746799a
241 $ hg -R main phase --public eea13746799a
242 pre-close-tip:02de42196ebe draft book_02de
242 pre-close-tip:02de42196ebe draft book_02de
243 postclose-tip:02de42196ebe draft book_02de
243 postclose-tip:02de42196ebe draft book_02de
244 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
244 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
245
245
246 push
246 push
247 $ hg -R main push other --rev eea13746799a --bookmark book_eea1
247 $ hg -R main push other --rev eea13746799a --bookmark book_eea1
248 pushing to other
248 pushing to other
249 searching for changes
249 searching for changes
250 remote: adding changesets
250 remote: adding changesets
251 remote: adding manifests
251 remote: adding manifests
252 remote: adding file changes
252 remote: adding file changes
253 remote: added 1 changesets with 0 changes to 0 files (-1 heads)
253 remote: added 1 changesets with 0 changes to 0 files (-1 heads)
254 remote: 1 new obsolescence markers
254 remote: 1 new obsolescence markers
255 remote: pre-close-tip:eea13746799a public book_eea1
255 remote: pre-close-tip:eea13746799a public book_eea1
256 remote: pushkey: lock state after "bookmarks"
256 remote: pushkey: lock state after "bookmarks"
257 remote: lock: free
257 remote: lock: free
258 remote: wlock: free
258 remote: wlock: free
259 remote: postclose-tip:eea13746799a public book_eea1
259 remote: postclose-tip:eea13746799a public book_eea1
260 remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=eea13746799a9e0bfd88f29d3c2e9dc9389f524f HG_NODE_LAST=eea13746799a9e0bfd88f29d3c2e9dc9389f524f HG_PHASES_MOVED=1 HG_SOURCE=push HG_TXNID=TXN:$ID$ HG_TXNNAME=push HG_URL=file:$TESTTMP/other
260 remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=eea13746799a9e0bfd88f29d3c2e9dc9389f524f HG_NODE_LAST=eea13746799a9e0bfd88f29d3c2e9dc9389f524f HG_PHASES_MOVED=1 HG_SOURCE=push HG_TXNID=TXN:$ID$ HG_TXNNAME=push HG_URL=file:$TESTTMP/other
261 updating bookmark book_eea1
261 updating bookmark book_eea1
262 pre-close-tip:02de42196ebe draft book_02de
262 pre-close-tip:02de42196ebe draft book_02de
263 postclose-tip:02de42196ebe draft book_02de
263 postclose-tip:02de42196ebe draft book_02de
264 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response
264 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response
265 file:/*/$TESTTMP/other HG_URL=file:$TESTTMP/other (glob)
265 file:/*/$TESTTMP/other HG_URL=file:$TESTTMP/other (glob)
266 $ hg -R other log -G
266 $ hg -R other log -G
267 o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G
267 o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G
268 |\
268 |\
269 | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
269 | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
270 | |
270 | |
271 @ | 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
271 @ | 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
272 |/
272 |/
273 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de book_32af book_42cc book_5fdd A
273 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de book_32af book_42cc book_5fdd A
274
274
275 $ hg -R other debugobsolete
275 $ hg -R other debugobsolete
276 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
276 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
277 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
277 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
278 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
278 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
279
279
280 pull over ssh
280 pull over ssh
281
281
282 $ hg -R other pull ssh://user@dummy/main -r 02de42196ebe --bookmark book_02de
282 $ hg -R other pull ssh://user@dummy/main -r 02de42196ebe --bookmark book_02de
283 pulling from ssh://user@dummy/main
283 pulling from ssh://user@dummy/main
284 searching for changes
284 searching for changes
285 adding changesets
285 adding changesets
286 adding manifests
286 adding manifests
287 adding file changes
287 adding file changes
288 added 1 changesets with 1 changes to 1 files (+1 heads)
288 added 1 changesets with 1 changes to 1 files (+1 heads)
289 1 new obsolescence markers
289 1 new obsolescence markers
290 updating bookmark book_02de
290 updating bookmark book_02de
291 pre-close-tip:02de42196ebe draft book_02de
291 pre-close-tip:02de42196ebe draft book_02de
292 new changesets 02de42196ebe
292 new changesets 02de42196ebe
293 postclose-tip:02de42196ebe draft book_02de
293 postclose-tip:02de42196ebe draft book_02de
294 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_NODE_LAST=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
294 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_NODE_LAST=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
295 ssh://user@dummy/main HG_URL=ssh://user@dummy/main
295 ssh://user@dummy/main HG_URL=ssh://user@dummy/main
296 (run 'hg heads' to see heads, 'hg merge' to merge)
296 (run 'hg heads' to see heads, 'hg merge' to merge)
297 $ hg -R other debugobsolete
297 $ hg -R other debugobsolete
298 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
298 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
299 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
299 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
300 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
300 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
301 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
301 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
302
302
303 pull over http
303 pull over http
304
304
305 $ hg serve -R main -p $HGPORT -d --pid-file=main.pid -E main-error.log
305 $ hg serve -R main -p $HGPORT -d --pid-file=main.pid -E main-error.log
306 $ cat main.pid >> $DAEMON_PIDS
306 $ cat main.pid >> $DAEMON_PIDS
307
307
308 $ hg -R other pull http://localhost:$HGPORT/ -r 42ccdea3bb16 --bookmark book_42cc
308 $ hg -R other pull http://localhost:$HGPORT/ -r 42ccdea3bb16 --bookmark book_42cc
309 pulling from http://localhost:$HGPORT/
309 pulling from http://localhost:$HGPORT/
310 searching for changes
310 searching for changes
311 adding changesets
311 adding changesets
312 adding manifests
312 adding manifests
313 adding file changes
313 adding file changes
314 added 1 changesets with 1 changes to 1 files (+1 heads)
314 added 1 changesets with 1 changes to 1 files (+1 heads)
315 1 new obsolescence markers
315 1 new obsolescence markers
316 updating bookmark book_42cc
316 updating bookmark book_42cc
317 pre-close-tip:42ccdea3bb16 draft book_42cc
317 pre-close-tip:42ccdea3bb16 draft book_42cc
318 new changesets 42ccdea3bb16
318 new changesets 42ccdea3bb16
319 postclose-tip:42ccdea3bb16 draft book_42cc
319 postclose-tip:42ccdea3bb16 draft book_42cc
320 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_NODE_LAST=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
320 txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_NODE_LAST=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
321 http://localhost:$HGPORT/ HG_URL=http://localhost:$HGPORT/
321 http://localhost:$HGPORT/ HG_URL=http://localhost:$HGPORT/
322 (run 'hg heads .' to see heads, 'hg merge' to merge)
322 (run 'hg heads .' to see heads, 'hg merge' to merge)
323 $ cat main-error.log
323 $ cat main-error.log
324 $ hg -R other debugobsolete
324 $ hg -R other debugobsolete
325 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
325 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
326 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
326 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
327 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
327 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
328 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
328 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
329 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
329 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
330
330
331 push over ssh
331 push over ssh
332
332
333 $ hg -R main push ssh://user@dummy/other -r 5fddd98957c8 --bookmark book_5fdd
333 $ hg -R main push ssh://user@dummy/other -r 5fddd98957c8 --bookmark book_5fdd
334 pushing to ssh://user@dummy/other
334 pushing to ssh://user@dummy/other
335 searching for changes
335 searching for changes
336 remote: adding changesets
336 remote: adding changesets
337 remote: adding manifests
337 remote: adding manifests
338 remote: adding file changes
338 remote: adding file changes
339 remote: added 1 changesets with 1 changes to 1 files
339 remote: added 1 changesets with 1 changes to 1 files
340 remote: 1 new obsolescence markers
340 remote: 1 new obsolescence markers
341 remote: pre-close-tip:5fddd98957c8 draft book_5fdd
341 remote: pre-close-tip:5fddd98957c8 draft book_5fdd
342 remote: pushkey: lock state after "bookmarks"
342 remote: pushkey: lock state after "bookmarks"
343 remote: lock: free
343 remote: lock: free
344 remote: wlock: free
344 remote: wlock: free
345 remote: postclose-tip:5fddd98957c8 draft book_5fdd
345 remote: postclose-tip:5fddd98957c8 draft book_5fdd
346 remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_NODE_LAST=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_TXNNAME=serve HG_URL=remote:ssh:$LOCALIP
346 remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_NODE_LAST=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_TXNNAME=serve HG_URL=remote:ssh:$LOCALIP
347 updating bookmark book_5fdd
347 updating bookmark book_5fdd
348 pre-close-tip:02de42196ebe draft book_02de
348 pre-close-tip:02de42196ebe draft book_02de
349 postclose-tip:02de42196ebe draft book_02de
349 postclose-tip:02de42196ebe draft book_02de
350 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response
350 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response
351 ssh://user@dummy/other HG_URL=ssh://user@dummy/other
351 ssh://user@dummy/other HG_URL=ssh://user@dummy/other
352 $ hg -R other log -G
352 $ hg -R other log -G
353 o 6:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C
353 o 6:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C
354 |
354 |
355 o 5:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B
355 o 5:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B
356 |
356 |
357 | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H
357 | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H
358 | |
358 | |
359 | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G
359 | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G
360 | |/|
360 | |/|
361 | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
361 | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
362 |/ /
362 |/ /
363 | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
363 | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
364 |/
364 |/
365 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af A
365 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af A
366
366
367 $ hg -R other debugobsolete
367 $ hg -R other debugobsolete
368 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
368 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
369 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
369 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
370 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
370 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
371 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
371 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
372 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
372 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
373 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
373 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
374
374
375 push over http
375 push over http
376
376
377 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
377 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
378 $ cat other.pid >> $DAEMON_PIDS
378 $ cat other.pid >> $DAEMON_PIDS
379
379
380 $ hg -R main phase --public 32af7686d403
380 $ hg -R main phase --public 32af7686d403
381 pre-close-tip:02de42196ebe draft book_02de
381 pre-close-tip:02de42196ebe draft book_02de
382 postclose-tip:02de42196ebe draft book_02de
382 postclose-tip:02de42196ebe draft book_02de
383 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
383 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
384 $ hg -R main push http://localhost:$HGPORT2/ -r 32af7686d403 --bookmark book_32af
384 $ hg -R main push http://localhost:$HGPORT2/ -r 32af7686d403 --bookmark book_32af
385 pushing to http://localhost:$HGPORT2/
385 pushing to http://localhost:$HGPORT2/
386 searching for changes
386 searching for changes
387 remote: adding changesets
387 remote: adding changesets
388 remote: adding manifests
388 remote: adding manifests
389 remote: adding file changes
389 remote: adding file changes
390 remote: added 1 changesets with 1 changes to 1 files
390 remote: added 1 changesets with 1 changes to 1 files
391 remote: 1 new obsolescence markers
391 remote: 1 new obsolescence markers
392 remote: pre-close-tip:32af7686d403 public book_32af
392 remote: pre-close-tip:32af7686d403 public book_32af
393 remote: pushkey: lock state after "bookmarks"
393 remote: pushkey: lock state after "bookmarks"
394 remote: lock: free
394 remote: lock: free
395 remote: wlock: free
395 remote: wlock: free
396 remote: postclose-tip:32af7686d403 public book_32af
396 remote: postclose-tip:32af7686d403 public book_32af
397 remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=32af7686d403cf45b5d95f2d70cebea587ac806a HG_NODE_LAST=32af7686d403cf45b5d95f2d70cebea587ac806a HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_TXNNAME=serve HG_URL=remote:http:$LOCALIP: (glob)
397 remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=32af7686d403cf45b5d95f2d70cebea587ac806a HG_NODE_LAST=32af7686d403cf45b5d95f2d70cebea587ac806a HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_TXNNAME=serve HG_URL=remote:http:$LOCALIP: (glob)
398 updating bookmark book_32af
398 updating bookmark book_32af
399 pre-close-tip:02de42196ebe draft book_02de
399 pre-close-tip:02de42196ebe draft book_02de
400 postclose-tip:02de42196ebe draft book_02de
400 postclose-tip:02de42196ebe draft book_02de
401 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response
401 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_SOURCE=push-response HG_TXNID=TXN:$ID$ HG_TXNNAME=push-response
402 http://localhost:$HGPORT2/ HG_URL=http://localhost:$HGPORT2/
402 http://localhost:$HGPORT2/ HG_URL=http://localhost:$HGPORT2/
403 $ cat other-error.log
403 $ cat other-error.log
404
404
405 Check final content.
405 Check final content.
406
406
407 $ hg -R other log -G
407 $ hg -R other log -G
408 o 7:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af D
408 o 7:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af D
409 |
409 |
410 o 6:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C
410 o 6:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C
411 |
411 |
412 o 5:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B
412 o 5:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B
413 |
413 |
414 | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H
414 | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H
415 | |
415 | |
416 | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G
416 | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G
417 | |/|
417 | |/|
418 | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
418 | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
419 |/ /
419 |/ /
420 | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
420 | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
421 |/
421 |/
422 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
422 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
423
423
424 $ hg -R other debugobsolete
424 $ hg -R other debugobsolete
425 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
425 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
426 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
426 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
427 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
427 3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
428 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
428 4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
429 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
429 5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
430 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
430 6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
431 7777777777777777777777777777777777777777 32af7686d403cf45b5d95f2d70cebea587ac806a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
431 7777777777777777777777777777777777777777 32af7686d403cf45b5d95f2d70cebea587ac806a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
432
432
433 (check that no 'pending' files remain)
433 (check that no 'pending' files remain)
434
434
435 $ ls -1 other/.hg/bookmarks*
435 $ ls -1 other/.hg/bookmarks*
436 other/.hg/bookmarks
436 other/.hg/bookmarks
437 $ ls -1 other/.hg/store/phaseroots*
437 $ ls -1 other/.hg/store/phaseroots*
438 other/.hg/store/phaseroots
438 other/.hg/store/phaseroots
439 $ ls -1 other/.hg/store/00changelog.i*
439 $ ls -1 other/.hg/store/00changelog.i*
440 other/.hg/store/00changelog.i
440 other/.hg/store/00changelog.i
441
441
442 Error Handling
442 Error Handling
443 ==============
443 ==============
444
444
445 Check that errors are properly returned to the client during push.
445 Check that errors are properly returned to the client during push.
446
446
447 Setting up
447 Setting up
448
448
449 $ cat > failpush.py << EOF
449 $ cat > failpush.py << EOF
450 > """A small extension that makes push fails when using bundle2
450 > """A small extension that makes push fails when using bundle2
451 >
451 >
452 > used to test error handling in bundle2
452 > used to test error handling in bundle2
453 > """
453 > """
454 >
454 >
455 > from mercurial import error
455 > from mercurial import error
456 > from mercurial import bundle2
456 > from mercurial import bundle2
457 > from mercurial import exchange
457 > from mercurial import exchange
458 > from mercurial import extensions
458 > from mercurial import extensions
459 > from mercurial import registrar
459 > from mercurial import registrar
460 > cmdtable = {}
460 > cmdtable = {}
461 > command = registrar.command(cmdtable)
461 > command = registrar.command(cmdtable)
462 >
462 >
463 > configtable = {}
463 > configtable = {}
464 > configitem = registrar.configitem(configtable)
464 > configitem = registrar.configitem(configtable)
465 > configitem('failpush', 'reason',
465 > configitem('failpush', 'reason',
466 > default=None,
466 > default=None,
467 > )
467 > )
468 >
468 >
469 > def _pushbundle2failpart(pushop, bundler):
469 > def _pushbundle2failpart(pushop, bundler):
470 > reason = pushop.ui.config('failpush', 'reason')
470 > reason = pushop.ui.config('failpush', 'reason')
471 > part = None
471 > part = None
472 > if reason == 'abort':
472 > if reason == 'abort':
473 > bundler.newpart('test:abort')
473 > bundler.newpart('test:abort')
474 > if reason == 'unknown':
474 > if reason == 'unknown':
475 > bundler.newpart('test:unknown')
475 > bundler.newpart('test:unknown')
476 > if reason == 'race':
476 > if reason == 'race':
477 > # 20 Bytes of crap
477 > # 20 Bytes of crap
478 > bundler.newpart('check:heads', data='01234567890123456789')
478 > bundler.newpart('check:heads', data='01234567890123456789')
479 >
479 >
480 > @bundle2.parthandler("test:abort")
480 > @bundle2.parthandler("test:abort")
481 > def handleabort(op, part):
481 > def handleabort(op, part):
482 > raise error.Abort('Abandon ship!', hint="don't panic")
482 > raise error.Abort('Abandon ship!', hint="don't panic")
483 >
483 >
484 > def uisetup(ui):
484 > def uisetup(ui):
485 > exchange.b2partsgenmapping['failpart'] = _pushbundle2failpart
485 > exchange.b2partsgenmapping['failpart'] = _pushbundle2failpart
486 > exchange.b2partsgenorder.insert(0, 'failpart')
486 > exchange.b2partsgenorder.insert(0, 'failpart')
487 >
487 >
488 > EOF
488 > EOF
489
489
490 $ cd main
490 $ cd main
491 $ hg up tip
491 $ hg up tip
492 3 files updated, 0 files merged, 1 files removed, 0 files unresolved
492 3 files updated, 0 files merged, 1 files removed, 0 files unresolved
493 $ echo 'I' > I
493 $ echo 'I' > I
494 $ hg add I
494 $ hg add I
495 $ hg ci -m 'I'
495 $ hg ci -m 'I'
496 pre-close-tip:e7ec4e813ba6 draft
496 pre-close-tip:e7ec4e813ba6 draft
497 postclose-tip:e7ec4e813ba6 draft
497 postclose-tip:e7ec4e813ba6 draft
498 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
498 txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
499 $ hg id
499 $ hg id
500 e7ec4e813ba6 tip
500 e7ec4e813ba6 tip
501 $ cd ..
501 $ cd ..
502
502
503 $ cat << EOF >> $HGRCPATH
503 $ cat << EOF >> $HGRCPATH
504 > [extensions]
504 > [extensions]
505 > failpush=$TESTTMP/failpush.py
505 > failpush=$TESTTMP/failpush.py
506 > EOF
506 > EOF
507
507
508 $ killdaemons.py
508 $ killdaemons.py
509 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
509 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
510 $ cat other.pid >> $DAEMON_PIDS
510 $ cat other.pid >> $DAEMON_PIDS
511
511
512 Doing the actual push: Abort error
512 Doing the actual push: Abort error
513
513
514 $ cat << EOF >> $HGRCPATH
514 $ cat << EOF >> $HGRCPATH
515 > [failpush]
515 > [failpush]
516 > reason = abort
516 > reason = abort
517 > EOF
517 > EOF
518
518
519 $ hg -R main push other -r e7ec4e813ba6
519 $ hg -R main push other -r e7ec4e813ba6
520 pushing to other
520 pushing to other
521 searching for changes
521 searching for changes
522 abort: Abandon ship!
522 abort: Abandon ship!
523 (don't panic)
523 (don't panic)
524 [255]
524 [255]
525
525
526 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
526 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
527 pushing to ssh://user@dummy/other
527 pushing to ssh://user@dummy/other
528 searching for changes
528 searching for changes
529 remote: Abandon ship!
529 remote: Abandon ship!
530 remote: (don't panic)
530 remote: (don't panic)
531 abort: push failed on remote
531 abort: push failed on remote
532 [255]
532 [255]
533
533
534 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
534 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
535 pushing to http://localhost:$HGPORT2/
535 pushing to http://localhost:$HGPORT2/
536 searching for changes
536 searching for changes
537 remote: Abandon ship!
537 remote: Abandon ship!
538 remote: (don't panic)
538 remote: (don't panic)
539 abort: push failed on remote
539 abort: push failed on remote
540 [255]
540 [255]
541
541
542
542
543 Doing the actual push: unknown mandatory parts
543 Doing the actual push: unknown mandatory parts
544
544
545 $ cat << EOF >> $HGRCPATH
545 $ cat << EOF >> $HGRCPATH
546 > [failpush]
546 > [failpush]
547 > reason = unknown
547 > reason = unknown
548 > EOF
548 > EOF
549
549
550 $ hg -R main push other -r e7ec4e813ba6
550 $ hg -R main push other -r e7ec4e813ba6
551 pushing to other
551 pushing to other
552 searching for changes
552 searching for changes
553 abort: missing support for test:unknown
553 abort: missing support for test:unknown
554 [255]
554 [255]
555
555
556 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
556 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
557 pushing to ssh://user@dummy/other
557 pushing to ssh://user@dummy/other
558 searching for changes
558 searching for changes
559 abort: missing support for test:unknown
559 abort: missing support for test:unknown
560 [255]
560 [255]
561
561
562 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
562 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
563 pushing to http://localhost:$HGPORT2/
563 pushing to http://localhost:$HGPORT2/
564 searching for changes
564 searching for changes
565 abort: missing support for test:unknown
565 abort: missing support for test:unknown
566 [255]
566 [255]
567
567
568 Doing the actual push: race
568 Doing the actual push: race
569
569
570 $ cat << EOF >> $HGRCPATH
570 $ cat << EOF >> $HGRCPATH
571 > [failpush]
571 > [failpush]
572 > reason = race
572 > reason = race
573 > EOF
573 > EOF
574
574
575 $ hg -R main push other -r e7ec4e813ba6
575 $ hg -R main push other -r e7ec4e813ba6
576 pushing to other
576 pushing to other
577 searching for changes
577 searching for changes
578 abort: push failed:
578 abort: push failed:
579 'repository changed while pushing - please try again'
579 'repository changed while pushing - please try again'
580 [255]
580 [255]
581
581
582 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
582 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
583 pushing to ssh://user@dummy/other
583 pushing to ssh://user@dummy/other
584 searching for changes
584 searching for changes
585 abort: push failed:
585 abort: push failed:
586 'repository changed while pushing - please try again'
586 'repository changed while pushing - please try again'
587 [255]
587 [255]
588
588
589 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
589 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
590 pushing to http://localhost:$HGPORT2/
590 pushing to http://localhost:$HGPORT2/
591 searching for changes
591 searching for changes
592 abort: push failed:
592 abort: push failed:
593 'repository changed while pushing - please try again'
593 'repository changed while pushing - please try again'
594 [255]
594 [255]
595
595
596 Doing the actual push: hook abort
596 Doing the actual push: hook abort
597
597
598 $ cat << EOF >> $HGRCPATH
598 $ cat << EOF >> $HGRCPATH
599 > [failpush]
599 > [failpush]
600 > reason =
600 > reason =
601 > [hooks]
601 > [hooks]
602 > pretxnclose.failpush = sh -c "echo 'You shall not pass!'; false"
602 > pretxnclose.failpush = sh -c "echo 'You shall not pass!'; false"
603 > txnabort.failpush = sh -c "echo 'Cleaning up the mess...'"
603 > txnabort.failpush = sh -c "echo 'Cleaning up the mess...'"
604 > EOF
604 > EOF
605
605
606 $ killdaemons.py
606 $ killdaemons.py
607 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
607 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
608 $ cat other.pid >> $DAEMON_PIDS
608 $ cat other.pid >> $DAEMON_PIDS
609
609
610 $ hg -R main push other -r e7ec4e813ba6
610 $ hg -R main push other -r e7ec4e813ba6
611 pushing to other
611 pushing to other
612 searching for changes
612 searching for changes
613 remote: adding changesets
613 remote: adding changesets
614 remote: adding manifests
614 remote: adding manifests
615 remote: adding file changes
615 remote: adding file changes
616 remote: added 1 changesets with 1 changes to 1 files
616 remote: added 1 changesets with 1 changes to 1 files
617 remote: pre-close-tip:e7ec4e813ba6 draft
617 remote: pre-close-tip:e7ec4e813ba6 draft
618 remote: You shall not pass!
618 remote: You shall not pass!
619 remote: transaction abort!
619 remote: transaction abort!
620 remote: Cleaning up the mess...
620 remote: Cleaning up the mess...
621 remote: rollback completed
621 remote: rollback completed
622 abort: pretxnclose.failpush hook exited with status 1
622 abort: pretxnclose.failpush hook exited with status 1
623 [255]
623 [255]
624
624
625 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
625 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
626 pushing to ssh://user@dummy/other
626 pushing to ssh://user@dummy/other
627 searching for changes
627 searching for changes
628 remote: adding changesets
628 remote: adding changesets
629 remote: adding manifests
629 remote: adding manifests
630 remote: adding file changes
630 remote: adding file changes
631 remote: added 1 changesets with 1 changes to 1 files
631 remote: added 1 changesets with 1 changes to 1 files
632 remote: pre-close-tip:e7ec4e813ba6 draft
632 remote: pre-close-tip:e7ec4e813ba6 draft
633 remote: You shall not pass!
633 remote: You shall not pass!
634 remote: transaction abort!
634 remote: transaction abort!
635 remote: Cleaning up the mess...
635 remote: Cleaning up the mess...
636 remote: rollback completed
636 remote: rollback completed
637 remote: pretxnclose.failpush hook exited with status 1
637 remote: pretxnclose.failpush hook exited with status 1
638 abort: push failed on remote
638 abort: push failed on remote
639 [255]
639 [255]
640
640
641 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
641 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
642 pushing to http://localhost:$HGPORT2/
642 pushing to http://localhost:$HGPORT2/
643 searching for changes
643 searching for changes
644 remote: adding changesets
644 remote: adding changesets
645 remote: adding manifests
645 remote: adding manifests
646 remote: adding file changes
646 remote: adding file changes
647 remote: added 1 changesets with 1 changes to 1 files
647 remote: added 1 changesets with 1 changes to 1 files
648 remote: pre-close-tip:e7ec4e813ba6 draft
648 remote: pre-close-tip:e7ec4e813ba6 draft
649 remote: You shall not pass!
649 remote: You shall not pass!
650 remote: transaction abort!
650 remote: transaction abort!
651 remote: Cleaning up the mess...
651 remote: Cleaning up the mess...
652 remote: rollback completed
652 remote: rollback completed
653 remote: pretxnclose.failpush hook exited with status 1
653 remote: pretxnclose.failpush hook exited with status 1
654 abort: push failed on remote
654 abort: push failed on remote
655 [255]
655 [255]
656
656
657 (check that no 'pending' files remain)
657 (check that no 'pending' files remain)
658
658
659 $ ls -1 other/.hg/bookmarks*
659 $ ls -1 other/.hg/bookmarks*
660 other/.hg/bookmarks
660 other/.hg/bookmarks
661 $ ls -1 other/.hg/store/phaseroots*
661 $ ls -1 other/.hg/store/phaseroots*
662 other/.hg/store/phaseroots
662 other/.hg/store/phaseroots
663 $ ls -1 other/.hg/store/00changelog.i*
663 $ ls -1 other/.hg/store/00changelog.i*
664 other/.hg/store/00changelog.i
664 other/.hg/store/00changelog.i
665
665
666 Check error from hook during the unbundling process itself
666 Check error from hook during the unbundling process itself
667
667
668 $ cat << EOF >> $HGRCPATH
668 $ cat << EOF >> $HGRCPATH
669 > pretxnchangegroup = sh -c "echo 'Fail early!'; false"
669 > pretxnchangegroup = sh -c "echo 'Fail early!'; false"
670 > EOF
670 > EOF
671 $ killdaemons.py # reload http config
671 $ killdaemons.py # reload http config
672 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
672 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
673 $ cat other.pid >> $DAEMON_PIDS
673 $ cat other.pid >> $DAEMON_PIDS
674
674
675 $ hg -R main push other -r e7ec4e813ba6
675 $ hg -R main push other -r e7ec4e813ba6
676 pushing to other
676 pushing to other
677 searching for changes
677 searching for changes
678 remote: adding changesets
678 remote: adding changesets
679 remote: adding manifests
679 remote: adding manifests
680 remote: adding file changes
680 remote: adding file changes
681 remote: added 1 changesets with 1 changes to 1 files
681 remote: added 1 changesets with 1 changes to 1 files
682 remote: Fail early!
682 remote: Fail early!
683 remote: transaction abort!
683 remote: transaction abort!
684 remote: Cleaning up the mess...
684 remote: Cleaning up the mess...
685 remote: rollback completed
685 remote: rollback completed
686 abort: pretxnchangegroup hook exited with status 1
686 abort: pretxnchangegroup hook exited with status 1
687 [255]
687 [255]
688 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
688 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
689 pushing to ssh://user@dummy/other
689 pushing to ssh://user@dummy/other
690 searching for changes
690 searching for changes
691 remote: adding changesets
691 remote: adding changesets
692 remote: adding manifests
692 remote: adding manifests
693 remote: adding file changes
693 remote: adding file changes
694 remote: added 1 changesets with 1 changes to 1 files
694 remote: added 1 changesets with 1 changes to 1 files
695 remote: Fail early!
695 remote: Fail early!
696 remote: transaction abort!
696 remote: transaction abort!
697 remote: Cleaning up the mess...
697 remote: Cleaning up the mess...
698 remote: rollback completed
698 remote: rollback completed
699 remote: pretxnchangegroup hook exited with status 1
699 remote: pretxnchangegroup hook exited with status 1
700 abort: push failed on remote
700 abort: push failed on remote
701 [255]
701 [255]
702 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
702 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
703 pushing to http://localhost:$HGPORT2/
703 pushing to http://localhost:$HGPORT2/
704 searching for changes
704 searching for changes
705 remote: adding changesets
705 remote: adding changesets
706 remote: adding manifests
706 remote: adding manifests
707 remote: adding file changes
707 remote: adding file changes
708 remote: added 1 changesets with 1 changes to 1 files
708 remote: added 1 changesets with 1 changes to 1 files
709 remote: Fail early!
709 remote: Fail early!
710 remote: transaction abort!
710 remote: transaction abort!
711 remote: Cleaning up the mess...
711 remote: Cleaning up the mess...
712 remote: rollback completed
712 remote: rollback completed
713 remote: pretxnchangegroup hook exited with status 1
713 remote: pretxnchangegroup hook exited with status 1
714 abort: push failed on remote
714 abort: push failed on remote
715 [255]
715 [255]
716
716
717 Check output capture control.
717 Check output capture control.
718
718
719 (should be still forced for http, disabled for local and ssh)
719 (should be still forced for http, disabled for local and ssh)
720
720
721 $ cat >> $HGRCPATH << EOF
721 $ cat >> $HGRCPATH << EOF
722 > [experimental]
722 > [experimental]
723 > bundle2-output-capture=False
723 > bundle2-output-capture=False
724 > EOF
724 > EOF
725
725
726 $ hg -R main push other -r e7ec4e813ba6
726 $ hg -R main push other -r e7ec4e813ba6
727 pushing to other
727 pushing to other
728 searching for changes
728 searching for changes
729 adding changesets
729 adding changesets
730 adding manifests
730 adding manifests
731 adding file changes
731 adding file changes
732 added 1 changesets with 1 changes to 1 files
732 added 1 changesets with 1 changes to 1 files
733 Fail early!
733 Fail early!
734 transaction abort!
734 transaction abort!
735 Cleaning up the mess...
735 Cleaning up the mess...
736 rollback completed
736 rollback completed
737 abort: pretxnchangegroup hook exited with status 1
737 abort: pretxnchangegroup hook exited with status 1
738 [255]
738 [255]
739 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
739 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
740 pushing to ssh://user@dummy/other
740 pushing to ssh://user@dummy/other
741 searching for changes
741 searching for changes
742 remote: adding changesets
742 remote: adding changesets
743 remote: adding manifests
743 remote: adding manifests
744 remote: adding file changes
744 remote: adding file changes
745 remote: added 1 changesets with 1 changes to 1 files
745 remote: added 1 changesets with 1 changes to 1 files
746 remote: Fail early!
746 remote: Fail early!
747 remote: transaction abort!
747 remote: transaction abort!
748 remote: Cleaning up the mess...
748 remote: Cleaning up the mess...
749 remote: rollback completed
749 remote: rollback completed
750 remote: pretxnchangegroup hook exited with status 1
750 remote: pretxnchangegroup hook exited with status 1
751 abort: push failed on remote
751 abort: push failed on remote
752 [255]
752 [255]
753 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
753 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
754 pushing to http://localhost:$HGPORT2/
754 pushing to http://localhost:$HGPORT2/
755 searching for changes
755 searching for changes
756 remote: adding changesets
756 remote: adding changesets
757 remote: adding manifests
757 remote: adding manifests
758 remote: adding file changes
758 remote: adding file changes
759 remote: added 1 changesets with 1 changes to 1 files
759 remote: added 1 changesets with 1 changes to 1 files
760 remote: Fail early!
760 remote: Fail early!
761 remote: transaction abort!
761 remote: transaction abort!
762 remote: Cleaning up the mess...
762 remote: Cleaning up the mess...
763 remote: rollback completed
763 remote: rollback completed
764 remote: pretxnchangegroup hook exited with status 1
764 remote: pretxnchangegroup hook exited with status 1
765 abort: push failed on remote
765 abort: push failed on remote
766 [255]
766 [255]
767
767
768 Check abort from mandatory pushkey
768 Check abort from mandatory pushkey
769
769
770 $ cat > mandatorypart.py << EOF
770 $ cat > mandatorypart.py << EOF
771 > from mercurial import exchange
771 > from mercurial import exchange
772 > from mercurial import pushkey
772 > from mercurial import pushkey
773 > from mercurial import node
773 > from mercurial import node
774 > from mercurial import error
774 > from mercurial import error
775 > @exchange.b2partsgenerator('failingpuskey')
775 > @exchange.b2partsgenerator('failingpuskey')
776 > def addfailingpushey(pushop, bundler):
776 > def addfailingpushey(pushop, bundler):
777 > enc = pushkey.encode
777 > enc = pushkey.encode
778 > part = bundler.newpart('pushkey')
778 > part = bundler.newpart('pushkey')
779 > part.addparam('namespace', enc('phases'))
779 > part.addparam('namespace', enc('phases'))
780 > part.addparam('key', enc(pushop.repo['cd010b8cd998'].hex()))
780 > part.addparam('key', enc(pushop.repo['cd010b8cd998'].hex()))
781 > part.addparam('old', enc(str(0))) # successful update
781 > part.addparam('old', enc(str(0))) # successful update
782 > part.addparam('new', enc(str(0)))
782 > part.addparam('new', enc(str(0)))
783 > def fail(pushop, exc):
783 > def fail(pushop, exc):
784 > raise error.Abort('Correct phase push failed (because hooks)')
784 > raise error.Abort('Correct phase push failed (because hooks)')
785 > pushop.pkfailcb[part.id] = fail
785 > pushop.pkfailcb[part.id] = fail
786 > EOF
786 > EOF
787 $ cat >> $HGRCPATH << EOF
787 $ cat >> $HGRCPATH << EOF
788 > [hooks]
788 > [hooks]
789 > pretxnchangegroup=
789 > pretxnchangegroup=
790 > pretxnclose.failpush=
790 > pretxnclose.failpush=
791 > prepushkey.failpush = sh -c "echo 'do not push the key !'; false"
791 > prepushkey.failpush = sh -c "echo 'do not push the key !'; false"
792 > [extensions]
792 > [extensions]
793 > mandatorypart=$TESTTMP/mandatorypart.py
793 > mandatorypart=$TESTTMP/mandatorypart.py
794 > EOF
794 > EOF
795 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS # reload http config
795 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS # reload http config
796 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
796 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
797 $ cat other.pid >> $DAEMON_PIDS
797 $ cat other.pid >> $DAEMON_PIDS
798
798
799 (Failure from a hook)
799 (Failure from a hook)
800
800
801 $ hg -R main push other -r e7ec4e813ba6
801 $ hg -R main push other -r e7ec4e813ba6
802 pushing to other
802 pushing to other
803 searching for changes
803 searching for changes
804 adding changesets
804 adding changesets
805 adding manifests
805 adding manifests
806 adding file changes
806 adding file changes
807 added 1 changesets with 1 changes to 1 files
807 added 1 changesets with 1 changes to 1 files
808 do not push the key !
808 do not push the key !
809 pushkey-abort: prepushkey.failpush hook exited with status 1
809 pushkey-abort: prepushkey.failpush hook exited with status 1
810 transaction abort!
810 transaction abort!
811 Cleaning up the mess...
811 Cleaning up the mess...
812 rollback completed
812 rollback completed
813 abort: Correct phase push failed (because hooks)
813 abort: Correct phase push failed (because hooks)
814 [255]
814 [255]
815 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
815 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
816 pushing to ssh://user@dummy/other
816 pushing to ssh://user@dummy/other
817 searching for changes
817 searching for changes
818 remote: adding changesets
818 remote: adding changesets
819 remote: adding manifests
819 remote: adding manifests
820 remote: adding file changes
820 remote: adding file changes
821 remote: added 1 changesets with 1 changes to 1 files
821 remote: added 1 changesets with 1 changes to 1 files
822 remote: do not push the key !
822 remote: do not push the key !
823 remote: pushkey-abort: prepushkey.failpush hook exited with status 1
823 remote: pushkey-abort: prepushkey.failpush hook exited with status 1
824 remote: transaction abort!
824 remote: transaction abort!
825 remote: Cleaning up the mess...
825 remote: Cleaning up the mess...
826 remote: rollback completed
826 remote: rollback completed
827 abort: Correct phase push failed (because hooks)
827 abort: Correct phase push failed (because hooks)
828 [255]
828 [255]
829 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
829 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
830 pushing to http://localhost:$HGPORT2/
830 pushing to http://localhost:$HGPORT2/
831 searching for changes
831 searching for changes
832 remote: adding changesets
832 remote: adding changesets
833 remote: adding manifests
833 remote: adding manifests
834 remote: adding file changes
834 remote: adding file changes
835 remote: added 1 changesets with 1 changes to 1 files
835 remote: added 1 changesets with 1 changes to 1 files
836 remote: do not push the key !
836 remote: do not push the key !
837 remote: pushkey-abort: prepushkey.failpush hook exited with status 1
837 remote: pushkey-abort: prepushkey.failpush hook exited with status 1
838 remote: transaction abort!
838 remote: transaction abort!
839 remote: Cleaning up the mess...
839 remote: Cleaning up the mess...
840 remote: rollback completed
840 remote: rollback completed
841 abort: Correct phase push failed (because hooks)
841 abort: Correct phase push failed (because hooks)
842 [255]
842 [255]
843
843
844 (Failure from a the pushkey)
844 (Failure from a the pushkey)
845
845
846 $ cat > mandatorypart.py << EOF
846 $ cat > mandatorypart.py << EOF
847 > from mercurial import exchange
847 > from mercurial import exchange
848 > from mercurial import pushkey
848 > from mercurial import pushkey
849 > from mercurial import node
849 > from mercurial import node
850 > from mercurial import error
850 > from mercurial import error
851 > @exchange.b2partsgenerator('failingpuskey')
851 > @exchange.b2partsgenerator('failingpuskey')
852 > def addfailingpushey(pushop, bundler):
852 > def addfailingpushey(pushop, bundler):
853 > enc = pushkey.encode
853 > enc = pushkey.encode
854 > part = bundler.newpart('pushkey')
854 > part = bundler.newpart('pushkey')
855 > part.addparam('namespace', enc('phases'))
855 > part.addparam('namespace', enc('phases'))
856 > part.addparam('key', enc(pushop.repo['cd010b8cd998'].hex()))
856 > part.addparam('key', enc(pushop.repo['cd010b8cd998'].hex()))
857 > part.addparam('old', enc(str(4))) # will fail
857 > part.addparam('old', enc(str(4))) # will fail
858 > part.addparam('new', enc(str(3)))
858 > part.addparam('new', enc(str(3)))
859 > def fail(pushop, exc):
859 > def fail(pushop, exc):
860 > raise error.Abort('Clown phase push failed')
860 > raise error.Abort('Clown phase push failed')
861 > pushop.pkfailcb[part.id] = fail
861 > pushop.pkfailcb[part.id] = fail
862 > EOF
862 > EOF
863 $ cat >> $HGRCPATH << EOF
863 $ cat >> $HGRCPATH << EOF
864 > [hooks]
864 > [hooks]
865 > prepushkey.failpush =
865 > prepushkey.failpush =
866 > EOF
866 > EOF
867 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS # reload http config
867 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS # reload http config
868 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
868 $ hg serve -R other -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
869 $ cat other.pid >> $DAEMON_PIDS
869 $ cat other.pid >> $DAEMON_PIDS
870
870
871 $ hg -R main push other -r e7ec4e813ba6
871 $ hg -R main push other -r e7ec4e813ba6
872 pushing to other
872 pushing to other
873 searching for changes
873 searching for changes
874 adding changesets
874 adding changesets
875 adding manifests
875 adding manifests
876 adding file changes
876 adding file changes
877 added 1 changesets with 1 changes to 1 files
877 added 1 changesets with 1 changes to 1 files
878 transaction abort!
878 transaction abort!
879 Cleaning up the mess...
879 Cleaning up the mess...
880 rollback completed
880 rollback completed
881 pushkey: lock state after "phases"
881 pushkey: lock state after "phases"
882 lock: free
882 lock: free
883 wlock: free
883 wlock: free
884 abort: Clown phase push failed
884 abort: Clown phase push failed
885 [255]
885 [255]
886 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
886 $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
887 pushing to ssh://user@dummy/other
887 pushing to ssh://user@dummy/other
888 searching for changes
888 searching for changes
889 remote: adding changesets
889 remote: adding changesets
890 remote: adding manifests
890 remote: adding manifests
891 remote: adding file changes
891 remote: adding file changes
892 remote: added 1 changesets with 1 changes to 1 files
892 remote: added 1 changesets with 1 changes to 1 files
893 remote: transaction abort!
893 remote: transaction abort!
894 remote: Cleaning up the mess...
894 remote: Cleaning up the mess...
895 remote: rollback completed
895 remote: rollback completed
896 remote: pushkey: lock state after "phases"
896 remote: pushkey: lock state after "phases"
897 remote: lock: free
897 remote: lock: free
898 remote: wlock: free
898 remote: wlock: free
899 abort: Clown phase push failed
899 abort: Clown phase push failed
900 [255]
900 [255]
901 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
901 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
902 pushing to http://localhost:$HGPORT2/
902 pushing to http://localhost:$HGPORT2/
903 searching for changes
903 searching for changes
904 remote: adding changesets
904 remote: adding changesets
905 remote: adding manifests
905 remote: adding manifests
906 remote: adding file changes
906 remote: adding file changes
907 remote: added 1 changesets with 1 changes to 1 files
907 remote: added 1 changesets with 1 changes to 1 files
908 remote: transaction abort!
908 remote: transaction abort!
909 remote: Cleaning up the mess...
909 remote: Cleaning up the mess...
910 remote: rollback completed
910 remote: rollback completed
911 remote: pushkey: lock state after "phases"
911 remote: pushkey: lock state after "phases"
912 remote: lock: free
912 remote: lock: free
913 remote: wlock: free
913 remote: wlock: free
914 abort: Clown phase push failed
914 abort: Clown phase push failed
915 [255]
915 [255]
916
916
917 Test lazily acquiring the lock during unbundle
917 Test lazily acquiring the lock during unbundle
918 $ cp $TESTTMP/hgrc.orig $HGRCPATH
918 $ cp $TESTTMP/hgrc.orig $HGRCPATH
919 $ cat >> $HGRCPATH <<EOF
919 $ cat >> $HGRCPATH <<EOF
920 > [ui]
920 > [ui]
921 > ssh="$PYTHON" "$TESTDIR/dummyssh"
921 > ssh="$PYTHON" "$TESTDIR/dummyssh"
922 > EOF
922 > EOF
923
923
924 $ cat >> $TESTTMP/locktester.py <<EOF
924 $ cat >> $TESTTMP/locktester.py <<EOF
925 > import os
925 > import os
926 > from mercurial import extensions, bundle2, util
926 > from mercurial import extensions, bundle2, util
927 > def checklock(orig, repo, *args, **kwargs):
927 > def checklock(orig, repo, *args, **kwargs):
928 > if repo.svfs.lexists("lock"):
928 > if repo.svfs.lexists("lock"):
929 > raise util.Abort("Lock should not be taken")
929 > raise util.Abort("Lock should not be taken")
930 > return orig(repo, *args, **kwargs)
930 > return orig(repo, *args, **kwargs)
931 > def extsetup(ui):
931 > def extsetup(ui):
932 > extensions.wrapfunction(bundle2, 'processbundle', checklock)
932 > extensions.wrapfunction(bundle2, 'processbundle', checklock)
933 > EOF
933 > EOF
934
934
935 $ hg init lazylock
935 $ hg init lazylock
936 $ cat >> lazylock/.hg/hgrc <<EOF
936 $ cat >> lazylock/.hg/hgrc <<EOF
937 > [extensions]
937 > [extensions]
938 > locktester=$TESTTMP/locktester.py
938 > locktester=$TESTTMP/locktester.py
939 > EOF
939 > EOF
940
940
941 $ hg clone -q ssh://user@dummy/lazylock lazylockclient
941 $ hg clone -q ssh://user@dummy/lazylock lazylockclient
942 $ cd lazylockclient
942 $ cd lazylockclient
943 $ touch a && hg ci -Aqm a
943 $ touch a && hg ci -Aqm a
944 $ hg push
944 $ hg push
945 pushing to ssh://user@dummy/lazylock
945 pushing to ssh://user@dummy/lazylock
946 searching for changes
946 searching for changes
947 remote: Lock should not be taken
947 remote: Lock should not be taken
948 abort: push failed on remote
948 abort: push failed on remote
949 [255]
949 [255]
950
950
951 $ cat >> ../lazylock/.hg/hgrc <<EOF
951 $ cat >> ../lazylock/.hg/hgrc <<EOF
952 > [experimental]
952 > [experimental]
953 > bundle2lazylocking=True
953 > bundle2lazylocking=True
954 > EOF
954 > EOF
955 $ hg push
955 $ hg push
956 pushing to ssh://user@dummy/lazylock
956 pushing to ssh://user@dummy/lazylock
957 searching for changes
957 searching for changes
958 remote: adding changesets
958 remote: adding changesets
959 remote: adding manifests
959 remote: adding manifests
960 remote: adding file changes
960 remote: adding file changes
961 remote: added 1 changesets with 1 changes to 1 files
961 remote: added 1 changesets with 1 changes to 1 files
962
962
963 $ cd ..
963 $ cd ..
964
964
965 Servers can disable bundle1 for clone/pull operations
965 Servers can disable bundle1 for clone/pull operations
966
966
967 $ killdaemons.py
967 $ killdaemons.py
968 $ hg init bundle2onlyserver
968 $ hg init bundle2onlyserver
969 $ cd bundle2onlyserver
969 $ cd bundle2onlyserver
970 $ cat > .hg/hgrc << EOF
970 $ cat > .hg/hgrc << EOF
971 > [server]
971 > [server]
972 > bundle1.pull = false
972 > bundle1.pull = false
973 > EOF
973 > EOF
974
974
975 $ touch foo
975 $ touch foo
976 $ hg -q commit -A -m initial
976 $ hg -q commit -A -m initial
977
977
978 $ hg serve -p $HGPORT -d --pid-file=hg.pid
978 $ hg serve -p $HGPORT -d --pid-file=hg.pid
979 $ cat hg.pid >> $DAEMON_PIDS
979 $ cat hg.pid >> $DAEMON_PIDS
980
980
981 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2
981 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2
982 requesting all changes
982 requesting all changes
983 abort: remote error:
983 abort: remote error:
984 incompatible Mercurial client; bundle2 required
984 incompatible Mercurial client; bundle2 required
985 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
985 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
986 [255]
986 [255]
987 $ killdaemons.py
987 $ killdaemons.py
988 $ cd ..
988 $ cd ..
989
989
990 bundle1 can still pull non-generaldelta repos when generaldelta bundle1 disabled
990 bundle1 can still pull non-generaldelta repos when generaldelta bundle1 disabled
991
991
992 $ hg --config format.usegeneraldelta=false init notgdserver
992 $ hg --config format.usegeneraldelta=false init notgdserver
993 $ cd notgdserver
993 $ cd notgdserver
994 $ cat > .hg/hgrc << EOF
994 $ cat > .hg/hgrc << EOF
995 > [server]
995 > [server]
996 > bundle1gd.pull = false
996 > bundle1gd.pull = false
997 > EOF
997 > EOF
998
998
999 $ touch foo
999 $ touch foo
1000 $ hg -q commit -A -m initial
1000 $ hg -q commit -A -m initial
1001 $ hg serve -p $HGPORT -d --pid-file=hg.pid
1001 $ hg serve -p $HGPORT -d --pid-file=hg.pid
1002 $ cat hg.pid >> $DAEMON_PIDS
1002 $ cat hg.pid >> $DAEMON_PIDS
1003
1003
1004 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2-1
1004 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2-1
1005 requesting all changes
1005 requesting all changes
1006 adding changesets
1006 adding changesets
1007 adding manifests
1007 adding manifests
1008 adding file changes
1008 adding file changes
1009 added 1 changesets with 1 changes to 1 files
1009 added 1 changesets with 1 changes to 1 files
1010 new changesets 96ee1d7354c4
1010 new changesets 96ee1d7354c4
1011 updating to branch default
1011 updating to branch default
1012 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1012 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1013
1013
1014 $ killdaemons.py
1014 $ killdaemons.py
1015 $ cd ../bundle2onlyserver
1015 $ cd ../bundle2onlyserver
1016
1016
1017 bundle1 pull can be disabled for generaldelta repos only
1017 bundle1 pull can be disabled for generaldelta repos only
1018
1018
1019 $ cat > .hg/hgrc << EOF
1019 $ cat > .hg/hgrc << EOF
1020 > [server]
1020 > [server]
1021 > bundle1gd.pull = false
1021 > bundle1gd.pull = false
1022 > EOF
1022 > EOF
1023
1023
1024 $ hg serve -p $HGPORT -d --pid-file=hg.pid
1024 $ hg serve -p $HGPORT -d --pid-file=hg.pid
1025 $ cat hg.pid >> $DAEMON_PIDS
1025 $ cat hg.pid >> $DAEMON_PIDS
1026 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2
1026 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2
1027 requesting all changes
1027 requesting all changes
1028 abort: remote error:
1028 abort: remote error:
1029 incompatible Mercurial client; bundle2 required
1029 incompatible Mercurial client; bundle2 required
1030 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1030 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1031 [255]
1031 [255]
1032
1032
1033 $ killdaemons.py
1033 $ killdaemons.py
1034
1034
1035 Verify the global server.bundle1 option works
1035 Verify the global server.bundle1 option works
1036
1036
1037 $ cd ..
1037 $ cd ..
1038 $ cat > bundle2onlyserver/.hg/hgrc << EOF
1038 $ cat > bundle2onlyserver/.hg/hgrc << EOF
1039 > [server]
1039 > [server]
1040 > bundle1 = false
1040 > bundle1 = false
1041 > EOF
1041 > EOF
1042 $ hg serve -R bundle2onlyserver -p $HGPORT -d --pid-file=hg.pid
1042 $ hg serve -R bundle2onlyserver -p $HGPORT -d --pid-file=hg.pid
1043 $ cat hg.pid >> $DAEMON_PIDS
1043 $ cat hg.pid >> $DAEMON_PIDS
1044 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT not-bundle2
1044 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT not-bundle2
1045 requesting all changes
1045 requesting all changes
1046 abort: remote error:
1046 abort: remote error:
1047 incompatible Mercurial client; bundle2 required
1047 incompatible Mercurial client; bundle2 required
1048 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1048 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1049 [255]
1049 [255]
1050 $ killdaemons.py
1050 $ killdaemons.py
1051
1051
1052 $ hg --config devel.legacy.exchange=bundle1 clone ssh://user@dummy/bundle2onlyserver not-bundle2-ssh
1052 $ hg --config devel.legacy.exchange=bundle1 clone ssh://user@dummy/bundle2onlyserver not-bundle2-ssh
1053 requesting all changes
1053 requesting all changes
1054 adding changesets
1054 adding changesets
1055 remote: abort: incompatible Mercurial client; bundle2 required
1055 remote: abort: incompatible Mercurial client; bundle2 required
1056 remote: (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1056 remote: (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1057 transaction abort!
1057 transaction abort!
1058 rollback completed
1058 rollback completed
1059 abort: stream ended unexpectedly (got 0 bytes, expected 4)
1059 abort: stream ended unexpectedly (got 0 bytes, expected 4)
1060 [255]
1060 [255]
1061
1061
1062 $ cat > bundle2onlyserver/.hg/hgrc << EOF
1062 $ cat > bundle2onlyserver/.hg/hgrc << EOF
1063 > [server]
1063 > [server]
1064 > bundle1gd = false
1064 > bundle1gd = false
1065 > EOF
1065 > EOF
1066 $ hg serve -R bundle2onlyserver -p $HGPORT -d --pid-file=hg.pid
1066 $ hg serve -R bundle2onlyserver -p $HGPORT -d --pid-file=hg.pid
1067 $ cat hg.pid >> $DAEMON_PIDS
1067 $ cat hg.pid >> $DAEMON_PIDS
1068
1068
1069 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2
1069 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2
1070 requesting all changes
1070 requesting all changes
1071 abort: remote error:
1071 abort: remote error:
1072 incompatible Mercurial client; bundle2 required
1072 incompatible Mercurial client; bundle2 required
1073 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1073 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1074 [255]
1074 [255]
1075
1075
1076 $ killdaemons.py
1076 $ killdaemons.py
1077
1077
1078 $ cd notgdserver
1078 $ cd notgdserver
1079 $ cat > .hg/hgrc << EOF
1079 $ cat > .hg/hgrc << EOF
1080 > [server]
1080 > [server]
1081 > bundle1gd = false
1081 > bundle1gd = false
1082 > EOF
1082 > EOF
1083 $ hg serve -p $HGPORT -d --pid-file=hg.pid
1083 $ hg serve -p $HGPORT -d --pid-file=hg.pid
1084 $ cat hg.pid >> $DAEMON_PIDS
1084 $ cat hg.pid >> $DAEMON_PIDS
1085
1085
1086 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2-2
1086 $ hg --config devel.legacy.exchange=bundle1 clone http://localhost:$HGPORT/ not-bundle2-2
1087 requesting all changes
1087 requesting all changes
1088 adding changesets
1088 adding changesets
1089 adding manifests
1089 adding manifests
1090 adding file changes
1090 adding file changes
1091 added 1 changesets with 1 changes to 1 files
1091 added 1 changesets with 1 changes to 1 files
1092 new changesets 96ee1d7354c4
1092 new changesets 96ee1d7354c4
1093 updating to branch default
1093 updating to branch default
1094 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1094 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1095
1095
1096 $ killdaemons.py
1096 $ killdaemons.py
1097 $ cd ../bundle2onlyserver
1097 $ cd ../bundle2onlyserver
1098
1098
1099 Verify bundle1 pushes can be disabled
1099 Verify bundle1 pushes can be disabled
1100
1100
1101 $ cat > .hg/hgrc << EOF
1101 $ cat > .hg/hgrc << EOF
1102 > [server]
1102 > [server]
1103 > bundle1.push = false
1103 > bundle1.push = false
1104 > [web]
1104 > [web]
1105 > allow_push = *
1105 > allow_push = *
1106 > push_ssl = false
1106 > push_ssl = false
1107 > EOF
1107 > EOF
1108
1108
1109 $ hg serve -p $HGPORT -d --pid-file=hg.pid -E error.log
1109 $ hg serve -p $HGPORT -d --pid-file=hg.pid -E error.log
1110 $ cat hg.pid >> $DAEMON_PIDS
1110 $ cat hg.pid >> $DAEMON_PIDS
1111 $ cd ..
1111 $ cd ..
1112
1112
1113 $ hg clone http://localhost:$HGPORT bundle2-only
1113 $ hg clone http://localhost:$HGPORT bundle2-only
1114 requesting all changes
1114 requesting all changes
1115 adding changesets
1115 adding changesets
1116 adding manifests
1116 adding manifests
1117 adding file changes
1117 adding file changes
1118 added 1 changesets with 1 changes to 1 files
1118 added 1 changesets with 1 changes to 1 files
1119 new changesets 96ee1d7354c4
1119 new changesets 96ee1d7354c4
1120 updating to branch default
1120 updating to branch default
1121 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1121 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1122 $ cd bundle2-only
1122 $ cd bundle2-only
1123 $ echo commit > foo
1123 $ echo commit > foo
1124 $ hg commit -m commit
1124 $ hg commit -m commit
1125 $ hg --config devel.legacy.exchange=bundle1 push
1125 $ hg --config devel.legacy.exchange=bundle1 push
1126 pushing to http://localhost:$HGPORT/
1126 pushing to http://localhost:$HGPORT/
1127 searching for changes
1127 searching for changes
1128 abort: remote error:
1128 abort: remote error:
1129 incompatible Mercurial client; bundle2 required
1129 incompatible Mercurial client; bundle2 required
1130 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1130 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1131 [255]
1131 [255]
1132
1132
1133 (also check with ssh)
1133 (also check with ssh)
1134
1134
1135 $ hg --config devel.legacy.exchange=bundle1 push ssh://user@dummy/bundle2onlyserver
1135 $ hg --config devel.legacy.exchange=bundle1 push ssh://user@dummy/bundle2onlyserver
1136 pushing to ssh://user@dummy/bundle2onlyserver
1136 pushing to ssh://user@dummy/bundle2onlyserver
1137 searching for changes
1137 searching for changes
1138 remote: abort: incompatible Mercurial client; bundle2 required
1138 remote: abort: incompatible Mercurial client; bundle2 required
1139 remote: (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1139 remote: (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1140 [1]
1140 [1]
1141
1141
1142 $ hg push
1142 $ hg push
1143 pushing to http://localhost:$HGPORT/
1143 pushing to http://localhost:$HGPORT/
1144 searching for changes
1144 searching for changes
1145 remote: adding changesets
1145 remote: adding changesets
1146 remote: adding manifests
1146 remote: adding manifests
1147 remote: adding file changes
1147 remote: adding file changes
1148 remote: added 1 changesets with 1 changes to 1 files
1148 remote: added 1 changesets with 1 changes to 1 files
@@ -1,24 +1,24 b''
1 Create a repo, set the username to something more than 255 bytes, then run hg amend on it.
1 Create a repo, set the username to something more than 255 bytes, then run hg amend on it.
2
2
3 $ unset HGUSER
3 $ unset HGUSER
4 $ cat >> $HGRCPATH << EOF
4 $ cat >> $HGRCPATH << EOF
5 > [ui]
5 > [ui]
6 > username = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa <very.long.name@example.com>
6 > username = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa <very.long.name@example.com>
7 > [extensions]
7 > [extensions]
8 > amend =
8 > amend =
9 > [experimental]
9 > [experimental]
10 > stabilization=exchange
11 > evolution.createmarkers=True
10 > evolution.createmarkers=True
11 > evolution.exchange=True
12 > EOF
12 > EOF
13 $ hg init tmpa
13 $ hg init tmpa
14 $ cd tmpa
14 $ cd tmpa
15 $ echo a > a
15 $ echo a > a
16 $ hg add
16 $ hg add
17 adding a
17 adding a
18 $ hg commit -m "Initial commit"
18 $ hg commit -m "Initial commit"
19 $ echo a >> a
19 $ echo a >> a
20 $ hg amend 2>&1 | egrep -v '^(\*\*| )'
20 $ hg amend 2>&1 | egrep -v '^(\*\*| )'
21 transaction abort!
21 transaction abort!
22 rollback completed
22 rollback completed
23 Traceback (most recent call last):
23 Traceback (most recent call last):
24 *ProgrammingError: obsstore metadata value cannot be longer than 255 bytes (value "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa <very.long.name@example.com>" for key "user" is 285 bytes) (glob)
24 *ProgrammingError: obsstore metadata value cannot be longer than 255 bytes (value "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa <very.long.name@example.com>" for key "user" is 285 bytes) (glob)
@@ -1,1512 +1,1512 b''
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}{if(obsolete, ' *{obsolete}*')}{if(instabilities, ' {instabilities}')}) [{tags} {bookmarks}] {desc|firstline}{if(obsfate, " [{join(obsfate, "; ")}]")}\n"
6 > logtemplate="{rev}:{node|short} ({phase}{if(obsolete, ' *{obsolete}*')}{if(instabilities, ' {instabilities}')}) [{tags} {bookmarks}] {desc|firstline}{if(obsfate, " [{join(obsfate, "; ")}]")}\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=exchange
42 > evolution=exchange
43 > evolution.createmarkers=True
43 > evolution.createmarkers=True
44 > EOF
44 > EOF
45
45
46 Killing a single changeset without replacement
46 Killing a single changeset without replacement
47
47
48 $ hg debugobsolete 0
48 $ hg debugobsolete 0
49 abort: changeset references must be full hexadecimal node identifiers
49 abort: changeset references must be full hexadecimal node identifiers
50 [255]
50 [255]
51 $ hg debugobsolete '00'
51 $ hg debugobsolete '00'
52 abort: changeset references must be full hexadecimal node identifiers
52 abort: changeset references must be full hexadecimal node identifiers
53 [255]
53 [255]
54 $ hg debugobsolete -d '0 0' `getid kill_me` -u babar
54 $ hg debugobsolete -d '0 0' `getid kill_me` -u babar
55 obsoleted 1 changesets
55 obsoleted 1 changesets
56 $ hg debugobsolete
56 $ hg debugobsolete
57 97b7c2d76b1845ed3eb988cd612611e72406cef0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'babar'}
57 97b7c2d76b1845ed3eb988cd612611e72406cef0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'babar'}
58
58
59 (test that mercurial is not confused)
59 (test that mercurial is not confused)
60
60
61 $ hg up null --quiet # having 0 as parent prevents it to be hidden
61 $ hg up null --quiet # having 0 as parent prevents it to be hidden
62 $ hg tip
62 $ hg tip
63 -1:000000000000 (public) [tip ]
63 -1:000000000000 (public) [tip ]
64 $ hg up --hidden tip --quiet
64 $ hg up --hidden tip --quiet
65
65
66 Killing a single changeset with itself should fail
66 Killing a single changeset with itself should fail
67 (simple local safeguard)
67 (simple local safeguard)
68
68
69 $ hg debugobsolete `getid kill_me` `getid kill_me`
69 $ hg debugobsolete `getid kill_me` `getid kill_me`
70 abort: bad obsmarker input: in-marker cycle with 97b7c2d76b1845ed3eb988cd612611e72406cef0
70 abort: bad obsmarker input: in-marker cycle with 97b7c2d76b1845ed3eb988cd612611e72406cef0
71 [255]
71 [255]
72
72
73 $ cd ..
73 $ cd ..
74
74
75 Killing a single changeset with replacement
75 Killing a single changeset with replacement
76 (and testing the format option)
76 (and testing the format option)
77
77
78 $ hg init tmpb
78 $ hg init tmpb
79 $ cd tmpb
79 $ cd tmpb
80 $ mkcommit a
80 $ mkcommit a
81 $ mkcommit b
81 $ mkcommit b
82 $ mkcommit original_c
82 $ mkcommit original_c
83 $ hg up "desc('b')"
83 $ hg up "desc('b')"
84 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
84 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
85 $ mkcommit new_c
85 $ mkcommit new_c
86 created new head
86 created new head
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 $ hg debugobsolete --config format.obsstore-version=0 --flag 12 `getid original_c` `getid new_c` -d '121 120'
88 $ hg debugobsolete --config format.obsstore-version=0 --flag 12 `getid original_c` `getid new_c` -d '121 120'
89 obsoleted 1 changesets
89 obsoleted 1 changesets
90 $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden
90 $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden
91 2:245bde4270cd add original_c
91 2:245bde4270cd add original_c
92 $ hg debugrevlog -cd
92 $ hg debugrevlog -cd
93 # rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen
93 # rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen
94 0 -1 -1 0 59 0 0 0 0 58 58 0 1 0
94 0 -1 -1 0 59 0 0 0 0 58 58 0 1 0
95 1 0 -1 59 118 59 59 0 0 58 116 0 1 0
95 1 0 -1 59 118 59 59 0 0 58 116 0 1 0
96 2 1 -1 118 193 118 118 59 0 76 192 0 1 0
96 2 1 -1 118 193 118 118 59 0 76 192 0 1 0
97 3 1 -1 193 260 193 193 59 0 66 258 0 2 0
97 3 1 -1 193 260 193 193 59 0 66 258 0 2 0
98 $ hg debugobsolete
98 $ hg debugobsolete
99 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
99 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
100
100
101 (check for version number of the obsstore)
101 (check for version number of the obsstore)
102
102
103 $ dd bs=1 count=1 if=.hg/store/obsstore 2>/dev/null
103 $ dd bs=1 count=1 if=.hg/store/obsstore 2>/dev/null
104 \x00 (no-eol) (esc)
104 \x00 (no-eol) (esc)
105
105
106 do it again (it read the obsstore before adding new changeset)
106 do it again (it read the obsstore before adding new changeset)
107
107
108 $ hg up '.^'
108 $ hg up '.^'
109 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
109 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
110 $ mkcommit new_2_c
110 $ mkcommit new_2_c
111 created new head
111 created new head
112 $ hg debugobsolete -d '1337 0' `getid new_c` `getid new_2_c`
112 $ hg debugobsolete -d '1337 0' `getid new_c` `getid new_2_c`
113 obsoleted 1 changesets
113 obsoleted 1 changesets
114 $ hg debugobsolete
114 $ hg debugobsolete
115 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
115 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
116 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
116 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
117
117
118 Register two markers with a missing node
118 Register two markers with a missing node
119
119
120 $ hg up '.^'
120 $ hg up '.^'
121 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
121 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
122 $ mkcommit new_3_c
122 $ mkcommit new_3_c
123 created new head
123 created new head
124 $ hg debugobsolete -d '1338 0' `getid new_2_c` 1337133713371337133713371337133713371337
124 $ hg debugobsolete -d '1338 0' `getid new_2_c` 1337133713371337133713371337133713371337
125 obsoleted 1 changesets
125 obsoleted 1 changesets
126 $ hg debugobsolete -d '1339 0' 1337133713371337133713371337133713371337 `getid new_3_c`
126 $ hg debugobsolete -d '1339 0' 1337133713371337133713371337133713371337 `getid new_3_c`
127 $ hg debugobsolete
127 $ hg debugobsolete
128 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
128 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
129 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
129 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
130 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
130 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
131 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
131 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
132
132
133 Test the --index option of debugobsolete command
133 Test the --index option of debugobsolete command
134 $ hg debugobsolete --index
134 $ hg debugobsolete --index
135 0 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
135 0 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
136 1 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
136 1 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
137 2 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
137 2 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
138 3 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
138 3 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
139
139
140 Refuse pathological nullid successors
140 Refuse pathological nullid successors
141 $ hg debugobsolete -d '9001 0' 1337133713371337133713371337133713371337 0000000000000000000000000000000000000000
141 $ hg debugobsolete -d '9001 0' 1337133713371337133713371337133713371337 0000000000000000000000000000000000000000
142 transaction abort!
142 transaction abort!
143 rollback completed
143 rollback completed
144 abort: bad obsolescence marker detected: invalid successors nullid
144 abort: bad obsolescence marker detected: invalid successors nullid
145 [255]
145 [255]
146
146
147 Check that graphlog detect that a changeset is obsolete:
147 Check that graphlog detect that a changeset is obsolete:
148
148
149 $ hg log -G
149 $ hg log -G
150 @ 5:5601fb93a350 (draft) [tip ] add new_3_c
150 @ 5:5601fb93a350 (draft) [tip ] add new_3_c
151 |
151 |
152 o 1:7c3bad9141dc (draft) [ ] add b
152 o 1:7c3bad9141dc (draft) [ ] add b
153 |
153 |
154 o 0:1f0dee641bb7 (draft) [ ] add a
154 o 0:1f0dee641bb7 (draft) [ ] add a
155
155
156
156
157 check that heads does not report them
157 check that heads does not report them
158
158
159 $ hg heads
159 $ hg heads
160 5:5601fb93a350 (draft) [tip ] add new_3_c
160 5:5601fb93a350 (draft) [tip ] add new_3_c
161 $ hg heads --hidden
161 $ hg heads --hidden
162 5:5601fb93a350 (draft) [tip ] add new_3_c
162 5:5601fb93a350 (draft) [tip ] add new_3_c
163 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350]
163 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350]
164 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9]
164 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9]
165 2:245bde4270cd (draft *obsolete*) [ ] add original_c [rewritten as 3:cdbce2fbb163]
165 2:245bde4270cd (draft *obsolete*) [ ] add original_c [rewritten as 3:cdbce2fbb163]
166
166
167
167
168 check that summary does not report them
168 check that summary does not report them
169
169
170 $ hg init ../sink
170 $ hg init ../sink
171 $ echo '[paths]' >> .hg/hgrc
171 $ echo '[paths]' >> .hg/hgrc
172 $ echo 'default=../sink' >> .hg/hgrc
172 $ echo 'default=../sink' >> .hg/hgrc
173 $ hg summary --remote
173 $ hg summary --remote
174 parent: 5:5601fb93a350 tip
174 parent: 5:5601fb93a350 tip
175 add new_3_c
175 add new_3_c
176 branch: default
176 branch: default
177 commit: (clean)
177 commit: (clean)
178 update: (current)
178 update: (current)
179 phases: 3 draft
179 phases: 3 draft
180 remote: 3 outgoing
180 remote: 3 outgoing
181
181
182 $ hg summary --remote --hidden
182 $ hg summary --remote --hidden
183 parent: 5:5601fb93a350 tip
183 parent: 5:5601fb93a350 tip
184 add new_3_c
184 add new_3_c
185 branch: default
185 branch: default
186 commit: (clean)
186 commit: (clean)
187 update: 3 new changesets, 4 branch heads (merge)
187 update: 3 new changesets, 4 branch heads (merge)
188 phases: 6 draft
188 phases: 6 draft
189 remote: 3 outgoing
189 remote: 3 outgoing
190
190
191 check that various commands work well with filtering
191 check that various commands work well with filtering
192
192
193 $ hg tip
193 $ hg tip
194 5:5601fb93a350 (draft) [tip ] add new_3_c
194 5:5601fb93a350 (draft) [tip ] add new_3_c
195 $ hg log -r 6
195 $ hg log -r 6
196 abort: unknown revision '6'!
196 abort: unknown revision '6'!
197 [255]
197 [255]
198 $ hg log -r 4
198 $ hg log -r 4
199 abort: hidden revision '4'!
199 abort: hidden revision '4'!
200 (use --hidden to access hidden revisions)
200 (use --hidden to access hidden revisions)
201 [255]
201 [255]
202 $ hg debugrevspec 'rev(6)'
202 $ hg debugrevspec 'rev(6)'
203 $ hg debugrevspec 'rev(4)'
203 $ hg debugrevspec 'rev(4)'
204 $ hg debugrevspec 'null'
204 $ hg debugrevspec 'null'
205 -1
205 -1
206
206
207 Check that public changeset are not accounted as obsolete:
207 Check that public changeset are not accounted as obsolete:
208
208
209 $ hg --hidden phase --public 2
209 $ hg --hidden phase --public 2
210 $ hg log -G
210 $ hg log -G
211 @ 5:5601fb93a350 (draft phase-divergent) [tip ] add new_3_c
211 @ 5:5601fb93a350 (draft phase-divergent) [tip ] add new_3_c
212 |
212 |
213 | o 2:245bde4270cd (public) [ ] add original_c
213 | o 2:245bde4270cd (public) [ ] add original_c
214 |/
214 |/
215 o 1:7c3bad9141dc (public) [ ] add b
215 o 1:7c3bad9141dc (public) [ ] add b
216 |
216 |
217 o 0:1f0dee641bb7 (public) [ ] add a
217 o 0:1f0dee641bb7 (public) [ ] add a
218
218
219
219
220 And that bumped changeset are detected
220 And that bumped changeset are detected
221 --------------------------------------
221 --------------------------------------
222
222
223 If we didn't filtered obsolete changesets out, 3 and 4 would show up too. Also
223 If we didn't filtered obsolete changesets out, 3 and 4 would show up too. Also
224 note that the bumped changeset (5:5601fb93a350) is not a direct successor of
224 note that the bumped changeset (5:5601fb93a350) is not a direct successor of
225 the public changeset
225 the public changeset
226
226
227 $ hg log --hidden -r 'phasedivergent()'
227 $ hg log --hidden -r 'phasedivergent()'
228 5:5601fb93a350 (draft phase-divergent) [tip ] add new_3_c
228 5:5601fb93a350 (draft phase-divergent) [tip ] add new_3_c
229
229
230 And that we can't push bumped changeset
230 And that we can't push bumped changeset
231
231
232 $ hg push ../tmpa -r 0 --force #(make repo related)
232 $ hg push ../tmpa -r 0 --force #(make repo related)
233 pushing to ../tmpa
233 pushing to ../tmpa
234 searching for changes
234 searching for changes
235 warning: repository is unrelated
235 warning: repository is unrelated
236 adding changesets
236 adding changesets
237 adding manifests
237 adding manifests
238 adding file changes
238 adding file changes
239 added 1 changesets with 1 changes to 1 files (+1 heads)
239 added 1 changesets with 1 changes to 1 files (+1 heads)
240 $ hg push ../tmpa
240 $ hg push ../tmpa
241 pushing to ../tmpa
241 pushing to ../tmpa
242 searching for changes
242 searching for changes
243 abort: push includes phase-divergent changeset: 5601fb93a350!
243 abort: push includes phase-divergent changeset: 5601fb93a350!
244 [255]
244 [255]
245
245
246 Fixing "bumped" situation
246 Fixing "bumped" situation
247 We need to create a clone of 5 and add a special marker with a flag
247 We need to create a clone of 5 and add a special marker with a flag
248
248
249 $ hg summary
249 $ hg summary
250 parent: 5:5601fb93a350 tip (phase-divergent)
250 parent: 5:5601fb93a350 tip (phase-divergent)
251 add new_3_c
251 add new_3_c
252 branch: default
252 branch: default
253 commit: (clean)
253 commit: (clean)
254 update: 1 new changesets, 2 branch heads (merge)
254 update: 1 new changesets, 2 branch heads (merge)
255 phases: 1 draft
255 phases: 1 draft
256 phase-divergent: 1 changesets
256 phase-divergent: 1 changesets
257 $ hg up '5^'
257 $ hg up '5^'
258 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
258 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
259 $ hg revert -ar 5
259 $ hg revert -ar 5
260 adding new_3_c
260 adding new_3_c
261 $ hg ci -m 'add n3w_3_c'
261 $ hg ci -m 'add n3w_3_c'
262 created new head
262 created new head
263 $ hg debugobsolete -d '1338 0' --flags 1 `getid new_3_c` `getid n3w_3_c`
263 $ hg debugobsolete -d '1338 0' --flags 1 `getid new_3_c` `getid n3w_3_c`
264 obsoleted 1 changesets
264 obsoleted 1 changesets
265 $ hg log -r 'phasedivergent()'
265 $ hg log -r 'phasedivergent()'
266 $ hg log -G
266 $ hg log -G
267 @ 6:6f9641995072 (draft) [tip ] add n3w_3_c
267 @ 6:6f9641995072 (draft) [tip ] add n3w_3_c
268 |
268 |
269 | o 2:245bde4270cd (public) [ ] add original_c
269 | o 2:245bde4270cd (public) [ ] add original_c
270 |/
270 |/
271 o 1:7c3bad9141dc (public) [ ] add b
271 o 1:7c3bad9141dc (public) [ ] add b
272 |
272 |
273 o 0:1f0dee641bb7 (public) [ ] add a
273 o 0:1f0dee641bb7 (public) [ ] add a
274
274
275
275
276 Basic exclusive testing
276 Basic exclusive testing
277
277
278 $ hg log -G --hidden
278 $ hg log -G --hidden
279 @ 6:6f9641995072 (draft) [tip ] add n3w_3_c
279 @ 6:6f9641995072 (draft) [tip ] add n3w_3_c
280 |
280 |
281 | x 5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c [rewritten as 6:6f9641995072]
281 | x 5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c [rewritten as 6:6f9641995072]
282 |/
282 |/
283 | x 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350]
283 | x 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350]
284 |/
284 |/
285 | x 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9]
285 | x 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9]
286 |/
286 |/
287 | o 2:245bde4270cd (public) [ ] add original_c
287 | o 2:245bde4270cd (public) [ ] add original_c
288 |/
288 |/
289 o 1:7c3bad9141dc (public) [ ] add b
289 o 1:7c3bad9141dc (public) [ ] add b
290 |
290 |
291 o 0:1f0dee641bb7 (public) [ ] add a
291 o 0:1f0dee641bb7 (public) [ ] add a
292
292
293 $ hg debugobsolete --rev 6f9641995072
293 $ hg debugobsolete --rev 6f9641995072
294 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
294 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
295 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
295 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
296 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
296 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
297 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
297 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
298 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
298 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
299 $ hg debugobsolete --rev 6f9641995072 --exclusive
299 $ hg debugobsolete --rev 6f9641995072 --exclusive
300 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
300 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
301 $ hg debugobsolete --rev 5601fb93a350 --hidden
301 $ hg debugobsolete --rev 5601fb93a350 --hidden
302 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
302 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
303 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
303 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
304 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
304 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
305 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
305 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
306 $ hg debugobsolete --rev 5601fb93a350 --hidden --exclusive
306 $ hg debugobsolete --rev 5601fb93a350 --hidden --exclusive
307 $ hg debugobsolete --rev 5601fb93a350+6f9641995072 --hidden --exclusive
307 $ hg debugobsolete --rev 5601fb93a350+6f9641995072 --hidden --exclusive
308 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
308 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
309 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
309 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
310 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
310 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
311
311
312 $ cd ..
312 $ cd ..
313
313
314 Revision 0 is hidden
314 Revision 0 is hidden
315 --------------------
315 --------------------
316
316
317 $ hg init rev0hidden
317 $ hg init rev0hidden
318 $ cd rev0hidden
318 $ cd rev0hidden
319
319
320 $ mkcommit kill0
320 $ mkcommit kill0
321 $ hg up -q null
321 $ hg up -q null
322 $ hg debugobsolete `getid kill0`
322 $ hg debugobsolete `getid kill0`
323 obsoleted 1 changesets
323 obsoleted 1 changesets
324 $ mkcommit a
324 $ mkcommit a
325 $ mkcommit b
325 $ mkcommit b
326
326
327 Should pick the first visible revision as "repo" node
327 Should pick the first visible revision as "repo" node
328
328
329 $ hg archive ../archive-null
329 $ hg archive ../archive-null
330 $ cat ../archive-null/.hg_archival.txt
330 $ cat ../archive-null/.hg_archival.txt
331 repo: 1f0dee641bb7258c56bd60e93edfa2405381c41e
331 repo: 1f0dee641bb7258c56bd60e93edfa2405381c41e
332 node: 7c3bad9141dcb46ff89abf5f61856facd56e476c
332 node: 7c3bad9141dcb46ff89abf5f61856facd56e476c
333 branch: default
333 branch: default
334 latesttag: null
334 latesttag: null
335 latesttagdistance: 2
335 latesttagdistance: 2
336 changessincelatesttag: 2
336 changessincelatesttag: 2
337
337
338
338
339 $ cd ..
339 $ cd ..
340
340
341 Exchange Test
341 Exchange Test
342 ============================
342 ============================
343
343
344 Destination repo does not have any data
344 Destination repo does not have any data
345 ---------------------------------------
345 ---------------------------------------
346
346
347 Simple incoming test
347 Simple incoming test
348
348
349 $ hg init tmpc
349 $ hg init tmpc
350 $ cd tmpc
350 $ cd tmpc
351 $ hg incoming ../tmpb
351 $ hg incoming ../tmpb
352 comparing with ../tmpb
352 comparing with ../tmpb
353 0:1f0dee641bb7 (public) [ ] add a
353 0:1f0dee641bb7 (public) [ ] add a
354 1:7c3bad9141dc (public) [ ] add b
354 1:7c3bad9141dc (public) [ ] add b
355 2:245bde4270cd (public) [ ] add original_c
355 2:245bde4270cd (public) [ ] add original_c
356 6:6f9641995072 (draft) [tip ] add n3w_3_c
356 6:6f9641995072 (draft) [tip ] add n3w_3_c
357
357
358 Try to pull markers
358 Try to pull markers
359 (extinct changeset are excluded but marker are pushed)
359 (extinct changeset are excluded but marker are pushed)
360
360
361 $ hg pull ../tmpb
361 $ hg pull ../tmpb
362 pulling from ../tmpb
362 pulling from ../tmpb
363 requesting all changes
363 requesting all changes
364 adding changesets
364 adding changesets
365 adding manifests
365 adding manifests
366 adding file changes
366 adding file changes
367 added 4 changesets with 4 changes to 4 files (+1 heads)
367 added 4 changesets with 4 changes to 4 files (+1 heads)
368 5 new obsolescence markers
368 5 new obsolescence markers
369 new changesets 1f0dee641bb7:6f9641995072
369 new changesets 1f0dee641bb7:6f9641995072
370 (run 'hg heads' to see heads, 'hg merge' to merge)
370 (run 'hg heads' to see heads, 'hg merge' to merge)
371 $ hg debugobsolete
371 $ hg debugobsolete
372 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
372 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
373 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
373 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
374 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
374 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
375 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
375 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
376 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
376 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
377
377
378 Rollback//Transaction support
378 Rollback//Transaction support
379
379
380 $ hg debugobsolete -d '1340 0' aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
380 $ hg debugobsolete -d '1340 0' aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
381 $ hg debugobsolete
381 $ hg debugobsolete
382 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
382 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
383 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
383 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
384 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
384 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
385 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
385 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
386 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
386 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
387 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:22:20 1970 +0000) {'user': 'test'}
387 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:22:20 1970 +0000) {'user': 'test'}
388 $ hg rollback -n
388 $ hg rollback -n
389 repository tip rolled back to revision 3 (undo debugobsolete)
389 repository tip rolled back to revision 3 (undo debugobsolete)
390 $ hg rollback
390 $ hg rollback
391 repository tip rolled back to revision 3 (undo debugobsolete)
391 repository tip rolled back to revision 3 (undo debugobsolete)
392 $ hg debugobsolete
392 $ hg debugobsolete
393 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
393 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
394 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
394 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
395 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
395 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
396 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
396 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
397 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
397 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
398
398
399 $ cd ..
399 $ cd ..
400
400
401 Try to push markers
401 Try to push markers
402
402
403 $ hg init tmpd
403 $ hg init tmpd
404 $ hg -R tmpb push tmpd
404 $ hg -R tmpb push tmpd
405 pushing to tmpd
405 pushing to tmpd
406 searching for changes
406 searching for changes
407 adding changesets
407 adding changesets
408 adding manifests
408 adding manifests
409 adding file changes
409 adding file changes
410 added 4 changesets with 4 changes to 4 files (+1 heads)
410 added 4 changesets with 4 changes to 4 files (+1 heads)
411 5 new obsolescence markers
411 5 new obsolescence markers
412 $ hg -R tmpd debugobsolete | sort
412 $ hg -R tmpd debugobsolete | sort
413 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
413 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
414 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
414 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
415 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
415 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
416 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
416 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
417 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
417 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
418
418
419 Check obsolete keys are exchanged only if source has an obsolete store
419 Check obsolete keys are exchanged only if source has an obsolete store
420
420
421 $ hg init empty
421 $ hg init empty
422 $ hg --config extensions.debugkeys=debugkeys.py -R empty push tmpd
422 $ hg --config extensions.debugkeys=debugkeys.py -R empty push tmpd
423 pushing to tmpd
423 pushing to tmpd
424 listkeys phases
424 listkeys phases
425 listkeys bookmarks
425 listkeys bookmarks
426 no changes found
426 no changes found
427 listkeys phases
427 listkeys phases
428 [1]
428 [1]
429
429
430 clone support
430 clone support
431 (markers are copied and extinct changesets are included to allow hardlinks)
431 (markers are copied and extinct changesets are included to allow hardlinks)
432
432
433 $ hg clone tmpb clone-dest
433 $ hg clone tmpb clone-dest
434 updating to branch default
434 updating to branch default
435 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
435 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
436 $ hg -R clone-dest log -G --hidden
436 $ hg -R clone-dest log -G --hidden
437 @ 6:6f9641995072 (draft) [tip ] add n3w_3_c
437 @ 6:6f9641995072 (draft) [tip ] add n3w_3_c
438 |
438 |
439 | x 5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c [rewritten as 6:6f9641995072]
439 | x 5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c [rewritten as 6:6f9641995072]
440 |/
440 |/
441 | x 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350]
441 | x 4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350]
442 |/
442 |/
443 | x 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9]
443 | x 3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9]
444 |/
444 |/
445 | o 2:245bde4270cd (public) [ ] add original_c
445 | o 2:245bde4270cd (public) [ ] add original_c
446 |/
446 |/
447 o 1:7c3bad9141dc (public) [ ] add b
447 o 1:7c3bad9141dc (public) [ ] add b
448 |
448 |
449 o 0:1f0dee641bb7 (public) [ ] add a
449 o 0:1f0dee641bb7 (public) [ ] add a
450
450
451 $ hg -R clone-dest debugobsolete
451 $ hg -R clone-dest debugobsolete
452 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
452 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
453 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
453 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
454 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
454 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
455 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
455 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
456 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
456 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
457
457
458
458
459 Destination repo have existing data
459 Destination repo have existing data
460 ---------------------------------------
460 ---------------------------------------
461
461
462 On pull
462 On pull
463
463
464 $ hg init tmpe
464 $ hg init tmpe
465 $ cd tmpe
465 $ cd tmpe
466 $ hg debugobsolete -d '1339 0' 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00
466 $ hg debugobsolete -d '1339 0' 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00
467 $ hg pull ../tmpb
467 $ hg pull ../tmpb
468 pulling from ../tmpb
468 pulling from ../tmpb
469 requesting all changes
469 requesting all changes
470 adding changesets
470 adding changesets
471 adding manifests
471 adding manifests
472 adding file changes
472 adding file changes
473 added 4 changesets with 4 changes to 4 files (+1 heads)
473 added 4 changesets with 4 changes to 4 files (+1 heads)
474 5 new obsolescence markers
474 5 new obsolescence markers
475 new changesets 1f0dee641bb7:6f9641995072
475 new changesets 1f0dee641bb7:6f9641995072
476 (run 'hg heads' to see heads, 'hg merge' to merge)
476 (run 'hg heads' to see heads, 'hg merge' to merge)
477 $ hg debugobsolete
477 $ hg debugobsolete
478 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
478 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
479 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
479 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
480 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
480 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
481 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
481 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
482 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
482 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
483 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
483 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
484
484
485
485
486 On push
486 On push
487
487
488 $ hg push ../tmpc
488 $ hg push ../tmpc
489 pushing to ../tmpc
489 pushing to ../tmpc
490 searching for changes
490 searching for changes
491 no changes found
491 no changes found
492 1 new obsolescence markers
492 1 new obsolescence markers
493 [1]
493 [1]
494 $ hg -R ../tmpc debugobsolete
494 $ hg -R ../tmpc debugobsolete
495 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
495 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
496 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
496 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
497 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
497 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
498 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
498 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
499 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
499 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
500 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
500 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
501
501
502 detect outgoing obsolete and unstable
502 detect outgoing obsolete and unstable
503 ---------------------------------------
503 ---------------------------------------
504
504
505
505
506 $ hg log -G
506 $ hg log -G
507 o 3:6f9641995072 (draft) [tip ] add n3w_3_c
507 o 3:6f9641995072 (draft) [tip ] add n3w_3_c
508 |
508 |
509 | o 2:245bde4270cd (public) [ ] add original_c
509 | o 2:245bde4270cd (public) [ ] add original_c
510 |/
510 |/
511 o 1:7c3bad9141dc (public) [ ] add b
511 o 1:7c3bad9141dc (public) [ ] add b
512 |
512 |
513 o 0:1f0dee641bb7 (public) [ ] add a
513 o 0:1f0dee641bb7 (public) [ ] add a
514
514
515 $ hg up 'desc("n3w_3_c")'
515 $ hg up 'desc("n3w_3_c")'
516 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
516 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
517 $ mkcommit original_d
517 $ mkcommit original_d
518 $ mkcommit original_e
518 $ mkcommit original_e
519 $ hg debugobsolete --record-parents `getid original_d` -d '0 0'
519 $ hg debugobsolete --record-parents `getid original_d` -d '0 0'
520 obsoleted 1 changesets
520 obsoleted 1 changesets
521 $ hg debugobsolete | grep `getid original_d`
521 $ hg debugobsolete | grep `getid original_d`
522 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
522 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
523 $ hg log -r 'obsolete()'
523 $ hg log -r 'obsolete()'
524 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned]
524 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned]
525 $ hg summary
525 $ hg summary
526 parent: 5:cda648ca50f5 tip (orphan)
526 parent: 5:cda648ca50f5 tip (orphan)
527 add original_e
527 add original_e
528 branch: default
528 branch: default
529 commit: (clean)
529 commit: (clean)
530 update: 1 new changesets, 2 branch heads (merge)
530 update: 1 new changesets, 2 branch heads (merge)
531 phases: 3 draft
531 phases: 3 draft
532 orphan: 1 changesets
532 orphan: 1 changesets
533 $ hg log -G -r '::orphan()'
533 $ hg log -G -r '::orphan()'
534 @ 5:cda648ca50f5 (draft orphan) [tip ] add original_e
534 @ 5:cda648ca50f5 (draft orphan) [tip ] add original_e
535 |
535 |
536 x 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned]
536 x 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned]
537 |
537 |
538 o 3:6f9641995072 (draft) [ ] add n3w_3_c
538 o 3:6f9641995072 (draft) [ ] add n3w_3_c
539 |
539 |
540 o 1:7c3bad9141dc (public) [ ] add b
540 o 1:7c3bad9141dc (public) [ ] add b
541 |
541 |
542 o 0:1f0dee641bb7 (public) [ ] add a
542 o 0:1f0dee641bb7 (public) [ ] add a
543
543
544
544
545 refuse to push obsolete changeset
545 refuse to push obsolete changeset
546
546
547 $ hg push ../tmpc/ -r 'desc("original_d")'
547 $ hg push ../tmpc/ -r 'desc("original_d")'
548 pushing to ../tmpc/
548 pushing to ../tmpc/
549 searching for changes
549 searching for changes
550 abort: push includes obsolete changeset: 94b33453f93b!
550 abort: push includes obsolete changeset: 94b33453f93b!
551 [255]
551 [255]
552
552
553 refuse to push unstable changeset
553 refuse to push unstable changeset
554
554
555 $ hg push ../tmpc/
555 $ hg push ../tmpc/
556 pushing to ../tmpc/
556 pushing to ../tmpc/
557 searching for changes
557 searching for changes
558 abort: push includes orphan changeset: cda648ca50f5!
558 abort: push includes orphan changeset: cda648ca50f5!
559 [255]
559 [255]
560
560
561 Test that extinct changeset are properly detected
561 Test that extinct changeset are properly detected
562
562
563 $ hg log -r 'extinct()'
563 $ hg log -r 'extinct()'
564
564
565 Don't try to push extinct changeset
565 Don't try to push extinct changeset
566
566
567 $ hg init ../tmpf
567 $ hg init ../tmpf
568 $ hg out ../tmpf
568 $ hg out ../tmpf
569 comparing with ../tmpf
569 comparing with ../tmpf
570 searching for changes
570 searching for changes
571 0:1f0dee641bb7 (public) [ ] add a
571 0:1f0dee641bb7 (public) [ ] add a
572 1:7c3bad9141dc (public) [ ] add b
572 1:7c3bad9141dc (public) [ ] add b
573 2:245bde4270cd (public) [ ] add original_c
573 2:245bde4270cd (public) [ ] add original_c
574 3:6f9641995072 (draft) [ ] add n3w_3_c
574 3:6f9641995072 (draft) [ ] add n3w_3_c
575 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned]
575 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned]
576 5:cda648ca50f5 (draft orphan) [tip ] add original_e
576 5:cda648ca50f5 (draft orphan) [tip ] add original_e
577 $ hg push ../tmpf -f # -f because be push unstable too
577 $ hg push ../tmpf -f # -f because be push unstable too
578 pushing to ../tmpf
578 pushing to ../tmpf
579 searching for changes
579 searching for changes
580 adding changesets
580 adding changesets
581 adding manifests
581 adding manifests
582 adding file changes
582 adding file changes
583 added 6 changesets with 6 changes to 6 files (+1 heads)
583 added 6 changesets with 6 changes to 6 files (+1 heads)
584 7 new obsolescence markers
584 7 new obsolescence markers
585
585
586 no warning displayed
586 no warning displayed
587
587
588 $ hg push ../tmpf
588 $ hg push ../tmpf
589 pushing to ../tmpf
589 pushing to ../tmpf
590 searching for changes
590 searching for changes
591 no changes found
591 no changes found
592 [1]
592 [1]
593
593
594 Do not warn about new head when the new head is a successors of a remote one
594 Do not warn about new head when the new head is a successors of a remote one
595
595
596 $ hg log -G
596 $ hg log -G
597 @ 5:cda648ca50f5 (draft orphan) [tip ] add original_e
597 @ 5:cda648ca50f5 (draft orphan) [tip ] add original_e
598 |
598 |
599 x 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned]
599 x 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned]
600 |
600 |
601 o 3:6f9641995072 (draft) [ ] add n3w_3_c
601 o 3:6f9641995072 (draft) [ ] add n3w_3_c
602 |
602 |
603 | o 2:245bde4270cd (public) [ ] add original_c
603 | o 2:245bde4270cd (public) [ ] add original_c
604 |/
604 |/
605 o 1:7c3bad9141dc (public) [ ] add b
605 o 1:7c3bad9141dc (public) [ ] add b
606 |
606 |
607 o 0:1f0dee641bb7 (public) [ ] add a
607 o 0:1f0dee641bb7 (public) [ ] add a
608
608
609 $ hg up -q 'desc(n3w_3_c)'
609 $ hg up -q 'desc(n3w_3_c)'
610 $ mkcommit obsolete_e
610 $ mkcommit obsolete_e
611 created new head
611 created new head
612 $ hg debugobsolete `getid 'original_e'` `getid 'obsolete_e'` \
612 $ hg debugobsolete `getid 'original_e'` `getid 'obsolete_e'` \
613 > -u 'test <test@example.net>'
613 > -u 'test <test@example.net>'
614 obsoleted 1 changesets
614 obsoleted 1 changesets
615 $ hg outgoing ../tmpf # parasite hg outgoing testin
615 $ hg outgoing ../tmpf # parasite hg outgoing testin
616 comparing with ../tmpf
616 comparing with ../tmpf
617 searching for changes
617 searching for changes
618 6:3de5eca88c00 (draft) [tip ] add obsolete_e
618 6:3de5eca88c00 (draft) [tip ] add obsolete_e
619 $ hg push ../tmpf
619 $ hg push ../tmpf
620 pushing to ../tmpf
620 pushing to ../tmpf
621 searching for changes
621 searching for changes
622 adding changesets
622 adding changesets
623 adding manifests
623 adding manifests
624 adding file changes
624 adding file changes
625 added 1 changesets with 1 changes to 1 files (+1 heads)
625 added 1 changesets with 1 changes to 1 files (+1 heads)
626 1 new obsolescence markers
626 1 new obsolescence markers
627 obsoleted 1 changesets
627 obsoleted 1 changesets
628
628
629 test relevance computation
629 test relevance computation
630 ---------------------------------------
630 ---------------------------------------
631
631
632 Checking simple case of "marker relevance".
632 Checking simple case of "marker relevance".
633
633
634
634
635 Reminder of the repo situation
635 Reminder of the repo situation
636
636
637 $ hg log --hidden --graph
637 $ hg log --hidden --graph
638 @ 6:3de5eca88c00 (draft) [tip ] add obsolete_e
638 @ 6:3de5eca88c00 (draft) [tip ] add obsolete_e
639 |
639 |
640 | x 5:cda648ca50f5 (draft *obsolete*) [ ] add original_e [rewritten as 6:3de5eca88c00 by test <test@example.net>]
640 | x 5:cda648ca50f5 (draft *obsolete*) [ ] add original_e [rewritten as 6:3de5eca88c00 by test <test@example.net>]
641 | |
641 | |
642 | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned]
642 | x 4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned]
643 |/
643 |/
644 o 3:6f9641995072 (draft) [ ] add n3w_3_c
644 o 3:6f9641995072 (draft) [ ] add n3w_3_c
645 |
645 |
646 | o 2:245bde4270cd (public) [ ] add original_c
646 | o 2:245bde4270cd (public) [ ] add original_c
647 |/
647 |/
648 o 1:7c3bad9141dc (public) [ ] add b
648 o 1:7c3bad9141dc (public) [ ] add b
649 |
649 |
650 o 0:1f0dee641bb7 (public) [ ] add a
650 o 0:1f0dee641bb7 (public) [ ] add a
651
651
652
652
653 List of all markers
653 List of all markers
654
654
655 $ hg debugobsolete
655 $ hg debugobsolete
656 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
656 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
657 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
657 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
658 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
658 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
659 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
659 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
660 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
660 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
661 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
661 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
662 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
662 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
663 cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob)
663 cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob)
664
664
665 List of changesets with no chain
665 List of changesets with no chain
666
666
667 $ hg debugobsolete --hidden --rev ::2
667 $ hg debugobsolete --hidden --rev ::2
668
668
669 List of changesets that are included on marker chain
669 List of changesets that are included on marker chain
670
670
671 $ hg debugobsolete --hidden --rev 6
671 $ hg debugobsolete --hidden --rev 6
672 cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob)
672 cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob)
673
673
674 List of changesets with a longer chain, (including a pruned children)
674 List of changesets with a longer chain, (including a pruned children)
675
675
676 $ hg debugobsolete --hidden --rev 3
676 $ hg debugobsolete --hidden --rev 3
677 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
677 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
678 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
678 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
679 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
679 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
680 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
680 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
681 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
681 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
682 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
682 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
683 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
683 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
684
684
685 List of both
685 List of both
686
686
687 $ hg debugobsolete --hidden --rev 3::6
687 $ hg debugobsolete --hidden --rev 3::6
688 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
688 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
689 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
689 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
690 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
690 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
691 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
691 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
692 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
692 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
693 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
693 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
694 cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob)
694 cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test <test@example.net>'} (glob)
695 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
695 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
696
696
697 List of all markers in JSON
697 List of all markers in JSON
698
698
699 $ hg debugobsolete -Tjson
699 $ hg debugobsolete -Tjson
700 [
700 [
701 {
701 {
702 "date": [1339.0, 0],
702 "date": [1339.0, 0],
703 "flag": 0,
703 "flag": 0,
704 "metadata": {"user": "test"},
704 "metadata": {"user": "test"},
705 "prednode": "1339133913391339133913391339133913391339",
705 "prednode": "1339133913391339133913391339133913391339",
706 "succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"]
706 "succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"]
707 },
707 },
708 {
708 {
709 "date": [1339.0, 0],
709 "date": [1339.0, 0],
710 "flag": 0,
710 "flag": 0,
711 "metadata": {"user": "test"},
711 "metadata": {"user": "test"},
712 "prednode": "1337133713371337133713371337133713371337",
712 "prednode": "1337133713371337133713371337133713371337",
713 "succnodes": ["5601fb93a350734d935195fee37f4054c529ff39"]
713 "succnodes": ["5601fb93a350734d935195fee37f4054c529ff39"]
714 },
714 },
715 {
715 {
716 "date": [121.0, 120],
716 "date": [121.0, 120],
717 "flag": 12,
717 "flag": 12,
718 "metadata": {"user": "test"},
718 "metadata": {"user": "test"},
719 "prednode": "245bde4270cd1072a27757984f9cda8ba26f08ca",
719 "prednode": "245bde4270cd1072a27757984f9cda8ba26f08ca",
720 "succnodes": ["cdbce2fbb16313928851e97e0d85413f3f7eb77f"]
720 "succnodes": ["cdbce2fbb16313928851e97e0d85413f3f7eb77f"]
721 },
721 },
722 {
722 {
723 "date": [1338.0, 0],
723 "date": [1338.0, 0],
724 "flag": 1,
724 "flag": 1,
725 "metadata": {"user": "test"},
725 "metadata": {"user": "test"},
726 "prednode": "5601fb93a350734d935195fee37f4054c529ff39",
726 "prednode": "5601fb93a350734d935195fee37f4054c529ff39",
727 "succnodes": ["6f96419950729f3671185b847352890f074f7557"]
727 "succnodes": ["6f96419950729f3671185b847352890f074f7557"]
728 },
728 },
729 {
729 {
730 "date": [1338.0, 0],
730 "date": [1338.0, 0],
731 "flag": 0,
731 "flag": 0,
732 "metadata": {"user": "test"},
732 "metadata": {"user": "test"},
733 "prednode": "ca819180edb99ed25ceafb3e9584ac287e240b00",
733 "prednode": "ca819180edb99ed25ceafb3e9584ac287e240b00",
734 "succnodes": ["1337133713371337133713371337133713371337"]
734 "succnodes": ["1337133713371337133713371337133713371337"]
735 },
735 },
736 {
736 {
737 "date": [1337.0, 0],
737 "date": [1337.0, 0],
738 "flag": 0,
738 "flag": 0,
739 "metadata": {"user": "test"},
739 "metadata": {"user": "test"},
740 "prednode": "cdbce2fbb16313928851e97e0d85413f3f7eb77f",
740 "prednode": "cdbce2fbb16313928851e97e0d85413f3f7eb77f",
741 "succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"]
741 "succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"]
742 },
742 },
743 {
743 {
744 "date": [0.0, 0],
744 "date": [0.0, 0],
745 "flag": 0,
745 "flag": 0,
746 "metadata": {"user": "test"},
746 "metadata": {"user": "test"},
747 "parentnodes": ["6f96419950729f3671185b847352890f074f7557"],
747 "parentnodes": ["6f96419950729f3671185b847352890f074f7557"],
748 "prednode": "94b33453f93bdb8d457ef9b770851a618bf413e1",
748 "prednode": "94b33453f93bdb8d457ef9b770851a618bf413e1",
749 "succnodes": []
749 "succnodes": []
750 },
750 },
751 {
751 {
752 "date": *, (glob)
752 "date": *, (glob)
753 "flag": 0,
753 "flag": 0,
754 "metadata": {"user": "test <test@example.net>"},
754 "metadata": {"user": "test <test@example.net>"},
755 "prednode": "cda648ca50f50482b7055c0b0c4c117bba6733d9",
755 "prednode": "cda648ca50f50482b7055c0b0c4c117bba6733d9",
756 "succnodes": ["3de5eca88c00aa039da7399a220f4a5221faa585"]
756 "succnodes": ["3de5eca88c00aa039da7399a220f4a5221faa585"]
757 }
757 }
758 ]
758 ]
759
759
760 Template keywords
760 Template keywords
761
761
762 $ hg debugobsolete -r6 -T '{succnodes % "{node|short}"} {date|shortdate}\n'
762 $ hg debugobsolete -r6 -T '{succnodes % "{node|short}"} {date|shortdate}\n'
763 3de5eca88c00 ????-??-?? (glob)
763 3de5eca88c00 ????-??-?? (glob)
764 $ hg debugobsolete -r6 -T '{join(metadata % "{key}={value}", " ")}\n'
764 $ hg debugobsolete -r6 -T '{join(metadata % "{key}={value}", " ")}\n'
765 user=test <test@example.net>
765 user=test <test@example.net>
766 $ hg debugobsolete -r6 -T '{metadata}\n{metadata}\n'
766 $ hg debugobsolete -r6 -T '{metadata}\n{metadata}\n'
767 'user': 'test <test@example.net>'
767 'user': 'test <test@example.net>'
768 'user': 'test <test@example.net>'
768 'user': 'test <test@example.net>'
769 $ hg debugobsolete -r6 -T '{succnodes}\n{succnodes}\n'
769 $ hg debugobsolete -r6 -T '{succnodes}\n{succnodes}\n'
770 3de5eca88c00aa039da7399a220f4a5221faa585
770 3de5eca88c00aa039da7399a220f4a5221faa585
771 3de5eca88c00aa039da7399a220f4a5221faa585
771 3de5eca88c00aa039da7399a220f4a5221faa585
772 $ hg debugobsolete -r6 -T '{flag} {get(metadata, "user")}\n'
772 $ hg debugobsolete -r6 -T '{flag} {get(metadata, "user")}\n'
773 0 test <test@example.net>
773 0 test <test@example.net>
774
774
775 Test the debug output for exchange
775 Test the debug output for exchange
776 ----------------------------------
776 ----------------------------------
777
777
778 $ hg pull ../tmpb --config 'experimental.obsmarkers-exchange-debug=True' # bundle2
778 $ hg pull ../tmpb --config 'experimental.obsmarkers-exchange-debug=True' # bundle2
779 pulling from ../tmpb
779 pulling from ../tmpb
780 searching for changes
780 searching for changes
781 no changes found
781 no changes found
782 obsmarker-exchange: 346 bytes received
782 obsmarker-exchange: 346 bytes received
783
783
784 check hgweb does not explode
784 check hgweb does not explode
785 ====================================
785 ====================================
786
786
787 $ hg unbundle $TESTDIR/bundles/hgweb+obs.hg
787 $ hg unbundle $TESTDIR/bundles/hgweb+obs.hg
788 adding changesets
788 adding changesets
789 adding manifests
789 adding manifests
790 adding file changes
790 adding file changes
791 added 62 changesets with 63 changes to 9 files (+60 heads)
791 added 62 changesets with 63 changes to 9 files (+60 heads)
792 new changesets 50c51b361e60:c15e9edfca13
792 new changesets 50c51b361e60:c15e9edfca13
793 (run 'hg heads .' to see heads, 'hg merge' to merge)
793 (run 'hg heads .' to see heads, 'hg merge' to merge)
794 $ for node in `hg log -r 'desc(babar_)' --template '{node}\n'`;
794 $ for node in `hg log -r 'desc(babar_)' --template '{node}\n'`;
795 > do
795 > do
796 > hg debugobsolete $node
796 > hg debugobsolete $node
797 > done
797 > done
798 obsoleted 1 changesets
798 obsoleted 1 changesets
799 obsoleted 1 changesets
799 obsoleted 1 changesets
800 obsoleted 1 changesets
800 obsoleted 1 changesets
801 obsoleted 1 changesets
801 obsoleted 1 changesets
802 obsoleted 1 changesets
802 obsoleted 1 changesets
803 obsoleted 1 changesets
803 obsoleted 1 changesets
804 obsoleted 1 changesets
804 obsoleted 1 changesets
805 obsoleted 1 changesets
805 obsoleted 1 changesets
806 obsoleted 1 changesets
806 obsoleted 1 changesets
807 obsoleted 1 changesets
807 obsoleted 1 changesets
808 obsoleted 1 changesets
808 obsoleted 1 changesets
809 obsoleted 1 changesets
809 obsoleted 1 changesets
810 obsoleted 1 changesets
810 obsoleted 1 changesets
811 obsoleted 1 changesets
811 obsoleted 1 changesets
812 obsoleted 1 changesets
812 obsoleted 1 changesets
813 obsoleted 1 changesets
813 obsoleted 1 changesets
814 obsoleted 1 changesets
814 obsoleted 1 changesets
815 obsoleted 1 changesets
815 obsoleted 1 changesets
816 obsoleted 1 changesets
816 obsoleted 1 changesets
817 obsoleted 1 changesets
817 obsoleted 1 changesets
818 obsoleted 1 changesets
818 obsoleted 1 changesets
819 obsoleted 1 changesets
819 obsoleted 1 changesets
820 obsoleted 1 changesets
820 obsoleted 1 changesets
821 obsoleted 1 changesets
821 obsoleted 1 changesets
822 obsoleted 1 changesets
822 obsoleted 1 changesets
823 obsoleted 1 changesets
823 obsoleted 1 changesets
824 obsoleted 1 changesets
824 obsoleted 1 changesets
825 obsoleted 1 changesets
825 obsoleted 1 changesets
826 obsoleted 1 changesets
826 obsoleted 1 changesets
827 obsoleted 1 changesets
827 obsoleted 1 changesets
828 obsoleted 1 changesets
828 obsoleted 1 changesets
829 obsoleted 1 changesets
829 obsoleted 1 changesets
830 obsoleted 1 changesets
830 obsoleted 1 changesets
831 obsoleted 1 changesets
831 obsoleted 1 changesets
832 obsoleted 1 changesets
832 obsoleted 1 changesets
833 obsoleted 1 changesets
833 obsoleted 1 changesets
834 obsoleted 1 changesets
834 obsoleted 1 changesets
835 obsoleted 1 changesets
835 obsoleted 1 changesets
836 obsoleted 1 changesets
836 obsoleted 1 changesets
837 obsoleted 1 changesets
837 obsoleted 1 changesets
838 obsoleted 1 changesets
838 obsoleted 1 changesets
839 obsoleted 1 changesets
839 obsoleted 1 changesets
840 obsoleted 1 changesets
840 obsoleted 1 changesets
841 obsoleted 1 changesets
841 obsoleted 1 changesets
842 obsoleted 1 changesets
842 obsoleted 1 changesets
843 obsoleted 1 changesets
843 obsoleted 1 changesets
844 obsoleted 1 changesets
844 obsoleted 1 changesets
845 obsoleted 1 changesets
845 obsoleted 1 changesets
846 obsoleted 1 changesets
846 obsoleted 1 changesets
847 obsoleted 1 changesets
847 obsoleted 1 changesets
848 obsoleted 1 changesets
848 obsoleted 1 changesets
849 obsoleted 1 changesets
849 obsoleted 1 changesets
850 obsoleted 1 changesets
850 obsoleted 1 changesets
851 obsoleted 1 changesets
851 obsoleted 1 changesets
852 obsoleted 1 changesets
852 obsoleted 1 changesets
853 obsoleted 1 changesets
853 obsoleted 1 changesets
854 obsoleted 1 changesets
854 obsoleted 1 changesets
855 obsoleted 1 changesets
855 obsoleted 1 changesets
856 obsoleted 1 changesets
856 obsoleted 1 changesets
857 obsoleted 1 changesets
857 obsoleted 1 changesets
858 $ hg up tip
858 $ hg up tip
859 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
859 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
860
860
861 #if serve
861 #if serve
862
862
863 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
863 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
864 $ cat hg.pid >> $DAEMON_PIDS
864 $ cat hg.pid >> $DAEMON_PIDS
865
865
866 check changelog view
866 check changelog view
867
867
868 $ get-with-headers.py --headeronly localhost:$HGPORT 'shortlog/'
868 $ get-with-headers.py --headeronly localhost:$HGPORT 'shortlog/'
869 200 Script output follows
869 200 Script output follows
870
870
871 check graph view
871 check graph view
872
872
873 $ get-with-headers.py --headeronly localhost:$HGPORT 'graph'
873 $ get-with-headers.py --headeronly localhost:$HGPORT 'graph'
874 200 Script output follows
874 200 Script output follows
875
875
876 check filelog view
876 check filelog view
877
877
878 $ get-with-headers.py --headeronly localhost:$HGPORT 'log/'`hg log -r . -T "{node}"`/'babar'
878 $ get-with-headers.py --headeronly localhost:$HGPORT 'log/'`hg log -r . -T "{node}"`/'babar'
879 200 Script output follows
879 200 Script output follows
880
880
881 $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/68'
881 $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/68'
882 200 Script output follows
882 200 Script output follows
883 $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67'
883 $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67'
884 404 Not Found
884 404 Not Found
885 [1]
885 [1]
886
886
887 check that web.view config option:
887 check that web.view config option:
888
888
889 $ killdaemons.py hg.pid
889 $ killdaemons.py hg.pid
890 $ cat >> .hg/hgrc << EOF
890 $ cat >> .hg/hgrc << EOF
891 > [web]
891 > [web]
892 > view=all
892 > view=all
893 > EOF
893 > EOF
894 $ wait
894 $ wait
895 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
895 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
896 $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67'
896 $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67'
897 200 Script output follows
897 200 Script output follows
898 $ killdaemons.py hg.pid
898 $ killdaemons.py hg.pid
899
899
900 Checking _enable=False warning if obsolete marker exists
900 Checking _enable=False warning if obsolete marker exists
901
901
902 $ echo '[experimental]' >> $HGRCPATH
902 $ echo '[experimental]' >> $HGRCPATH
903 $ echo "evolution=" >> $HGRCPATH
903 $ echo "evolution=" >> $HGRCPATH
904 $ hg log -r tip
904 $ hg log -r tip
905 68:c15e9edfca13 (draft) [tip ] add celestine
905 68:c15e9edfca13 (draft) [tip ] add celestine
906
906
907 reenable for later test
907 reenable for later test
908
908
909 $ echo '[experimental]' >> $HGRCPATH
909 $ echo '[experimental]' >> $HGRCPATH
910 $ echo "evolution=exchange" >> $HGRCPATH
910 $ echo "evolution.exchange=True" >> $HGRCPATH
911 $ echo "evolution.createmarkers=True" >> $HGRCPATH
911 $ echo "evolution.createmarkers=True" >> $HGRCPATH
912
912
913 $ rm hg.pid access.log errors.log
913 $ rm hg.pid access.log errors.log
914 #endif
914 #endif
915
915
916 Several troubles on the same changeset (create an unstable and bumped changeset)
916 Several troubles on the same changeset (create an unstable and bumped changeset)
917
917
918 $ hg debugobsolete `getid obsolete_e`
918 $ hg debugobsolete `getid obsolete_e`
919 obsoleted 1 changesets
919 obsoleted 1 changesets
920 $ hg debugobsolete `getid original_c` `getid babar`
920 $ hg debugobsolete `getid original_c` `getid babar`
921 $ hg log --config ui.logtemplate= -r 'phasedivergent() and orphan()'
921 $ hg log --config ui.logtemplate= -r 'phasedivergent() and orphan()'
922 changeset: 7:50c51b361e60
922 changeset: 7:50c51b361e60
923 user: test
923 user: test
924 date: Thu Jan 01 00:00:00 1970 +0000
924 date: Thu Jan 01 00:00:00 1970 +0000
925 instability: orphan, phase-divergent
925 instability: orphan, phase-divergent
926 summary: add babar
926 summary: add babar
927
927
928
928
929 test the "obsolete" templatekw
929 test the "obsolete" templatekw
930
930
931 $ hg log -r 'obsolete()'
931 $ hg log -r 'obsolete()'
932 6:3de5eca88c00 (draft *obsolete*) [ ] add obsolete_e [pruned]
932 6:3de5eca88c00 (draft *obsolete*) [ ] add obsolete_e [pruned]
933
933
934 test the "troubles" templatekw
934 test the "troubles" templatekw
935
935
936 $ hg log -r 'phasedivergent() and orphan()'
936 $ hg log -r 'phasedivergent() and orphan()'
937 7:50c51b361e60 (draft orphan phase-divergent) [ ] add babar
937 7:50c51b361e60 (draft orphan phase-divergent) [ ] add babar
938
938
939 test the default cmdline template
939 test the default cmdline template
940
940
941 $ hg log -T default -r 'phasedivergent()'
941 $ hg log -T default -r 'phasedivergent()'
942 changeset: 7:50c51b361e60
942 changeset: 7:50c51b361e60
943 user: test
943 user: test
944 date: Thu Jan 01 00:00:00 1970 +0000
944 date: Thu Jan 01 00:00:00 1970 +0000
945 instability: orphan, phase-divergent
945 instability: orphan, phase-divergent
946 summary: add babar
946 summary: add babar
947
947
948 $ hg log -T default -r 'obsolete()'
948 $ hg log -T default -r 'obsolete()'
949 changeset: 6:3de5eca88c00
949 changeset: 6:3de5eca88c00
950 parent: 3:6f9641995072
950 parent: 3:6f9641995072
951 user: test
951 user: test
952 date: Thu Jan 01 00:00:00 1970 +0000
952 date: Thu Jan 01 00:00:00 1970 +0000
953 obsfate: pruned
953 obsfate: pruned
954 summary: add obsolete_e
954 summary: add obsolete_e
955
955
956
956
957 test the obsolete labels
957 test the obsolete labels
958
958
959 $ hg log --config ui.logtemplate= --color=debug -r 'phasedivergent()'
959 $ hg log --config ui.logtemplate= --color=debug -r 'phasedivergent()'
960 [log.changeset changeset.draft changeset.unstable instability.orphan instability.phase-divergent|changeset: 7:50c51b361e60]
960 [log.changeset changeset.draft changeset.unstable instability.orphan instability.phase-divergent|changeset: 7:50c51b361e60]
961 [log.user|user: test]
961 [log.user|user: test]
962 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
962 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
963 [log.instability|instability: orphan, phase-divergent]
963 [log.instability|instability: orphan, phase-divergent]
964 [log.summary|summary: add babar]
964 [log.summary|summary: add babar]
965
965
966
966
967 $ hg log -T default -r 'phasedivergent()' --color=debug
967 $ hg log -T default -r 'phasedivergent()' --color=debug
968 [log.changeset changeset.draft changeset.unstable instability.orphan instability.phase-divergent|changeset: 7:50c51b361e60]
968 [log.changeset changeset.draft changeset.unstable instability.orphan instability.phase-divergent|changeset: 7:50c51b361e60]
969 [log.user|user: test]
969 [log.user|user: test]
970 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
970 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
971 [log.instability|instability: orphan, phase-divergent]
971 [log.instability|instability: orphan, phase-divergent]
972 [log.summary|summary: add babar]
972 [log.summary|summary: add babar]
973
973
974
974
975 $ hg log --config ui.logtemplate= --color=debug -r "obsolete()"
975 $ hg log --config ui.logtemplate= --color=debug -r "obsolete()"
976 [log.changeset changeset.draft changeset.obsolete|changeset: 6:3de5eca88c00]
976 [log.changeset changeset.draft changeset.obsolete|changeset: 6:3de5eca88c00]
977 [log.parent changeset.draft|parent: 3:6f9641995072]
977 [log.parent changeset.draft|parent: 3:6f9641995072]
978 [log.user|user: test]
978 [log.user|user: test]
979 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
979 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
980 [log.obsfate|obsfate: pruned]
980 [log.obsfate|obsfate: pruned]
981 [log.summary|summary: add obsolete_e]
981 [log.summary|summary: add obsolete_e]
982
982
983
983
984 $ hg log -T default -r 'obsolete()' --color=debug
984 $ hg log -T default -r 'obsolete()' --color=debug
985 [log.changeset changeset.draft changeset.obsolete|changeset: 6:3de5eca88c00]
985 [log.changeset changeset.draft changeset.obsolete|changeset: 6:3de5eca88c00]
986 [log.parent changeset.draft|parent: 3:6f9641995072]
986 [log.parent changeset.draft|parent: 3:6f9641995072]
987 [log.user|user: test]
987 [log.user|user: test]
988 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
988 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
989 [log.obsfate|obsfate: pruned]
989 [log.obsfate|obsfate: pruned]
990 [log.summary|summary: add obsolete_e]
990 [log.summary|summary: add obsolete_e]
991
991
992
992
993 test summary output
993 test summary output
994
994
995 $ hg up -r 'phasedivergent() and orphan()'
995 $ hg up -r 'phasedivergent() and orphan()'
996 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
996 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
997 $ hg summary
997 $ hg summary
998 parent: 7:50c51b361e60 (orphan, phase-divergent)
998 parent: 7:50c51b361e60 (orphan, phase-divergent)
999 add babar
999 add babar
1000 branch: default
1000 branch: default
1001 commit: (clean)
1001 commit: (clean)
1002 update: 2 new changesets (update)
1002 update: 2 new changesets (update)
1003 phases: 4 draft
1003 phases: 4 draft
1004 orphan: 2 changesets
1004 orphan: 2 changesets
1005 phase-divergent: 1 changesets
1005 phase-divergent: 1 changesets
1006 $ hg up -r 'obsolete()'
1006 $ hg up -r 'obsolete()'
1007 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1007 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1008 $ hg summary
1008 $ hg summary
1009 parent: 6:3de5eca88c00 (obsolete)
1009 parent: 6:3de5eca88c00 (obsolete)
1010 add obsolete_e
1010 add obsolete_e
1011 branch: default
1011 branch: default
1012 commit: (clean)
1012 commit: (clean)
1013 update: 3 new changesets (update)
1013 update: 3 new changesets (update)
1014 phases: 4 draft
1014 phases: 4 draft
1015 orphan: 2 changesets
1015 orphan: 2 changesets
1016 phase-divergent: 1 changesets
1016 phase-divergent: 1 changesets
1017
1017
1018 Test incoming/outcoming with changesets obsoleted remotely, known locally
1018 Test incoming/outcoming with changesets obsoleted remotely, known locally
1019 ===============================================================================
1019 ===============================================================================
1020
1020
1021 This test issue 3805
1021 This test issue 3805
1022
1022
1023 $ hg init repo-issue3805
1023 $ hg init repo-issue3805
1024 $ cd repo-issue3805
1024 $ cd repo-issue3805
1025 $ echo "base" > base
1025 $ echo "base" > base
1026 $ hg ci -Am "base"
1026 $ hg ci -Am "base"
1027 adding base
1027 adding base
1028 $ echo "foo" > foo
1028 $ echo "foo" > foo
1029 $ hg ci -Am "A"
1029 $ hg ci -Am "A"
1030 adding foo
1030 adding foo
1031 $ hg clone . ../other-issue3805
1031 $ hg clone . ../other-issue3805
1032 updating to branch default
1032 updating to branch default
1033 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1033 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1034 $ echo "bar" >> foo
1034 $ echo "bar" >> foo
1035 $ hg ci --amend
1035 $ hg ci --amend
1036 $ cd ../other-issue3805
1036 $ cd ../other-issue3805
1037 $ hg log -G
1037 $ hg log -G
1038 @ 1:29f0c6921ddd (draft) [tip ] A
1038 @ 1:29f0c6921ddd (draft) [tip ] A
1039 |
1039 |
1040 o 0:d20a80d4def3 (draft) [ ] base
1040 o 0:d20a80d4def3 (draft) [ ] base
1041
1041
1042 $ hg log -G -R ../repo-issue3805
1042 $ hg log -G -R ../repo-issue3805
1043 @ 2:323a9c3ddd91 (draft) [tip ] A
1043 @ 2:323a9c3ddd91 (draft) [tip ] A
1044 |
1044 |
1045 o 0:d20a80d4def3 (draft) [ ] base
1045 o 0:d20a80d4def3 (draft) [ ] base
1046
1046
1047 $ hg incoming
1047 $ hg incoming
1048 comparing with $TESTTMP/tmpe/repo-issue3805 (glob)
1048 comparing with $TESTTMP/tmpe/repo-issue3805 (glob)
1049 searching for changes
1049 searching for changes
1050 2:323a9c3ddd91 (draft) [tip ] A
1050 2:323a9c3ddd91 (draft) [tip ] A
1051 $ hg incoming --bundle ../issue3805.hg
1051 $ hg incoming --bundle ../issue3805.hg
1052 comparing with $TESTTMP/tmpe/repo-issue3805 (glob)
1052 comparing with $TESTTMP/tmpe/repo-issue3805 (glob)
1053 searching for changes
1053 searching for changes
1054 2:323a9c3ddd91 (draft) [tip ] A
1054 2:323a9c3ddd91 (draft) [tip ] A
1055 $ hg outgoing
1055 $ hg outgoing
1056 comparing with $TESTTMP/tmpe/repo-issue3805 (glob)
1056 comparing with $TESTTMP/tmpe/repo-issue3805 (glob)
1057 searching for changes
1057 searching for changes
1058 1:29f0c6921ddd (draft) [tip ] A
1058 1:29f0c6921ddd (draft) [tip ] A
1059
1059
1060 #if serve
1060 #if serve
1061
1061
1062 $ hg serve -R ../repo-issue3805 -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
1062 $ hg serve -R ../repo-issue3805 -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
1063 $ cat hg.pid >> $DAEMON_PIDS
1063 $ cat hg.pid >> $DAEMON_PIDS
1064
1064
1065 $ hg incoming http://localhost:$HGPORT
1065 $ hg incoming http://localhost:$HGPORT
1066 comparing with http://localhost:$HGPORT/
1066 comparing with http://localhost:$HGPORT/
1067 searching for changes
1067 searching for changes
1068 2:323a9c3ddd91 (draft) [tip ] A
1068 2:323a9c3ddd91 (draft) [tip ] A
1069 $ hg outgoing http://localhost:$HGPORT
1069 $ hg outgoing http://localhost:$HGPORT
1070 comparing with http://localhost:$HGPORT/
1070 comparing with http://localhost:$HGPORT/
1071 searching for changes
1071 searching for changes
1072 1:29f0c6921ddd (draft) [tip ] A
1072 1:29f0c6921ddd (draft) [tip ] A
1073
1073
1074 $ killdaemons.py
1074 $ killdaemons.py
1075
1075
1076 #endif
1076 #endif
1077
1077
1078 This test issue 3814
1078 This test issue 3814
1079
1079
1080 (nothing to push but locally hidden changeset)
1080 (nothing to push but locally hidden changeset)
1081
1081
1082 $ cd ..
1082 $ cd ..
1083 $ hg init repo-issue3814
1083 $ hg init repo-issue3814
1084 $ cd repo-issue3805
1084 $ cd repo-issue3805
1085 $ hg push -r 323a9c3ddd91 ../repo-issue3814
1085 $ hg push -r 323a9c3ddd91 ../repo-issue3814
1086 pushing to ../repo-issue3814
1086 pushing to ../repo-issue3814
1087 searching for changes
1087 searching for changes
1088 adding changesets
1088 adding changesets
1089 adding manifests
1089 adding manifests
1090 adding file changes
1090 adding file changes
1091 added 2 changesets with 2 changes to 2 files
1091 added 2 changesets with 2 changes to 2 files
1092 1 new obsolescence markers
1092 1 new obsolescence markers
1093 $ hg out ../repo-issue3814
1093 $ hg out ../repo-issue3814
1094 comparing with ../repo-issue3814
1094 comparing with ../repo-issue3814
1095 searching for changes
1095 searching for changes
1096 no changes found
1096 no changes found
1097 [1]
1097 [1]
1098
1098
1099 Test that a local tag blocks a changeset from being hidden
1099 Test that a local tag blocks a changeset from being hidden
1100
1100
1101 $ hg tag -l visible -r 1 --hidden
1101 $ hg tag -l visible -r 1 --hidden
1102 $ hg log -G
1102 $ hg log -G
1103 @ 2:323a9c3ddd91 (draft) [tip ] A
1103 @ 2:323a9c3ddd91 (draft) [tip ] A
1104 |
1104 |
1105 | x 1:29f0c6921ddd (draft *obsolete*) [visible ] A [rewritten using amend as 2:323a9c3ddd91]
1105 | x 1:29f0c6921ddd (draft *obsolete*) [visible ] A [rewritten using amend as 2:323a9c3ddd91]
1106 |/
1106 |/
1107 o 0:d20a80d4def3 (draft) [ ] base
1107 o 0:d20a80d4def3 (draft) [ ] base
1108
1108
1109 Test that removing a local tag does not cause some commands to fail
1109 Test that removing a local tag does not cause some commands to fail
1110
1110
1111 $ hg tag -l -r tip tiptag
1111 $ hg tag -l -r tip tiptag
1112 $ hg tags
1112 $ hg tags
1113 tiptag 2:323a9c3ddd91
1113 tiptag 2:323a9c3ddd91
1114 tip 2:323a9c3ddd91
1114 tip 2:323a9c3ddd91
1115 visible 1:29f0c6921ddd
1115 visible 1:29f0c6921ddd
1116 $ hg --config extensions.strip= strip -r tip --no-backup
1116 $ hg --config extensions.strip= strip -r tip --no-backup
1117 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1117 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1118 $ hg tags
1118 $ hg tags
1119 visible 1:29f0c6921ddd
1119 visible 1:29f0c6921ddd
1120 tip 1:29f0c6921ddd
1120 tip 1:29f0c6921ddd
1121
1121
1122 Test bundle overlay onto hidden revision
1122 Test bundle overlay onto hidden revision
1123
1123
1124 $ cd ..
1124 $ cd ..
1125 $ hg init repo-bundleoverlay
1125 $ hg init repo-bundleoverlay
1126 $ cd repo-bundleoverlay
1126 $ cd repo-bundleoverlay
1127 $ echo "A" > foo
1127 $ echo "A" > foo
1128 $ hg ci -Am "A"
1128 $ hg ci -Am "A"
1129 adding foo
1129 adding foo
1130 $ echo "B" >> foo
1130 $ echo "B" >> foo
1131 $ hg ci -m "B"
1131 $ hg ci -m "B"
1132 $ hg up 0
1132 $ hg up 0
1133 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1133 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1134 $ echo "C" >> foo
1134 $ echo "C" >> foo
1135 $ hg ci -m "C"
1135 $ hg ci -m "C"
1136 created new head
1136 created new head
1137 $ hg log -G
1137 $ hg log -G
1138 @ 2:c186d7714947 (draft) [tip ] C
1138 @ 2:c186d7714947 (draft) [tip ] C
1139 |
1139 |
1140 | o 1:44526ebb0f98 (draft) [ ] B
1140 | o 1:44526ebb0f98 (draft) [ ] B
1141 |/
1141 |/
1142 o 0:4b34ecfb0d56 (draft) [ ] A
1142 o 0:4b34ecfb0d56 (draft) [ ] A
1143
1143
1144
1144
1145 $ hg clone -r1 . ../other-bundleoverlay
1145 $ hg clone -r1 . ../other-bundleoverlay
1146 adding changesets
1146 adding changesets
1147 adding manifests
1147 adding manifests
1148 adding file changes
1148 adding file changes
1149 added 2 changesets with 2 changes to 1 files
1149 added 2 changesets with 2 changes to 1 files
1150 new changesets 4b34ecfb0d56:44526ebb0f98
1150 new changesets 4b34ecfb0d56:44526ebb0f98
1151 updating to branch default
1151 updating to branch default
1152 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1152 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1153 $ cd ../other-bundleoverlay
1153 $ cd ../other-bundleoverlay
1154 $ echo "B+" >> foo
1154 $ echo "B+" >> foo
1155 $ hg ci --amend -m "B+"
1155 $ hg ci --amend -m "B+"
1156 $ hg log -G --hidden
1156 $ hg log -G --hidden
1157 @ 2:b7d587542d40 (draft) [tip ] B+
1157 @ 2:b7d587542d40 (draft) [tip ] B+
1158 |
1158 |
1159 | x 1:44526ebb0f98 (draft *obsolete*) [ ] B [rewritten using amend as 2:b7d587542d40]
1159 | x 1:44526ebb0f98 (draft *obsolete*) [ ] B [rewritten using amend as 2:b7d587542d40]
1160 |/
1160 |/
1161 o 0:4b34ecfb0d56 (draft) [ ] A
1161 o 0:4b34ecfb0d56 (draft) [ ] A
1162
1162
1163
1163
1164 $ hg incoming ../repo-bundleoverlay --bundle ../bundleoverlay.hg
1164 $ hg incoming ../repo-bundleoverlay --bundle ../bundleoverlay.hg
1165 comparing with ../repo-bundleoverlay
1165 comparing with ../repo-bundleoverlay
1166 searching for changes
1166 searching for changes
1167 1:44526ebb0f98 (draft) [ ] B
1167 1:44526ebb0f98 (draft) [ ] B
1168 2:c186d7714947 (draft) [tip ] C
1168 2:c186d7714947 (draft) [tip ] C
1169 $ hg log -G -R ../bundleoverlay.hg
1169 $ hg log -G -R ../bundleoverlay.hg
1170 o 3:c186d7714947 (draft) [tip ] C
1170 o 3:c186d7714947 (draft) [tip ] C
1171 |
1171 |
1172 | @ 2:b7d587542d40 (draft) [ ] B+
1172 | @ 2:b7d587542d40 (draft) [ ] B+
1173 |/
1173 |/
1174 o 0:4b34ecfb0d56 (draft) [ ] A
1174 o 0:4b34ecfb0d56 (draft) [ ] A
1175
1175
1176
1176
1177 #if serve
1177 #if serve
1178
1178
1179 Test issue 4506
1179 Test issue 4506
1180
1180
1181 $ cd ..
1181 $ cd ..
1182 $ hg init repo-issue4506
1182 $ hg init repo-issue4506
1183 $ cd repo-issue4506
1183 $ cd repo-issue4506
1184 $ echo "0" > foo
1184 $ echo "0" > foo
1185 $ hg add foo
1185 $ hg add foo
1186 $ hg ci -m "content-0"
1186 $ hg ci -m "content-0"
1187
1187
1188 $ hg up null
1188 $ hg up null
1189 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1189 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1190 $ echo "1" > bar
1190 $ echo "1" > bar
1191 $ hg add bar
1191 $ hg add bar
1192 $ hg ci -m "content-1"
1192 $ hg ci -m "content-1"
1193 created new head
1193 created new head
1194 $ hg up 0
1194 $ hg up 0
1195 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1195 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1196 $ hg graft 1
1196 $ hg graft 1
1197 grafting 1:1c9eddb02162 "content-1" (tip)
1197 grafting 1:1c9eddb02162 "content-1" (tip)
1198
1198
1199 $ hg debugobsolete `hg log -r1 -T'{node}'` `hg log -r2 -T'{node}'`
1199 $ hg debugobsolete `hg log -r1 -T'{node}'` `hg log -r2 -T'{node}'`
1200 obsoleted 1 changesets
1200 obsoleted 1 changesets
1201
1201
1202 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
1202 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
1203 $ cat hg.pid >> $DAEMON_PIDS
1203 $ cat hg.pid >> $DAEMON_PIDS
1204
1204
1205 $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/1'
1205 $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/1'
1206 404 Not Found
1206 404 Not Found
1207 [1]
1207 [1]
1208 $ get-with-headers.py --headeronly localhost:$HGPORT 'file/tip/bar'
1208 $ get-with-headers.py --headeronly localhost:$HGPORT 'file/tip/bar'
1209 200 Script output follows
1209 200 Script output follows
1210 $ get-with-headers.py --headeronly localhost:$HGPORT 'annotate/tip/bar'
1210 $ get-with-headers.py --headeronly localhost:$HGPORT 'annotate/tip/bar'
1211 200 Script output follows
1211 200 Script output follows
1212
1212
1213 $ killdaemons.py
1213 $ killdaemons.py
1214
1214
1215 #endif
1215 #endif
1216
1216
1217 Test heads computation on pending index changes with obsolescence markers
1217 Test heads computation on pending index changes with obsolescence markers
1218 $ cd ..
1218 $ cd ..
1219 $ cat >$TESTTMP/test_extension.py << EOF
1219 $ cat >$TESTTMP/test_extension.py << EOF
1220 > from __future__ import absolute_import
1220 > from __future__ import absolute_import
1221 > from mercurial.i18n import _
1221 > from mercurial.i18n import _
1222 > from mercurial import cmdutil, registrar
1222 > from mercurial import cmdutil, registrar
1223 >
1223 >
1224 > cmdtable = {}
1224 > cmdtable = {}
1225 > command = registrar.command(cmdtable)
1225 > command = registrar.command(cmdtable)
1226 > @command(b"amendtransient",[], _('hg amendtransient [rev]'))
1226 > @command(b"amendtransient",[], _('hg amendtransient [rev]'))
1227 > def amend(ui, repo, *pats, **opts):
1227 > def amend(ui, repo, *pats, **opts):
1228 > opts['message'] = 'Test'
1228 > opts['message'] = 'Test'
1229 > opts['logfile'] = None
1229 > opts['logfile'] = None
1230 > cmdutil.amend(ui, repo, repo['.'], {}, pats, opts)
1230 > cmdutil.amend(ui, repo, repo['.'], {}, pats, opts)
1231 > ui.write('%s\n' % repo.changelog.headrevs())
1231 > ui.write('%s\n' % repo.changelog.headrevs())
1232 > EOF
1232 > EOF
1233 $ cat >> $HGRCPATH << EOF
1233 $ cat >> $HGRCPATH << EOF
1234 > [extensions]
1234 > [extensions]
1235 > testextension=$TESTTMP/test_extension.py
1235 > testextension=$TESTTMP/test_extension.py
1236 > EOF
1236 > EOF
1237 $ hg init repo-issue-nativerevs-pending-changes
1237 $ hg init repo-issue-nativerevs-pending-changes
1238 $ cd repo-issue-nativerevs-pending-changes
1238 $ cd repo-issue-nativerevs-pending-changes
1239 $ mkcommit a
1239 $ mkcommit a
1240 $ mkcommit b
1240 $ mkcommit b
1241 $ hg up ".^"
1241 $ hg up ".^"
1242 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1242 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1243 $ echo aa > a
1243 $ echo aa > a
1244 $ hg amendtransient
1244 $ hg amendtransient
1245 [1, 2]
1245 [1, 2]
1246
1246
1247 Test cache consistency for the visible filter
1247 Test cache consistency for the visible filter
1248 1) We want to make sure that the cached filtered revs are invalidated when
1248 1) We want to make sure that the cached filtered revs are invalidated when
1249 bookmarks change
1249 bookmarks change
1250 $ cd ..
1250 $ cd ..
1251 $ cat >$TESTTMP/test_extension.py << EOF
1251 $ cat >$TESTTMP/test_extension.py << EOF
1252 > from __future__ import absolute_import, print_function
1252 > from __future__ import absolute_import, print_function
1253 > import weakref
1253 > import weakref
1254 > from mercurial import (
1254 > from mercurial import (
1255 > bookmarks,
1255 > bookmarks,
1256 > cmdutil,
1256 > cmdutil,
1257 > extensions,
1257 > extensions,
1258 > repoview,
1258 > repoview,
1259 > )
1259 > )
1260 > def _bookmarkchanged(orig, bkmstoreinst, *args, **kwargs):
1260 > def _bookmarkchanged(orig, bkmstoreinst, *args, **kwargs):
1261 > reporef = weakref.ref(bkmstoreinst._repo)
1261 > reporef = weakref.ref(bkmstoreinst._repo)
1262 > def trhook(tr):
1262 > def trhook(tr):
1263 > repo = reporef()
1263 > repo = reporef()
1264 > hidden1 = repoview.computehidden(repo)
1264 > hidden1 = repoview.computehidden(repo)
1265 > hidden = repoview.filterrevs(repo, 'visible')
1265 > hidden = repoview.filterrevs(repo, 'visible')
1266 > if sorted(hidden1) != sorted(hidden):
1266 > if sorted(hidden1) != sorted(hidden):
1267 > print("cache inconsistency")
1267 > print("cache inconsistency")
1268 > bkmstoreinst._repo.currenttransaction().addpostclose('test_extension', trhook)
1268 > bkmstoreinst._repo.currenttransaction().addpostclose('test_extension', trhook)
1269 > orig(bkmstoreinst, *args, **kwargs)
1269 > orig(bkmstoreinst, *args, **kwargs)
1270 > def extsetup(ui):
1270 > def extsetup(ui):
1271 > extensions.wrapfunction(bookmarks.bmstore, '_recordchange',
1271 > extensions.wrapfunction(bookmarks.bmstore, '_recordchange',
1272 > _bookmarkchanged)
1272 > _bookmarkchanged)
1273 > EOF
1273 > EOF
1274
1274
1275 $ hg init repo-cache-inconsistency
1275 $ hg init repo-cache-inconsistency
1276 $ cd repo-issue-nativerevs-pending-changes
1276 $ cd repo-issue-nativerevs-pending-changes
1277 $ mkcommit a
1277 $ mkcommit a
1278 a already tracked!
1278 a already tracked!
1279 $ mkcommit b
1279 $ mkcommit b
1280 $ hg id
1280 $ hg id
1281 13bedc178fce tip
1281 13bedc178fce tip
1282 $ echo "hello" > b
1282 $ echo "hello" > b
1283 $ hg commit --amend -m "message"
1283 $ hg commit --amend -m "message"
1284 $ hg book bookb -r 13bedc178fce --hidden
1284 $ hg book bookb -r 13bedc178fce --hidden
1285 $ hg log -r 13bedc178fce
1285 $ hg log -r 13bedc178fce
1286 4:13bedc178fce (draft *obsolete*) [ bookb] add b [rewritten using amend as 5:a9b1f8652753]
1286 4:13bedc178fce (draft *obsolete*) [ bookb] add b [rewritten using amend as 5:a9b1f8652753]
1287 $ hg book -d bookb
1287 $ hg book -d bookb
1288 $ hg log -r 13bedc178fce
1288 $ hg log -r 13bedc178fce
1289 abort: hidden revision '13bedc178fce'!
1289 abort: hidden revision '13bedc178fce'!
1290 (use --hidden to access hidden revisions)
1290 (use --hidden to access hidden revisions)
1291 [255]
1291 [255]
1292
1292
1293 Empty out the test extension, as it isn't compatible with later parts
1293 Empty out the test extension, as it isn't compatible with later parts
1294 of the test.
1294 of the test.
1295 $ echo > $TESTTMP/test_extension.py
1295 $ echo > $TESTTMP/test_extension.py
1296
1296
1297 Test ability to pull changeset with locally applying obsolescence markers
1297 Test ability to pull changeset with locally applying obsolescence markers
1298 (issue4945)
1298 (issue4945)
1299
1299
1300 $ cd ..
1300 $ cd ..
1301 $ hg init issue4845
1301 $ hg init issue4845
1302 $ cd issue4845
1302 $ cd issue4845
1303
1303
1304 $ echo foo > f0
1304 $ echo foo > f0
1305 $ hg add f0
1305 $ hg add f0
1306 $ hg ci -m '0'
1306 $ hg ci -m '0'
1307 $ echo foo > f1
1307 $ echo foo > f1
1308 $ hg add f1
1308 $ hg add f1
1309 $ hg ci -m '1'
1309 $ hg ci -m '1'
1310 $ echo foo > f2
1310 $ echo foo > f2
1311 $ hg add f2
1311 $ hg add f2
1312 $ hg ci -m '2'
1312 $ hg ci -m '2'
1313
1313
1314 $ echo bar > f2
1314 $ echo bar > f2
1315 $ hg commit --amend --config experimental.evolution.createmarkers=True
1315 $ hg commit --amend --config experimental.evolution.createmarkers=True
1316 $ hg log -G
1316 $ hg log -G
1317 @ 3:b0551702f918 (draft) [tip ] 2
1317 @ 3:b0551702f918 (draft) [tip ] 2
1318 |
1318 |
1319 o 1:e016b03fd86f (draft) [ ] 1
1319 o 1:e016b03fd86f (draft) [ ] 1
1320 |
1320 |
1321 o 0:a78f55e5508c (draft) [ ] 0
1321 o 0:a78f55e5508c (draft) [ ] 0
1322
1322
1323 $ hg log -G --hidden
1323 $ hg log -G --hidden
1324 @ 3:b0551702f918 (draft) [tip ] 2
1324 @ 3:b0551702f918 (draft) [tip ] 2
1325 |
1325 |
1326 | x 2:e008cf283490 (draft *obsolete*) [ ] 2 [rewritten using amend as 3:b0551702f918]
1326 | x 2:e008cf283490 (draft *obsolete*) [ ] 2 [rewritten using amend as 3:b0551702f918]
1327 |/
1327 |/
1328 o 1:e016b03fd86f (draft) [ ] 1
1328 o 1:e016b03fd86f (draft) [ ] 1
1329 |
1329 |
1330 o 0:a78f55e5508c (draft) [ ] 0
1330 o 0:a78f55e5508c (draft) [ ] 0
1331
1331
1332
1332
1333 $ hg strip --hidden -r 2 --config extensions.strip= --config devel.strip-obsmarkers=no
1333 $ hg strip --hidden -r 2 --config extensions.strip= --config devel.strip-obsmarkers=no
1334 saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e008cf283490-ede36964-backup.hg (glob)
1334 saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e008cf283490-ede36964-backup.hg (glob)
1335 $ hg debugobsolete
1335 $ hg debugobsolete
1336 e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'}
1336 e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'}
1337 $ hg log -G
1337 $ hg log -G
1338 @ 2:b0551702f918 (draft) [tip ] 2
1338 @ 2:b0551702f918 (draft) [tip ] 2
1339 |
1339 |
1340 o 1:e016b03fd86f (draft) [ ] 1
1340 o 1:e016b03fd86f (draft) [ ] 1
1341 |
1341 |
1342 o 0:a78f55e5508c (draft) [ ] 0
1342 o 0:a78f55e5508c (draft) [ ] 0
1343
1343
1344 $ hg log -G --hidden
1344 $ hg log -G --hidden
1345 @ 2:b0551702f918 (draft) [tip ] 2
1345 @ 2:b0551702f918 (draft) [tip ] 2
1346 |
1346 |
1347 o 1:e016b03fd86f (draft) [ ] 1
1347 o 1:e016b03fd86f (draft) [ ] 1
1348 |
1348 |
1349 o 0:a78f55e5508c (draft) [ ] 0
1349 o 0:a78f55e5508c (draft) [ ] 0
1350
1350
1351 $ hg debugbundle .hg/strip-backup/e008cf283490-*-backup.hg
1351 $ hg debugbundle .hg/strip-backup/e008cf283490-*-backup.hg
1352 Stream params: {Compression: BZ}
1352 Stream params: {Compression: BZ}
1353 changegroup -- {nbchanges: 1, version: 02}
1353 changegroup -- {nbchanges: 1, version: 02}
1354 e008cf2834908e5d6b0f792a9d4b0e2272260fb8
1354 e008cf2834908e5d6b0f792a9d4b0e2272260fb8
1355 phase-heads -- {}
1355 phase-heads -- {}
1356 e008cf2834908e5d6b0f792a9d4b0e2272260fb8 draft
1356 e008cf2834908e5d6b0f792a9d4b0e2272260fb8 draft
1357
1357
1358 $ hg pull .hg/strip-backup/e008cf283490-*-backup.hg
1358 $ hg pull .hg/strip-backup/e008cf283490-*-backup.hg
1359 pulling from .hg/strip-backup/e008cf283490-ede36964-backup.hg
1359 pulling from .hg/strip-backup/e008cf283490-ede36964-backup.hg
1360 searching for changes
1360 searching for changes
1361 no changes found
1361 no changes found
1362 $ hg debugobsolete
1362 $ hg debugobsolete
1363 e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'}
1363 e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'}
1364 $ hg log -G
1364 $ hg log -G
1365 @ 2:b0551702f918 (draft) [tip ] 2
1365 @ 2:b0551702f918 (draft) [tip ] 2
1366 |
1366 |
1367 o 1:e016b03fd86f (draft) [ ] 1
1367 o 1:e016b03fd86f (draft) [ ] 1
1368 |
1368 |
1369 o 0:a78f55e5508c (draft) [ ] 0
1369 o 0:a78f55e5508c (draft) [ ] 0
1370
1370
1371 $ hg log -G --hidden
1371 $ hg log -G --hidden
1372 @ 2:b0551702f918 (draft) [tip ] 2
1372 @ 2:b0551702f918 (draft) [tip ] 2
1373 |
1373 |
1374 o 1:e016b03fd86f (draft) [ ] 1
1374 o 1:e016b03fd86f (draft) [ ] 1
1375 |
1375 |
1376 o 0:a78f55e5508c (draft) [ ] 0
1376 o 0:a78f55e5508c (draft) [ ] 0
1377
1377
1378
1378
1379 Testing that strip remove markers:
1379 Testing that strip remove markers:
1380
1380
1381 $ hg strip -r 1 --config extensions.strip=
1381 $ hg strip -r 1 --config extensions.strip=
1382 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
1382 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
1383 saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e016b03fd86f-65ede734-backup.hg (glob)
1383 saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e016b03fd86f-65ede734-backup.hg (glob)
1384 $ hg debugobsolete
1384 $ hg debugobsolete
1385 $ hg log -G
1385 $ hg log -G
1386 @ 0:a78f55e5508c (draft) [tip ] 0
1386 @ 0:a78f55e5508c (draft) [tip ] 0
1387
1387
1388 $ hg log -G --hidden
1388 $ hg log -G --hidden
1389 @ 0:a78f55e5508c (draft) [tip ] 0
1389 @ 0:a78f55e5508c (draft) [tip ] 0
1390
1390
1391 $ hg debugbundle .hg/strip-backup/e016b03fd86f-*-backup.hg
1391 $ hg debugbundle .hg/strip-backup/e016b03fd86f-*-backup.hg
1392 Stream params: {Compression: BZ}
1392 Stream params: {Compression: BZ}
1393 changegroup -- {nbchanges: 2, version: 02}
1393 changegroup -- {nbchanges: 2, version: 02}
1394 e016b03fd86fcccc54817d120b90b751aaf367d6
1394 e016b03fd86fcccc54817d120b90b751aaf367d6
1395 b0551702f918510f01ae838ab03a463054c67b46
1395 b0551702f918510f01ae838ab03a463054c67b46
1396 obsmarkers -- {}
1396 obsmarkers -- {}
1397 version: 1 (86 bytes)
1397 version: 1 (86 bytes)
1398 e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'}
1398 e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'}
1399 phase-heads -- {}
1399 phase-heads -- {}
1400 b0551702f918510f01ae838ab03a463054c67b46 draft
1400 b0551702f918510f01ae838ab03a463054c67b46 draft
1401
1401
1402 $ hg unbundle .hg/strip-backup/e016b03fd86f-*-backup.hg
1402 $ hg unbundle .hg/strip-backup/e016b03fd86f-*-backup.hg
1403 adding changesets
1403 adding changesets
1404 adding manifests
1404 adding manifests
1405 adding file changes
1405 adding file changes
1406 added 2 changesets with 2 changes to 2 files
1406 added 2 changesets with 2 changes to 2 files
1407 1 new obsolescence markers
1407 1 new obsolescence markers
1408 new changesets e016b03fd86f:b0551702f918
1408 new changesets e016b03fd86f:b0551702f918
1409 (run 'hg update' to get a working copy)
1409 (run 'hg update' to get a working copy)
1410 $ hg debugobsolete | sort
1410 $ hg debugobsolete | sort
1411 e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'}
1411 e008cf2834908e5d6b0f792a9d4b0e2272260fb8 b0551702f918510f01ae838ab03a463054c67b46 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'}
1412 $ hg log -G
1412 $ hg log -G
1413 o 2:b0551702f918 (draft) [tip ] 2
1413 o 2:b0551702f918 (draft) [tip ] 2
1414 |
1414 |
1415 o 1:e016b03fd86f (draft) [ ] 1
1415 o 1:e016b03fd86f (draft) [ ] 1
1416 |
1416 |
1417 @ 0:a78f55e5508c (draft) [ ] 0
1417 @ 0:a78f55e5508c (draft) [ ] 0
1418
1418
1419 $ hg log -G --hidden
1419 $ hg log -G --hidden
1420 o 2:b0551702f918 (draft) [tip ] 2
1420 o 2:b0551702f918 (draft) [tip ] 2
1421 |
1421 |
1422 o 1:e016b03fd86f (draft) [ ] 1
1422 o 1:e016b03fd86f (draft) [ ] 1
1423 |
1423 |
1424 @ 0:a78f55e5508c (draft) [ ] 0
1424 @ 0:a78f55e5508c (draft) [ ] 0
1425
1425
1426 Test that 'hg debugobsolete --index --rev' can show indices of obsmarkers when
1426 Test that 'hg debugobsolete --index --rev' can show indices of obsmarkers when
1427 only a subset of those are displayed (because of --rev option)
1427 only a subset of those are displayed (because of --rev option)
1428 $ hg init doindexrev
1428 $ hg init doindexrev
1429 $ cd doindexrev
1429 $ cd doindexrev
1430 $ echo a > a
1430 $ echo a > a
1431 $ hg ci -Am a
1431 $ hg ci -Am a
1432 adding a
1432 adding a
1433 $ hg ci --amend -m aa
1433 $ hg ci --amend -m aa
1434 $ echo b > b
1434 $ echo b > b
1435 $ hg ci -Am b
1435 $ hg ci -Am b
1436 adding b
1436 adding b
1437 $ hg ci --amend -m bb
1437 $ hg ci --amend -m bb
1438 $ echo c > c
1438 $ echo c > c
1439 $ hg ci -Am c
1439 $ hg ci -Am c
1440 adding c
1440 adding c
1441 $ hg ci --amend -m cc
1441 $ hg ci --amend -m cc
1442 $ echo d > d
1442 $ echo d > d
1443 $ hg ci -Am d
1443 $ hg ci -Am d
1444 adding d
1444 adding d
1445 $ hg ci --amend -m dd --config experimental.stabilization.track-operation=1
1445 $ hg ci --amend -m dd --config experimental.stabilization.track-operation=1
1446 $ hg debugobsolete --index --rev "3+7"
1446 $ hg debugobsolete --index --rev "3+7"
1447 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'}
1447 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'}
1448 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 \(.*\) {'operation': 'amend', 'user': 'test'} (re)
1448 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 \(.*\) {'operation': 'amend', 'user': 'test'} (re)
1449 $ hg debugobsolete --index --rev "3+7" -Tjson
1449 $ hg debugobsolete --index --rev "3+7" -Tjson
1450 [
1450 [
1451 {
1451 {
1452 "date": [0.0, 0],
1452 "date": [0.0, 0],
1453 "flag": 0,
1453 "flag": 0,
1454 "index": 1,
1454 "index": 1,
1455 "metadata": {"operation": "amend", "user": "test"},
1455 "metadata": {"operation": "amend", "user": "test"},
1456 "prednode": "6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1",
1456 "prednode": "6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1",
1457 "succnodes": ["d27fb9b066076fd921277a4b9e8b9cb48c95bc6a"]
1457 "succnodes": ["d27fb9b066076fd921277a4b9e8b9cb48c95bc6a"]
1458 },
1458 },
1459 {
1459 {
1460 "date": [0.0, 0],
1460 "date": [0.0, 0],
1461 "flag": 0,
1461 "flag": 0,
1462 "index": 3,
1462 "index": 3,
1463 "metadata": {"operation": "amend", "user": "test"},
1463 "metadata": {"operation": "amend", "user": "test"},
1464 "prednode": "4715cf767440ed891755448016c2b8cf70760c30",
1464 "prednode": "4715cf767440ed891755448016c2b8cf70760c30",
1465 "succnodes": ["7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d"]
1465 "succnodes": ["7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d"]
1466 }
1466 }
1467 ]
1467 ]
1468
1468
1469 Test the --delete option of debugobsolete command
1469 Test the --delete option of debugobsolete command
1470 $ hg debugobsolete --index
1470 $ hg debugobsolete --index
1471 0 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'}
1471 0 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'}
1472 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'}
1472 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'}
1473 2 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'}
1473 2 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'}
1474 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'}
1474 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'}
1475 $ hg debugobsolete --delete 1 --delete 3
1475 $ hg debugobsolete --delete 1 --delete 3
1476 deleted 2 obsolescence markers
1476 deleted 2 obsolescence markers
1477 $ hg debugobsolete
1477 $ hg debugobsolete
1478 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'}
1478 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'}
1479 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'}
1479 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'}
1480
1480
1481 Test adding changeset after obsmarkers affecting it
1481 Test adding changeset after obsmarkers affecting it
1482 (eg: during pull, or unbundle)
1482 (eg: during pull, or unbundle)
1483
1483
1484 $ mkcommit e
1484 $ mkcommit e
1485 $ hg bundle -r . --base .~1 ../bundle-2.hg
1485 $ hg bundle -r . --base .~1 ../bundle-2.hg
1486 1 changesets found
1486 1 changesets found
1487 $ getid .
1487 $ getid .
1488 $ hg --config extensions.strip= strip -r .
1488 $ hg --config extensions.strip= strip -r .
1489 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1489 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1490 saved backup bundle to $TESTTMP/tmpe/issue4845/doindexrev/.hg/strip-backup/9bc153528424-ee80edd4-backup.hg (glob)
1490 saved backup bundle to $TESTTMP/tmpe/issue4845/doindexrev/.hg/strip-backup/9bc153528424-ee80edd4-backup.hg (glob)
1491 $ hg debugobsolete 9bc153528424ea266d13e57f9ff0d799dfe61e4b
1491 $ hg debugobsolete 9bc153528424ea266d13e57f9ff0d799dfe61e4b
1492 $ hg unbundle ../bundle-2.hg
1492 $ hg unbundle ../bundle-2.hg
1493 adding changesets
1493 adding changesets
1494 adding manifests
1494 adding manifests
1495 adding file changes
1495 adding file changes
1496 added 1 changesets with 1 changes to 1 files
1496 added 1 changesets with 1 changes to 1 files
1497 (run 'hg update' to get a working copy)
1497 (run 'hg update' to get a working copy)
1498 $ hg log -G
1498 $ hg log -G
1499 @ 7:7ae79c5d60f0 (draft) [tip ] dd
1499 @ 7:7ae79c5d60f0 (draft) [tip ] dd
1500 |
1500 |
1501 | o 6:4715cf767440 (draft) [ ] d
1501 | o 6:4715cf767440 (draft) [ ] d
1502 |/
1502 |/
1503 o 5:29346082e4a9 (draft) [ ] cc
1503 o 5:29346082e4a9 (draft) [ ] cc
1504 |
1504 |
1505 o 3:d27fb9b06607 (draft) [ ] bb
1505 o 3:d27fb9b06607 (draft) [ ] bb
1506 |
1506 |
1507 | o 2:6fdef60fcbab (draft) [ ] b
1507 | o 2:6fdef60fcbab (draft) [ ] b
1508 |/
1508 |/
1509 o 1:f9bd49731b0b (draft) [ ] aa
1509 o 1:f9bd49731b0b (draft) [ ] aa
1510
1510
1511
1511
1512 $ cd ..
1512 $ cd ..
@@ -1,804 +1,804 b''
1 $ cat >> $HGRCPATH << EOF
1 $ cat >> $HGRCPATH << EOF
2 > [experimental]
2 > [experimental]
3 > hook-track-tags=1
3 > hook-track-tags=1
4 > [hooks]
4 > [hooks]
5 > txnclose.track-tag=sh ${TESTTMP}/taghook.sh
5 > txnclose.track-tag=sh ${TESTTMP}/taghook.sh
6 > EOF
6 > EOF
7
7
8 $ cat << EOF > taghook.sh
8 $ cat << EOF > taghook.sh
9 > #!/bin/sh
9 > #!/bin/sh
10 > # escape the "$" otherwise the test runner interpret it when writting the
10 > # escape the "$" otherwise the test runner interpret it when writting the
11 > # file...
11 > # file...
12 > if [ -n "\$HG_TAG_MOVED" ]; then
12 > if [ -n "\$HG_TAG_MOVED" ]; then
13 > echo 'hook: tag changes detected'
13 > echo 'hook: tag changes detected'
14 > sed 's/^/hook: /' .hg/changes/tags.changes
14 > sed 's/^/hook: /' .hg/changes/tags.changes
15 > fi
15 > fi
16 > EOF
16 > EOF
17 $ hg init test
17 $ hg init test
18 $ cd test
18 $ cd test
19
19
20 $ echo a > a
20 $ echo a > a
21 $ hg add a
21 $ hg add a
22 $ hg commit -m "test"
22 $ hg commit -m "test"
23 $ hg history
23 $ hg history
24 changeset: 0:acb14030fe0a
24 changeset: 0:acb14030fe0a
25 tag: tip
25 tag: tip
26 user: test
26 user: test
27 date: Thu Jan 01 00:00:00 1970 +0000
27 date: Thu Jan 01 00:00:00 1970 +0000
28 summary: test
28 summary: test
29
29
30
30
31 $ hg tag ' '
31 $ hg tag ' '
32 abort: tag names cannot consist entirely of whitespace
32 abort: tag names cannot consist entirely of whitespace
33 [255]
33 [255]
34
34
35 (this tests also that editor is not invoked, if '--edit' is not
35 (this tests also that editor is not invoked, if '--edit' is not
36 specified)
36 specified)
37
37
38 $ HGEDITOR=cat hg tag "bleah"
38 $ HGEDITOR=cat hg tag "bleah"
39 hook: tag changes detected
39 hook: tag changes detected
40 hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleah
40 hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleah
41 $ hg history
41 $ hg history
42 changeset: 1:d4f0d2909abc
42 changeset: 1:d4f0d2909abc
43 tag: tip
43 tag: tip
44 user: test
44 user: test
45 date: Thu Jan 01 00:00:00 1970 +0000
45 date: Thu Jan 01 00:00:00 1970 +0000
46 summary: Added tag bleah for changeset acb14030fe0a
46 summary: Added tag bleah for changeset acb14030fe0a
47
47
48 changeset: 0:acb14030fe0a
48 changeset: 0:acb14030fe0a
49 tag: bleah
49 tag: bleah
50 user: test
50 user: test
51 date: Thu Jan 01 00:00:00 1970 +0000
51 date: Thu Jan 01 00:00:00 1970 +0000
52 summary: test
52 summary: test
53
53
54
54
55 $ echo foo >> .hgtags
55 $ echo foo >> .hgtags
56 $ hg tag "bleah2"
56 $ hg tag "bleah2"
57 abort: working copy of .hgtags is changed
57 abort: working copy of .hgtags is changed
58 (please commit .hgtags manually)
58 (please commit .hgtags manually)
59 [255]
59 [255]
60
60
61 $ hg revert .hgtags
61 $ hg revert .hgtags
62 $ hg tag -r 0 x y z y y z
62 $ hg tag -r 0 x y z y y z
63 abort: tag names must be unique
63 abort: tag names must be unique
64 [255]
64 [255]
65 $ hg tag tap nada dot tip
65 $ hg tag tap nada dot tip
66 abort: the name 'tip' is reserved
66 abort: the name 'tip' is reserved
67 [255]
67 [255]
68 $ hg tag .
68 $ hg tag .
69 abort: the name '.' is reserved
69 abort: the name '.' is reserved
70 [255]
70 [255]
71 $ hg tag null
71 $ hg tag null
72 abort: the name 'null' is reserved
72 abort: the name 'null' is reserved
73 [255]
73 [255]
74 $ hg tag "bleah"
74 $ hg tag "bleah"
75 abort: tag 'bleah' already exists (use -f to force)
75 abort: tag 'bleah' already exists (use -f to force)
76 [255]
76 [255]
77 $ hg tag "blecch" "bleah"
77 $ hg tag "blecch" "bleah"
78 abort: tag 'bleah' already exists (use -f to force)
78 abort: tag 'bleah' already exists (use -f to force)
79 [255]
79 [255]
80
80
81 $ hg tag --remove "blecch"
81 $ hg tag --remove "blecch"
82 abort: tag 'blecch' does not exist
82 abort: tag 'blecch' does not exist
83 [255]
83 [255]
84 $ hg tag --remove "bleah" "blecch" "blough"
84 $ hg tag --remove "bleah" "blecch" "blough"
85 abort: tag 'blecch' does not exist
85 abort: tag 'blecch' does not exist
86 [255]
86 [255]
87
87
88 $ hg tag -r 0 "bleah0"
88 $ hg tag -r 0 "bleah0"
89 hook: tag changes detected
89 hook: tag changes detected
90 hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleah0
90 hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleah0
91 $ hg tag -l -r 1 "bleah1"
91 $ hg tag -l -r 1 "bleah1"
92 $ hg tag gack gawk gorp
92 $ hg tag gack gawk gorp
93 hook: tag changes detected
93 hook: tag changes detected
94 hook: +A 336fccc858a4eb69609a291105009e484a6b6b8d gack
94 hook: +A 336fccc858a4eb69609a291105009e484a6b6b8d gack
95 hook: +A 336fccc858a4eb69609a291105009e484a6b6b8d gawk
95 hook: +A 336fccc858a4eb69609a291105009e484a6b6b8d gawk
96 hook: +A 336fccc858a4eb69609a291105009e484a6b6b8d gorp
96 hook: +A 336fccc858a4eb69609a291105009e484a6b6b8d gorp
97 $ hg tag -f gack
97 $ hg tag -f gack
98 hook: tag changes detected
98 hook: tag changes detected
99 hook: -M 336fccc858a4eb69609a291105009e484a6b6b8d gack
99 hook: -M 336fccc858a4eb69609a291105009e484a6b6b8d gack
100 hook: +M 799667b6f2d9b957f73fa644a918c2df22bab58f gack
100 hook: +M 799667b6f2d9b957f73fa644a918c2df22bab58f gack
101 $ hg tag --remove gack gorp
101 $ hg tag --remove gack gorp
102 hook: tag changes detected
102 hook: tag changes detected
103 hook: -R 799667b6f2d9b957f73fa644a918c2df22bab58f gack
103 hook: -R 799667b6f2d9b957f73fa644a918c2df22bab58f gack
104 hook: -R 336fccc858a4eb69609a291105009e484a6b6b8d gorp
104 hook: -R 336fccc858a4eb69609a291105009e484a6b6b8d gorp
105
105
106 $ hg tag "bleah "
106 $ hg tag "bleah "
107 abort: tag 'bleah' already exists (use -f to force)
107 abort: tag 'bleah' already exists (use -f to force)
108 [255]
108 [255]
109 $ hg tag " bleah"
109 $ hg tag " bleah"
110 abort: tag 'bleah' already exists (use -f to force)
110 abort: tag 'bleah' already exists (use -f to force)
111 [255]
111 [255]
112 $ hg tag " bleah"
112 $ hg tag " bleah"
113 abort: tag 'bleah' already exists (use -f to force)
113 abort: tag 'bleah' already exists (use -f to force)
114 [255]
114 [255]
115 $ hg tag -r 0 " bleahbleah "
115 $ hg tag -r 0 " bleahbleah "
116 hook: tag changes detected
116 hook: tag changes detected
117 hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleahbleah
117 hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleahbleah
118 $ hg tag -r 0 " bleah bleah "
118 $ hg tag -r 0 " bleah bleah "
119 hook: tag changes detected
119 hook: tag changes detected
120 hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleah bleah
120 hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleah bleah
121
121
122 $ cat .hgtags
122 $ cat .hgtags
123 acb14030fe0a21b60322c440ad2d20cf7685a376 bleah
123 acb14030fe0a21b60322c440ad2d20cf7685a376 bleah
124 acb14030fe0a21b60322c440ad2d20cf7685a376 bleah0
124 acb14030fe0a21b60322c440ad2d20cf7685a376 bleah0
125 336fccc858a4eb69609a291105009e484a6b6b8d gack
125 336fccc858a4eb69609a291105009e484a6b6b8d gack
126 336fccc858a4eb69609a291105009e484a6b6b8d gawk
126 336fccc858a4eb69609a291105009e484a6b6b8d gawk
127 336fccc858a4eb69609a291105009e484a6b6b8d gorp
127 336fccc858a4eb69609a291105009e484a6b6b8d gorp
128 336fccc858a4eb69609a291105009e484a6b6b8d gack
128 336fccc858a4eb69609a291105009e484a6b6b8d gack
129 799667b6f2d9b957f73fa644a918c2df22bab58f gack
129 799667b6f2d9b957f73fa644a918c2df22bab58f gack
130 799667b6f2d9b957f73fa644a918c2df22bab58f gack
130 799667b6f2d9b957f73fa644a918c2df22bab58f gack
131 0000000000000000000000000000000000000000 gack
131 0000000000000000000000000000000000000000 gack
132 336fccc858a4eb69609a291105009e484a6b6b8d gorp
132 336fccc858a4eb69609a291105009e484a6b6b8d gorp
133 0000000000000000000000000000000000000000 gorp
133 0000000000000000000000000000000000000000 gorp
134 acb14030fe0a21b60322c440ad2d20cf7685a376 bleahbleah
134 acb14030fe0a21b60322c440ad2d20cf7685a376 bleahbleah
135 acb14030fe0a21b60322c440ad2d20cf7685a376 bleah bleah
135 acb14030fe0a21b60322c440ad2d20cf7685a376 bleah bleah
136
136
137 $ cat .hg/localtags
137 $ cat .hg/localtags
138 d4f0d2909abc9290e2773c08837d70c1794e3f5a bleah1
138 d4f0d2909abc9290e2773c08837d70c1794e3f5a bleah1
139
139
140 tagging on a non-head revision
140 tagging on a non-head revision
141
141
142 $ hg update 0
142 $ hg update 0
143 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
143 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
144 $ hg tag -l localblah
144 $ hg tag -l localblah
145 $ hg tag "foobar"
145 $ hg tag "foobar"
146 abort: working directory is not at a branch head (use -f to force)
146 abort: working directory is not at a branch head (use -f to force)
147 [255]
147 [255]
148 $ hg tag -f "foobar"
148 $ hg tag -f "foobar"
149 hook: tag changes detected
149 hook: tag changes detected
150 hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
150 hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
151 $ cat .hgtags
151 $ cat .hgtags
152 acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
152 acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
153 $ cat .hg/localtags
153 $ cat .hg/localtags
154 d4f0d2909abc9290e2773c08837d70c1794e3f5a bleah1
154 d4f0d2909abc9290e2773c08837d70c1794e3f5a bleah1
155 acb14030fe0a21b60322c440ad2d20cf7685a376 localblah
155 acb14030fe0a21b60322c440ad2d20cf7685a376 localblah
156
156
157 $ hg tag -l 'xx
157 $ hg tag -l 'xx
158 > newline'
158 > newline'
159 abort: '\n' cannot be used in a name
159 abort: '\n' cannot be used in a name
160 [255]
160 [255]
161 $ hg tag -l 'xx:xx'
161 $ hg tag -l 'xx:xx'
162 abort: ':' cannot be used in a name
162 abort: ':' cannot be used in a name
163 [255]
163 [255]
164
164
165 cloning local tags
165 cloning local tags
166
166
167 $ cd ..
167 $ cd ..
168 $ hg -R test log -r0:5
168 $ hg -R test log -r0:5
169 changeset: 0:acb14030fe0a
169 changeset: 0:acb14030fe0a
170 tag: bleah
170 tag: bleah
171 tag: bleah bleah
171 tag: bleah bleah
172 tag: bleah0
172 tag: bleah0
173 tag: bleahbleah
173 tag: bleahbleah
174 tag: foobar
174 tag: foobar
175 tag: localblah
175 tag: localblah
176 user: test
176 user: test
177 date: Thu Jan 01 00:00:00 1970 +0000
177 date: Thu Jan 01 00:00:00 1970 +0000
178 summary: test
178 summary: test
179
179
180 changeset: 1:d4f0d2909abc
180 changeset: 1:d4f0d2909abc
181 tag: bleah1
181 tag: bleah1
182 user: test
182 user: test
183 date: Thu Jan 01 00:00:00 1970 +0000
183 date: Thu Jan 01 00:00:00 1970 +0000
184 summary: Added tag bleah for changeset acb14030fe0a
184 summary: Added tag bleah for changeset acb14030fe0a
185
185
186 changeset: 2:336fccc858a4
186 changeset: 2:336fccc858a4
187 tag: gawk
187 tag: gawk
188 user: test
188 user: test
189 date: Thu Jan 01 00:00:00 1970 +0000
189 date: Thu Jan 01 00:00:00 1970 +0000
190 summary: Added tag bleah0 for changeset acb14030fe0a
190 summary: Added tag bleah0 for changeset acb14030fe0a
191
191
192 changeset: 3:799667b6f2d9
192 changeset: 3:799667b6f2d9
193 user: test
193 user: test
194 date: Thu Jan 01 00:00:00 1970 +0000
194 date: Thu Jan 01 00:00:00 1970 +0000
195 summary: Added tag gack, gawk, gorp for changeset 336fccc858a4
195 summary: Added tag gack, gawk, gorp for changeset 336fccc858a4
196
196
197 changeset: 4:154eeb7c0138
197 changeset: 4:154eeb7c0138
198 user: test
198 user: test
199 date: Thu Jan 01 00:00:00 1970 +0000
199 date: Thu Jan 01 00:00:00 1970 +0000
200 summary: Added tag gack for changeset 799667b6f2d9
200 summary: Added tag gack for changeset 799667b6f2d9
201
201
202 changeset: 5:b4bb47aaff09
202 changeset: 5:b4bb47aaff09
203 user: test
203 user: test
204 date: Thu Jan 01 00:00:00 1970 +0000
204 date: Thu Jan 01 00:00:00 1970 +0000
205 summary: Removed tag gack, gorp
205 summary: Removed tag gack, gorp
206
206
207 $ hg clone -q -rbleah1 test test1
207 $ hg clone -q -rbleah1 test test1
208 hook: tag changes detected
208 hook: tag changes detected
209 hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleah
209 hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleah
210 $ hg -R test1 parents --style=compact
210 $ hg -R test1 parents --style=compact
211 1[tip] d4f0d2909abc 1970-01-01 00:00 +0000 test
211 1[tip] d4f0d2909abc 1970-01-01 00:00 +0000 test
212 Added tag bleah for changeset acb14030fe0a
212 Added tag bleah for changeset acb14030fe0a
213
213
214 $ hg clone -q -r5 test#bleah1 test2
214 $ hg clone -q -r5 test#bleah1 test2
215 hook: tag changes detected
215 hook: tag changes detected
216 hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleah
216 hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleah
217 hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleah0
217 hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleah0
218 hook: +A 336fccc858a4eb69609a291105009e484a6b6b8d gawk
218 hook: +A 336fccc858a4eb69609a291105009e484a6b6b8d gawk
219 $ hg -R test2 parents --style=compact
219 $ hg -R test2 parents --style=compact
220 5[tip] b4bb47aaff09 1970-01-01 00:00 +0000 test
220 5[tip] b4bb47aaff09 1970-01-01 00:00 +0000 test
221 Removed tag gack, gorp
221 Removed tag gack, gorp
222
222
223 $ hg clone -q -U test#bleah1 test3
223 $ hg clone -q -U test#bleah1 test3
224 hook: tag changes detected
224 hook: tag changes detected
225 hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleah
225 hook: +A acb14030fe0a21b60322c440ad2d20cf7685a376 bleah
226 $ hg -R test3 parents --style=compact
226 $ hg -R test3 parents --style=compact
227
227
228 $ cd test
228 $ cd test
229
229
230 Issue601: hg tag doesn't do the right thing if .hgtags or localtags
230 Issue601: hg tag doesn't do the right thing if .hgtags or localtags
231 doesn't end with EOL
231 doesn't end with EOL
232
232
233 $ $PYTHON << EOF
233 $ $PYTHON << EOF
234 > f = file('.hg/localtags'); last = f.readlines()[-1][:-1]; f.close()
234 > f = file('.hg/localtags'); last = f.readlines()[-1][:-1]; f.close()
235 > f = file('.hg/localtags', 'w'); f.write(last); f.close()
235 > f = file('.hg/localtags', 'w'); f.write(last); f.close()
236 > EOF
236 > EOF
237 $ cat .hg/localtags; echo
237 $ cat .hg/localtags; echo
238 acb14030fe0a21b60322c440ad2d20cf7685a376 localblah
238 acb14030fe0a21b60322c440ad2d20cf7685a376 localblah
239 $ hg tag -l localnewline
239 $ hg tag -l localnewline
240 $ cat .hg/localtags; echo
240 $ cat .hg/localtags; echo
241 acb14030fe0a21b60322c440ad2d20cf7685a376 localblah
241 acb14030fe0a21b60322c440ad2d20cf7685a376 localblah
242 c2899151f4e76890c602a2597a650a72666681bf localnewline
242 c2899151f4e76890c602a2597a650a72666681bf localnewline
243
243
244
244
245 $ $PYTHON << EOF
245 $ $PYTHON << EOF
246 > f = file('.hgtags'); last = f.readlines()[-1][:-1]; f.close()
246 > f = file('.hgtags'); last = f.readlines()[-1][:-1]; f.close()
247 > f = file('.hgtags', 'w'); f.write(last); f.close()
247 > f = file('.hgtags', 'w'); f.write(last); f.close()
248 > EOF
248 > EOF
249 $ hg ci -m'broken manual edit of .hgtags'
249 $ hg ci -m'broken manual edit of .hgtags'
250 $ cat .hgtags; echo
250 $ cat .hgtags; echo
251 acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
251 acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
252 $ hg tag newline
252 $ hg tag newline
253 hook: tag changes detected
253 hook: tag changes detected
254 hook: +A a0eea09de1eeec777b46f2085260a373b2fbc293 newline
254 hook: +A a0eea09de1eeec777b46f2085260a373b2fbc293 newline
255 $ cat .hgtags; echo
255 $ cat .hgtags; echo
256 acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
256 acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
257 a0eea09de1eeec777b46f2085260a373b2fbc293 newline
257 a0eea09de1eeec777b46f2085260a373b2fbc293 newline
258
258
259
259
260 tag and branch using same name
260 tag and branch using same name
261
261
262 $ hg branch tag-and-branch-same-name
262 $ hg branch tag-and-branch-same-name
263 marked working directory as branch tag-and-branch-same-name
263 marked working directory as branch tag-and-branch-same-name
264 (branches are permanent and global, did you want a bookmark?)
264 (branches are permanent and global, did you want a bookmark?)
265 $ hg ci -m"discouraged"
265 $ hg ci -m"discouraged"
266 $ hg tag tag-and-branch-same-name
266 $ hg tag tag-and-branch-same-name
267 warning: tag tag-and-branch-same-name conflicts with existing branch name
267 warning: tag tag-and-branch-same-name conflicts with existing branch name
268 hook: tag changes detected
268 hook: tag changes detected
269 hook: +A fc93d2ea1cd78e91216c6cfbbf26747c10ce11ae tag-and-branch-same-name
269 hook: +A fc93d2ea1cd78e91216c6cfbbf26747c10ce11ae tag-and-branch-same-name
270
270
271 test custom commit messages
271 test custom commit messages
272
272
273 $ cat > editor.sh << '__EOF__'
273 $ cat > editor.sh << '__EOF__'
274 > echo "==== before editing"
274 > echo "==== before editing"
275 > cat "$1"
275 > cat "$1"
276 > echo "===="
276 > echo "===="
277 > echo "custom tag message" > "$1"
277 > echo "custom tag message" > "$1"
278 > echo "second line" >> "$1"
278 > echo "second line" >> "$1"
279 > __EOF__
279 > __EOF__
280
280
281 at first, test saving last-message.txt
281 at first, test saving last-message.txt
282
282
283 (test that editor is not invoked before transaction starting)
283 (test that editor is not invoked before transaction starting)
284
284
285 $ cat > .hg/hgrc << '__EOF__'
285 $ cat > .hg/hgrc << '__EOF__'
286 > [hooks]
286 > [hooks]
287 > # this failure occurs before editor invocation
287 > # this failure occurs before editor invocation
288 > pretag.test-saving-lastmessage = false
288 > pretag.test-saving-lastmessage = false
289 > __EOF__
289 > __EOF__
290 $ rm -f .hg/last-message.txt
290 $ rm -f .hg/last-message.txt
291 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg tag custom-tag -e
291 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg tag custom-tag -e
292 abort: pretag.test-saving-lastmessage hook exited with status 1
292 abort: pretag.test-saving-lastmessage hook exited with status 1
293 [255]
293 [255]
294 $ test -f .hg/last-message.txt
294 $ test -f .hg/last-message.txt
295 [1]
295 [1]
296
296
297 (test that editor is invoked and commit message is saved into
297 (test that editor is invoked and commit message is saved into
298 "last-message.txt")
298 "last-message.txt")
299
299
300 $ cat >> .hg/hgrc << '__EOF__'
300 $ cat >> .hg/hgrc << '__EOF__'
301 > [hooks]
301 > [hooks]
302 > pretag.test-saving-lastmessage =
302 > pretag.test-saving-lastmessage =
303 > # this failure occurs after editor invocation
303 > # this failure occurs after editor invocation
304 > pretxncommit.unexpectedabort = false
304 > pretxncommit.unexpectedabort = false
305 > __EOF__
305 > __EOF__
306
306
307 (this tests also that editor is invoked, if '--edit' is specified,
307 (this tests also that editor is invoked, if '--edit' is specified,
308 regardless of '--message')
308 regardless of '--message')
309
309
310 $ rm -f .hg/last-message.txt
310 $ rm -f .hg/last-message.txt
311 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg tag custom-tag -e -m "foo bar"
311 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg tag custom-tag -e -m "foo bar"
312 ==== before editing
312 ==== before editing
313 foo bar
313 foo bar
314
314
315
315
316 HG: Enter commit message. Lines beginning with 'HG:' are removed.
316 HG: Enter commit message. Lines beginning with 'HG:' are removed.
317 HG: Leave message empty to abort commit.
317 HG: Leave message empty to abort commit.
318 HG: --
318 HG: --
319 HG: user: test
319 HG: user: test
320 HG: branch 'tag-and-branch-same-name'
320 HG: branch 'tag-and-branch-same-name'
321 HG: changed .hgtags
321 HG: changed .hgtags
322 ====
322 ====
323 note: commit message saved in .hg/last-message.txt
323 note: commit message saved in .hg/last-message.txt
324 transaction abort!
324 transaction abort!
325 rollback completed
325 rollback completed
326 abort: pretxncommit.unexpectedabort hook exited with status 1
326 abort: pretxncommit.unexpectedabort hook exited with status 1
327 [255]
327 [255]
328 $ cat .hg/last-message.txt
328 $ cat .hg/last-message.txt
329 custom tag message
329 custom tag message
330 second line
330 second line
331
331
332 $ cat >> .hg/hgrc << '__EOF__'
332 $ cat >> .hg/hgrc << '__EOF__'
333 > [hooks]
333 > [hooks]
334 > pretxncommit.unexpectedabort =
334 > pretxncommit.unexpectedabort =
335 > __EOF__
335 > __EOF__
336 $ hg status .hgtags
336 $ hg status .hgtags
337 M .hgtags
337 M .hgtags
338 $ hg revert --no-backup -q .hgtags
338 $ hg revert --no-backup -q .hgtags
339
339
340 then, test custom commit message itself
340 then, test custom commit message itself
341
341
342 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg tag custom-tag -e
342 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg tag custom-tag -e
343 ==== before editing
343 ==== before editing
344 Added tag custom-tag for changeset 75a534207be6
344 Added tag custom-tag for changeset 75a534207be6
345
345
346
346
347 HG: Enter commit message. Lines beginning with 'HG:' are removed.
347 HG: Enter commit message. Lines beginning with 'HG:' are removed.
348 HG: Leave message empty to abort commit.
348 HG: Leave message empty to abort commit.
349 HG: --
349 HG: --
350 HG: user: test
350 HG: user: test
351 HG: branch 'tag-and-branch-same-name'
351 HG: branch 'tag-and-branch-same-name'
352 HG: changed .hgtags
352 HG: changed .hgtags
353 ====
353 ====
354 hook: tag changes detected
354 hook: tag changes detected
355 hook: +A 75a534207be6b03576e0c7a4fa5708d045f1c876 custom-tag
355 hook: +A 75a534207be6b03576e0c7a4fa5708d045f1c876 custom-tag
356 $ hg log -l1 --template "{desc}\n"
356 $ hg log -l1 --template "{desc}\n"
357 custom tag message
357 custom tag message
358 second line
358 second line
359
359
360
360
361 local tag with .hgtags modified
361 local tag with .hgtags modified
362
362
363 $ hg tag hgtags-modified
363 $ hg tag hgtags-modified
364 hook: tag changes detected
364 hook: tag changes detected
365 hook: +A 0f26aaea6f74c3ed6c4aad8844403c9ba128d23a hgtags-modified
365 hook: +A 0f26aaea6f74c3ed6c4aad8844403c9ba128d23a hgtags-modified
366 $ hg rollback
366 $ hg rollback
367 repository tip rolled back to revision 13 (undo commit)
367 repository tip rolled back to revision 13 (undo commit)
368 working directory now based on revision 13
368 working directory now based on revision 13
369 $ hg st
369 $ hg st
370 M .hgtags
370 M .hgtags
371 ? .hgtags.orig
371 ? .hgtags.orig
372 ? editor.sh
372 ? editor.sh
373 $ hg tag --local baz
373 $ hg tag --local baz
374 $ hg revert --no-backup .hgtags
374 $ hg revert --no-backup .hgtags
375
375
376
376
377 tagging when at named-branch-head that's not a topo-head
377 tagging when at named-branch-head that's not a topo-head
378
378
379 $ hg up default
379 $ hg up default
380 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
380 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
381 $ hg merge -t internal:local
381 $ hg merge -t internal:local
382 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
382 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
383 (branch merge, don't forget to commit)
383 (branch merge, don't forget to commit)
384 $ hg ci -m 'merge named branch'
384 $ hg ci -m 'merge named branch'
385 hook: tag changes detected
385 hook: tag changes detected
386 hook: -R acb14030fe0a21b60322c440ad2d20cf7685a376 bleah
386 hook: -R acb14030fe0a21b60322c440ad2d20cf7685a376 bleah
387 hook: -R acb14030fe0a21b60322c440ad2d20cf7685a376 bleah bleah
387 hook: -R acb14030fe0a21b60322c440ad2d20cf7685a376 bleah bleah
388 hook: -R acb14030fe0a21b60322c440ad2d20cf7685a376 bleah0
388 hook: -R acb14030fe0a21b60322c440ad2d20cf7685a376 bleah0
389 hook: -R acb14030fe0a21b60322c440ad2d20cf7685a376 bleahbleah
389 hook: -R acb14030fe0a21b60322c440ad2d20cf7685a376 bleahbleah
390 hook: -R 336fccc858a4eb69609a291105009e484a6b6b8d gawk
390 hook: -R 336fccc858a4eb69609a291105009e484a6b6b8d gawk
391 $ hg up 13
391 $ hg up 13
392 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
392 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
393 $ hg tag new-topo-head
393 $ hg tag new-topo-head
394 hook: tag changes detected
394 hook: tag changes detected
395 hook: +A 0f26aaea6f74c3ed6c4aad8844403c9ba128d23a new-topo-head
395 hook: +A 0f26aaea6f74c3ed6c4aad8844403c9ba128d23a new-topo-head
396
396
397 tagging on null rev
397 tagging on null rev
398
398
399 $ hg up null
399 $ hg up null
400 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
400 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
401 $ hg tag nullrev
401 $ hg tag nullrev
402 abort: working directory is not at a branch head (use -f to force)
402 abort: working directory is not at a branch head (use -f to force)
403 [255]
403 [255]
404
404
405 $ hg init empty
405 $ hg init empty
406 $ hg tag -R empty nullrev
406 $ hg tag -R empty nullrev
407 abort: cannot tag null revision
407 abort: cannot tag null revision
408 [255]
408 [255]
409
409
410 $ hg tag -R empty -r 00000000000 -f nulltag
410 $ hg tag -R empty -r 00000000000 -f nulltag
411 abort: cannot tag null revision
411 abort: cannot tag null revision
412 [255]
412 [255]
413
413
414 issue5539: pruned tags do not appear in .hgtags
414 issue5539: pruned tags do not appear in .hgtags
415
415
416 $ cat >> $HGRCPATH << EOF
416 $ cat >> $HGRCPATH << EOF
417 > [experimental]
417 > [experimental]
418 > evolution=exchange
418 > evolution.exchange = True
419 > evolution.createmarkers=True
419 > evolution.createmarkers=True
420 > EOF
420 > EOF
421 $ hg up e4d483960b9b --quiet
421 $ hg up e4d483960b9b --quiet
422 $ echo aaa >>a
422 $ echo aaa >>a
423 $ hg ci -maaa
423 $ hg ci -maaa
424 $ hg log -r . -T "{node}\n"
424 $ hg log -r . -T "{node}\n"
425 743b3afd5aa69f130c246806e48ad2e699f490d2
425 743b3afd5aa69f130c246806e48ad2e699f490d2
426 $ hg tag issue5539
426 $ hg tag issue5539
427 hook: tag changes detected
427 hook: tag changes detected
428 hook: +A 743b3afd5aa69f130c246806e48ad2e699f490d2 issue5539
428 hook: +A 743b3afd5aa69f130c246806e48ad2e699f490d2 issue5539
429 $ cat .hgtags
429 $ cat .hgtags
430 acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
430 acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
431 a0eea09de1eeec777b46f2085260a373b2fbc293 newline
431 a0eea09de1eeec777b46f2085260a373b2fbc293 newline
432 743b3afd5aa69f130c246806e48ad2e699f490d2 issue5539
432 743b3afd5aa69f130c246806e48ad2e699f490d2 issue5539
433 $ hg log -r . -T "{node}\n"
433 $ hg log -r . -T "{node}\n"
434 abeb261f0508ecebcd345ce21e7a25112df417aa
434 abeb261f0508ecebcd345ce21e7a25112df417aa
435 (mimic 'hg prune' command by obsoleting current changeset and then moving to its parent)
435 (mimic 'hg prune' command by obsoleting current changeset and then moving to its parent)
436 $ hg debugobsolete abeb261f0508ecebcd345ce21e7a25112df417aa --record-parents
436 $ hg debugobsolete abeb261f0508ecebcd345ce21e7a25112df417aa --record-parents
437 obsoleted 1 changesets
437 obsoleted 1 changesets
438 $ hg up ".^" --quiet
438 $ hg up ".^" --quiet
439 $ cat .hgtags
439 $ cat .hgtags
440 acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
440 acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
441 a0eea09de1eeec777b46f2085260a373b2fbc293 newline
441 a0eea09de1eeec777b46f2085260a373b2fbc293 newline
442 $ echo bbb >>a
442 $ echo bbb >>a
443 $ hg ci -mbbb
443 $ hg ci -mbbb
444 $ hg log -r . -T "{node}\n"
444 $ hg log -r . -T "{node}\n"
445 089dd20da58cae34165c37b064539c6ac0c6a0dd
445 089dd20da58cae34165c37b064539c6ac0c6a0dd
446 $ hg tag issue5539
446 $ hg tag issue5539
447 hook: tag changes detected
447 hook: tag changes detected
448 hook: -M 743b3afd5aa69f130c246806e48ad2e699f490d2 issue5539
448 hook: -M 743b3afd5aa69f130c246806e48ad2e699f490d2 issue5539
449 hook: +M 089dd20da58cae34165c37b064539c6ac0c6a0dd issue5539
449 hook: +M 089dd20da58cae34165c37b064539c6ac0c6a0dd issue5539
450 $ hg id
450 $ hg id
451 0accf560a709 tip
451 0accf560a709 tip
452 $ cat .hgtags
452 $ cat .hgtags
453 acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
453 acb14030fe0a21b60322c440ad2d20cf7685a376 foobar
454 a0eea09de1eeec777b46f2085260a373b2fbc293 newline
454 a0eea09de1eeec777b46f2085260a373b2fbc293 newline
455 089dd20da58cae34165c37b064539c6ac0c6a0dd issue5539
455 089dd20da58cae34165c37b064539c6ac0c6a0dd issue5539
456 $ hg tags
456 $ hg tags
457 tip 19:0accf560a709
457 tip 19:0accf560a709
458 issue5539 18:089dd20da58c
458 issue5539 18:089dd20da58c
459 new-topo-head 13:0f26aaea6f74
459 new-topo-head 13:0f26aaea6f74
460 baz 13:0f26aaea6f74
460 baz 13:0f26aaea6f74
461 custom-tag 12:75a534207be6
461 custom-tag 12:75a534207be6
462 tag-and-branch-same-name 11:fc93d2ea1cd7
462 tag-and-branch-same-name 11:fc93d2ea1cd7
463 newline 9:a0eea09de1ee
463 newline 9:a0eea09de1ee
464 localnewline 8:c2899151f4e7
464 localnewline 8:c2899151f4e7
465 localblah 0:acb14030fe0a
465 localblah 0:acb14030fe0a
466 foobar 0:acb14030fe0a
466 foobar 0:acb14030fe0a
467
467
468 $ cd ..
468 $ cd ..
469
469
470 tagging on an uncommitted merge (issue2542)
470 tagging on an uncommitted merge (issue2542)
471
471
472 $ hg init repo-tag-uncommitted-merge
472 $ hg init repo-tag-uncommitted-merge
473 $ cd repo-tag-uncommitted-merge
473 $ cd repo-tag-uncommitted-merge
474 $ echo c1 > f1
474 $ echo c1 > f1
475 $ hg ci -Am0
475 $ hg ci -Am0
476 adding f1
476 adding f1
477 $ echo c2 > f2
477 $ echo c2 > f2
478 $ hg ci -Am1
478 $ hg ci -Am1
479 adding f2
479 adding f2
480 $ hg co -q 0
480 $ hg co -q 0
481 $ hg branch b1
481 $ hg branch b1
482 marked working directory as branch b1
482 marked working directory as branch b1
483 (branches are permanent and global, did you want a bookmark?)
483 (branches are permanent and global, did you want a bookmark?)
484 $ hg ci -m2
484 $ hg ci -m2
485 $ hg up default
485 $ hg up default
486 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
486 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
487 $ hg merge b1
487 $ hg merge b1
488 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
488 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
489 (branch merge, don't forget to commit)
489 (branch merge, don't forget to commit)
490
490
491 $ hg tag t1
491 $ hg tag t1
492 abort: uncommitted merge
492 abort: uncommitted merge
493 [255]
493 [255]
494 $ hg status
494 $ hg status
495 $ hg tag --rev 1 t2
495 $ hg tag --rev 1 t2
496 abort: uncommitted merge
496 abort: uncommitted merge
497 [255]
497 [255]
498 $ hg tag --rev 1 --local t3
498 $ hg tag --rev 1 --local t3
499 $ hg tags -v
499 $ hg tags -v
500 tip 2:2a156e8887cc
500 tip 2:2a156e8887cc
501 t3 1:c3adabd1a5f4 local
501 t3 1:c3adabd1a5f4 local
502
502
503 $ cd ..
503 $ cd ..
504
504
505 commit hook on tag used to be run without write lock - issue3344
505 commit hook on tag used to be run without write lock - issue3344
506
506
507 $ hg init repo-tag
507 $ hg init repo-tag
508 $ touch repo-tag/test
508 $ touch repo-tag/test
509 $ hg -R repo-tag commit -A -m "test"
509 $ hg -R repo-tag commit -A -m "test"
510 adding test
510 adding test
511 $ hg init repo-tag-target
511 $ hg init repo-tag-target
512 $ cat > "$TESTTMP/issue3344.sh" <<EOF
512 $ cat > "$TESTTMP/issue3344.sh" <<EOF
513 > hg push "$TESTTMP/repo-tag-target"
513 > hg push "$TESTTMP/repo-tag-target"
514 > EOF
514 > EOF
515 $ hg -R repo-tag --config hooks.commit="sh ../issue3344.sh" tag tag
515 $ hg -R repo-tag --config hooks.commit="sh ../issue3344.sh" tag tag
516 hook: tag changes detected
516 hook: tag changes detected
517 hook: +A be090ea6625635128e90f7d89df8beeb2bcc1653 tag
517 hook: +A be090ea6625635128e90f7d89df8beeb2bcc1653 tag
518 pushing to $TESTTMP/repo-tag-target (glob)
518 pushing to $TESTTMP/repo-tag-target (glob)
519 searching for changes
519 searching for changes
520 adding changesets
520 adding changesets
521 adding manifests
521 adding manifests
522 adding file changes
522 adding file changes
523 added 2 changesets with 2 changes to 2 files
523 added 2 changesets with 2 changes to 2 files
524 hook: tag changes detected
524 hook: tag changes detected
525 hook: +A be090ea6625635128e90f7d89df8beeb2bcc1653 tag
525 hook: +A be090ea6625635128e90f7d89df8beeb2bcc1653 tag
526
526
527 automatically merge resolvable tag conflicts (i.e. tags that differ in rank)
527 automatically merge resolvable tag conflicts (i.e. tags that differ in rank)
528 create two clones with some different tags as well as some common tags
528 create two clones with some different tags as well as some common tags
529 check that we can merge tags that differ in rank
529 check that we can merge tags that differ in rank
530
530
531 $ hg init repo-automatic-tag-merge
531 $ hg init repo-automatic-tag-merge
532 $ cd repo-automatic-tag-merge
532 $ cd repo-automatic-tag-merge
533 $ echo c0 > f0
533 $ echo c0 > f0
534 $ hg ci -A -m0
534 $ hg ci -A -m0
535 adding f0
535 adding f0
536 $ hg tag tbase
536 $ hg tag tbase
537 hook: tag changes detected
537 hook: tag changes detected
538 hook: +A 6cee5c8f3e5b4ae1a3996d2f6489c3e08eb5aea7 tbase
538 hook: +A 6cee5c8f3e5b4ae1a3996d2f6489c3e08eb5aea7 tbase
539 $ hg up -qr '.^'
539 $ hg up -qr '.^'
540 $ hg log -r 'wdir()' -T "{latesttagdistance}\n"
540 $ hg log -r 'wdir()' -T "{latesttagdistance}\n"
541 1
541 1
542 $ hg up -q
542 $ hg up -q
543 $ hg log -r 'wdir()' -T "{latesttagdistance}\n"
543 $ hg log -r 'wdir()' -T "{latesttagdistance}\n"
544 2
544 2
545 $ cd ..
545 $ cd ..
546 $ hg clone repo-automatic-tag-merge repo-automatic-tag-merge-clone
546 $ hg clone repo-automatic-tag-merge repo-automatic-tag-merge-clone
547 updating to branch default
547 updating to branch default
548 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
548 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
549 $ cd repo-automatic-tag-merge-clone
549 $ cd repo-automatic-tag-merge-clone
550 $ echo c1 > f1
550 $ echo c1 > f1
551 $ hg ci -A -m1
551 $ hg ci -A -m1
552 adding f1
552 adding f1
553 $ hg tag t1 t2 t3
553 $ hg tag t1 t2 t3
554 hook: tag changes detected
554 hook: tag changes detected
555 hook: +A 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t1
555 hook: +A 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t1
556 hook: +A 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
556 hook: +A 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
557 hook: +A 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
557 hook: +A 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
558 $ hg tag --remove t2
558 $ hg tag --remove t2
559 hook: tag changes detected
559 hook: tag changes detected
560 hook: -R 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
560 hook: -R 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
561 $ hg tag t5
561 $ hg tag t5
562 hook: tag changes detected
562 hook: tag changes detected
563 hook: +A 875517b4806a848f942811a315a5bce30804ae85 t5
563 hook: +A 875517b4806a848f942811a315a5bce30804ae85 t5
564 $ echo c2 > f2
564 $ echo c2 > f2
565 $ hg ci -A -m2
565 $ hg ci -A -m2
566 adding f2
566 adding f2
567 $ hg tag -f t3
567 $ hg tag -f t3
568 hook: tag changes detected
568 hook: tag changes detected
569 hook: -M 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
569 hook: -M 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
570 hook: +M 79505d5360b07e3e79d1052e347e73c02b8afa5b t3
570 hook: +M 79505d5360b07e3e79d1052e347e73c02b8afa5b t3
571
571
572 $ cd ../repo-automatic-tag-merge
572 $ cd ../repo-automatic-tag-merge
573 $ echo c3 > f3
573 $ echo c3 > f3
574 $ hg ci -A -m3
574 $ hg ci -A -m3
575 adding f3
575 adding f3
576 $ hg tag -f t4 t5 t6
576 $ hg tag -f t4 t5 t6
577 hook: tag changes detected
577 hook: tag changes detected
578 hook: +A 9aa4e1292a27a248f8d07339bed9931d54907be7 t4
578 hook: +A 9aa4e1292a27a248f8d07339bed9931d54907be7 t4
579 hook: +A 9aa4e1292a27a248f8d07339bed9931d54907be7 t5
579 hook: +A 9aa4e1292a27a248f8d07339bed9931d54907be7 t5
580 hook: +A 9aa4e1292a27a248f8d07339bed9931d54907be7 t6
580 hook: +A 9aa4e1292a27a248f8d07339bed9931d54907be7 t6
581
581
582 $ hg up -q '.^'
582 $ hg up -q '.^'
583 $ hg log -r 'wdir()' -T "{changessincelatesttag} changes since {latesttag}\n"
583 $ hg log -r 'wdir()' -T "{changessincelatesttag} changes since {latesttag}\n"
584 1 changes since t4:t5:t6
584 1 changes since t4:t5:t6
585 $ hg log -r '.' -T "{changessincelatesttag} changes since {latesttag}\n"
585 $ hg log -r '.' -T "{changessincelatesttag} changes since {latesttag}\n"
586 0 changes since t4:t5:t6
586 0 changes since t4:t5:t6
587 $ echo c5 > f3
587 $ echo c5 > f3
588 $ hg log -r 'wdir()' -T "{changessincelatesttag} changes since {latesttag}\n"
588 $ hg log -r 'wdir()' -T "{changessincelatesttag} changes since {latesttag}\n"
589 1 changes since t4:t5:t6
589 1 changes since t4:t5:t6
590 $ hg up -qC
590 $ hg up -qC
591
591
592 $ hg tag --remove t5
592 $ hg tag --remove t5
593 hook: tag changes detected
593 hook: tag changes detected
594 hook: -R 9aa4e1292a27a248f8d07339bed9931d54907be7 t5
594 hook: -R 9aa4e1292a27a248f8d07339bed9931d54907be7 t5
595 $ echo c4 > f4
595 $ echo c4 > f4
596 $ hg log -r '.' -T "{changessincelatesttag} changes since {latesttag}\n"
596 $ hg log -r '.' -T "{changessincelatesttag} changes since {latesttag}\n"
597 2 changes since t4:t6
597 2 changes since t4:t6
598 $ hg log -r '.' -T "{latesttag % '{latesttag}\n'}"
598 $ hg log -r '.' -T "{latesttag % '{latesttag}\n'}"
599 t4
599 t4
600 t6
600 t6
601 $ hg log -r '.' -T "{latesttag('t4') % 'T: {tag}, C: {changes}, D: {distance}\n'}"
601 $ hg log -r '.' -T "{latesttag('t4') % 'T: {tag}, C: {changes}, D: {distance}\n'}"
602 T: t4, C: 2, D: 2
602 T: t4, C: 2, D: 2
603 $ hg log -r '.' -T "{latesttag('re:\d') % 'T: {tag}, C: {changes}, D: {distance}\n'}"
603 $ hg log -r '.' -T "{latesttag('re:\d') % 'T: {tag}, C: {changes}, D: {distance}\n'}"
604 T: t4, C: 2, D: 2
604 T: t4, C: 2, D: 2
605 T: t6, C: 2, D: 2
605 T: t6, C: 2, D: 2
606 $ hg log -r . -T '{join(latesttag(), "*")}\n'
606 $ hg log -r . -T '{join(latesttag(), "*")}\n'
607 t4*t6
607 t4*t6
608 $ hg ci -A -m4
608 $ hg ci -A -m4
609 adding f4
609 adding f4
610 $ hg log -r 'wdir()' -T "{changessincelatesttag} changes since {latesttag}\n"
610 $ hg log -r 'wdir()' -T "{changessincelatesttag} changes since {latesttag}\n"
611 4 changes since t4:t6
611 4 changes since t4:t6
612 $ hg tag t2
612 $ hg tag t2
613 hook: tag changes detected
613 hook: tag changes detected
614 hook: +A 929bca7b18d067cbf3844c3896319a940059d748 t2
614 hook: +A 929bca7b18d067cbf3844c3896319a940059d748 t2
615 $ hg tag -f t6
615 $ hg tag -f t6
616 hook: tag changes detected
616 hook: tag changes detected
617 hook: -M 9aa4e1292a27a248f8d07339bed9931d54907be7 t6
617 hook: -M 9aa4e1292a27a248f8d07339bed9931d54907be7 t6
618 hook: +M 09af2ce14077a94effef208b49a718f4836d4338 t6
618 hook: +M 09af2ce14077a94effef208b49a718f4836d4338 t6
619
619
620 $ cd ../repo-automatic-tag-merge-clone
620 $ cd ../repo-automatic-tag-merge-clone
621 $ hg pull
621 $ hg pull
622 pulling from $TESTTMP/repo-automatic-tag-merge (glob)
622 pulling from $TESTTMP/repo-automatic-tag-merge (glob)
623 searching for changes
623 searching for changes
624 adding changesets
624 adding changesets
625 adding manifests
625 adding manifests
626 adding file changes
626 adding file changes
627 added 6 changesets with 6 changes to 3 files (+1 heads)
627 added 6 changesets with 6 changes to 3 files (+1 heads)
628 new changesets 9aa4e1292a27:b325cc5b642c
628 new changesets 9aa4e1292a27:b325cc5b642c
629 hook: tag changes detected
629 hook: tag changes detected
630 hook: +A 929bca7b18d067cbf3844c3896319a940059d748 t2
630 hook: +A 929bca7b18d067cbf3844c3896319a940059d748 t2
631 hook: +A 9aa4e1292a27a248f8d07339bed9931d54907be7 t4
631 hook: +A 9aa4e1292a27a248f8d07339bed9931d54907be7 t4
632 hook: -R 875517b4806a848f942811a315a5bce30804ae85 t5
632 hook: -R 875517b4806a848f942811a315a5bce30804ae85 t5
633 hook: +A 09af2ce14077a94effef208b49a718f4836d4338 t6
633 hook: +A 09af2ce14077a94effef208b49a718f4836d4338 t6
634 (run 'hg heads' to see heads, 'hg merge' to merge)
634 (run 'hg heads' to see heads, 'hg merge' to merge)
635 $ hg merge --tool internal:tagmerge
635 $ hg merge --tool internal:tagmerge
636 merging .hgtags
636 merging .hgtags
637 2 files updated, 1 files merged, 0 files removed, 0 files unresolved
637 2 files updated, 1 files merged, 0 files removed, 0 files unresolved
638 (branch merge, don't forget to commit)
638 (branch merge, don't forget to commit)
639 $ hg status
639 $ hg status
640 M .hgtags
640 M .hgtags
641 M f3
641 M f3
642 M f4
642 M f4
643 $ hg resolve -l
643 $ hg resolve -l
644 R .hgtags
644 R .hgtags
645 $ cat .hgtags
645 $ cat .hgtags
646 9aa4e1292a27a248f8d07339bed9931d54907be7 t4
646 9aa4e1292a27a248f8d07339bed9931d54907be7 t4
647 9aa4e1292a27a248f8d07339bed9931d54907be7 t6
647 9aa4e1292a27a248f8d07339bed9931d54907be7 t6
648 9aa4e1292a27a248f8d07339bed9931d54907be7 t6
648 9aa4e1292a27a248f8d07339bed9931d54907be7 t6
649 09af2ce14077a94effef208b49a718f4836d4338 t6
649 09af2ce14077a94effef208b49a718f4836d4338 t6
650 6cee5c8f3e5b4ae1a3996d2f6489c3e08eb5aea7 tbase
650 6cee5c8f3e5b4ae1a3996d2f6489c3e08eb5aea7 tbase
651 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t1
651 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t1
652 929bca7b18d067cbf3844c3896319a940059d748 t2
652 929bca7b18d067cbf3844c3896319a940059d748 t2
653 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
653 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
654 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
654 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
655 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
655 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
656 0000000000000000000000000000000000000000 t2
656 0000000000000000000000000000000000000000 t2
657 875517b4806a848f942811a315a5bce30804ae85 t5
657 875517b4806a848f942811a315a5bce30804ae85 t5
658 9aa4e1292a27a248f8d07339bed9931d54907be7 t5
658 9aa4e1292a27a248f8d07339bed9931d54907be7 t5
659 9aa4e1292a27a248f8d07339bed9931d54907be7 t5
659 9aa4e1292a27a248f8d07339bed9931d54907be7 t5
660 0000000000000000000000000000000000000000 t5
660 0000000000000000000000000000000000000000 t5
661 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
661 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
662 79505d5360b07e3e79d1052e347e73c02b8afa5b t3
662 79505d5360b07e3e79d1052e347e73c02b8afa5b t3
663
663
664 check that the merge tried to minimize the diff with the first merge parent
664 check that the merge tried to minimize the diff with the first merge parent
665
665
666 $ hg diff --git -r 'p1()' .hgtags
666 $ hg diff --git -r 'p1()' .hgtags
667 diff --git a/.hgtags b/.hgtags
667 diff --git a/.hgtags b/.hgtags
668 --- a/.hgtags
668 --- a/.hgtags
669 +++ b/.hgtags
669 +++ b/.hgtags
670 @@ -1,9 +1,17 @@
670 @@ -1,9 +1,17 @@
671 +9aa4e1292a27a248f8d07339bed9931d54907be7 t4
671 +9aa4e1292a27a248f8d07339bed9931d54907be7 t4
672 +9aa4e1292a27a248f8d07339bed9931d54907be7 t6
672 +9aa4e1292a27a248f8d07339bed9931d54907be7 t6
673 +9aa4e1292a27a248f8d07339bed9931d54907be7 t6
673 +9aa4e1292a27a248f8d07339bed9931d54907be7 t6
674 +09af2ce14077a94effef208b49a718f4836d4338 t6
674 +09af2ce14077a94effef208b49a718f4836d4338 t6
675 6cee5c8f3e5b4ae1a3996d2f6489c3e08eb5aea7 tbase
675 6cee5c8f3e5b4ae1a3996d2f6489c3e08eb5aea7 tbase
676 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t1
676 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t1
677 +929bca7b18d067cbf3844c3896319a940059d748 t2
677 +929bca7b18d067cbf3844c3896319a940059d748 t2
678 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
678 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
679 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
679 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
680 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
680 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
681 0000000000000000000000000000000000000000 t2
681 0000000000000000000000000000000000000000 t2
682 875517b4806a848f942811a315a5bce30804ae85 t5
682 875517b4806a848f942811a315a5bce30804ae85 t5
683 +9aa4e1292a27a248f8d07339bed9931d54907be7 t5
683 +9aa4e1292a27a248f8d07339bed9931d54907be7 t5
684 +9aa4e1292a27a248f8d07339bed9931d54907be7 t5
684 +9aa4e1292a27a248f8d07339bed9931d54907be7 t5
685 +0000000000000000000000000000000000000000 t5
685 +0000000000000000000000000000000000000000 t5
686 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
686 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
687 79505d5360b07e3e79d1052e347e73c02b8afa5b t3
687 79505d5360b07e3e79d1052e347e73c02b8afa5b t3
688
688
689 detect merge tag conflicts
689 detect merge tag conflicts
690
690
691 $ hg update -C -r tip
691 $ hg update -C -r tip
692 3 files updated, 0 files merged, 2 files removed, 0 files unresolved
692 3 files updated, 0 files merged, 2 files removed, 0 files unresolved
693 $ hg tag t7
693 $ hg tag t7
694 hook: tag changes detected
694 hook: tag changes detected
695 hook: +A b325cc5b642c5b465bdbe8c09627cb372de3d47d t7
695 hook: +A b325cc5b642c5b465bdbe8c09627cb372de3d47d t7
696 $ hg update -C -r 'first(sort(head()))'
696 $ hg update -C -r 'first(sort(head()))'
697 3 files updated, 0 files merged, 2 files removed, 0 files unresolved
697 3 files updated, 0 files merged, 2 files removed, 0 files unresolved
698 $ printf "%s %s\n" `hg log -r . --template "{node} t7"` >> .hgtags
698 $ printf "%s %s\n" `hg log -r . --template "{node} t7"` >> .hgtags
699 $ hg commit -m "manually add conflicting t7 tag"
699 $ hg commit -m "manually add conflicting t7 tag"
700 hook: tag changes detected
700 hook: tag changes detected
701 hook: -R 929bca7b18d067cbf3844c3896319a940059d748 t2
701 hook: -R 929bca7b18d067cbf3844c3896319a940059d748 t2
702 hook: +A 875517b4806a848f942811a315a5bce30804ae85 t5
702 hook: +A 875517b4806a848f942811a315a5bce30804ae85 t5
703 hook: -M b325cc5b642c5b465bdbe8c09627cb372de3d47d t7
703 hook: -M b325cc5b642c5b465bdbe8c09627cb372de3d47d t7
704 hook: +M ea918d56be86a4afc5a95312e8b6750e1428d9d2 t7
704 hook: +M ea918d56be86a4afc5a95312e8b6750e1428d9d2 t7
705 $ hg merge --tool internal:tagmerge
705 $ hg merge --tool internal:tagmerge
706 merging .hgtags
706 merging .hgtags
707 automatic .hgtags merge failed
707 automatic .hgtags merge failed
708 the following 1 tags are in conflict: t7
708 the following 1 tags are in conflict: t7
709 automatic tag merging of .hgtags failed! (use 'hg resolve --tool :merge' or another merge tool of your choice)
709 automatic tag merging of .hgtags failed! (use 'hg resolve --tool :merge' or another merge tool of your choice)
710 2 files updated, 0 files merged, 0 files removed, 1 files unresolved
710 2 files updated, 0 files merged, 0 files removed, 1 files unresolved
711 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
711 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
712 [1]
712 [1]
713 $ hg resolve -l
713 $ hg resolve -l
714 U .hgtags
714 U .hgtags
715 $ cat .hgtags
715 $ cat .hgtags
716 6cee5c8f3e5b4ae1a3996d2f6489c3e08eb5aea7 tbase
716 6cee5c8f3e5b4ae1a3996d2f6489c3e08eb5aea7 tbase
717 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t1
717 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t1
718 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
718 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
719 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
719 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
720 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
720 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
721 0000000000000000000000000000000000000000 t2
721 0000000000000000000000000000000000000000 t2
722 875517b4806a848f942811a315a5bce30804ae85 t5
722 875517b4806a848f942811a315a5bce30804ae85 t5
723 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
723 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
724 79505d5360b07e3e79d1052e347e73c02b8afa5b t3
724 79505d5360b07e3e79d1052e347e73c02b8afa5b t3
725 ea918d56be86a4afc5a95312e8b6750e1428d9d2 t7
725 ea918d56be86a4afc5a95312e8b6750e1428d9d2 t7
726
726
727 $ cd ..
727 $ cd ..
728
728
729 handle the loss of tags
729 handle the loss of tags
730
730
731 $ hg clone repo-automatic-tag-merge-clone repo-merge-lost-tags
731 $ hg clone repo-automatic-tag-merge-clone repo-merge-lost-tags
732 updating to branch default
732 updating to branch default
733 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
733 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
734 $ cd repo-merge-lost-tags
734 $ cd repo-merge-lost-tags
735 $ echo c5 > f5
735 $ echo c5 > f5
736 $ hg ci -A -m5
736 $ hg ci -A -m5
737 adding f5
737 adding f5
738 $ hg tag -f t7
738 $ hg tag -f t7
739 hook: tag changes detected
739 hook: tag changes detected
740 hook: -M ea918d56be86a4afc5a95312e8b6750e1428d9d2 t7
740 hook: -M ea918d56be86a4afc5a95312e8b6750e1428d9d2 t7
741 hook: +M fd3a9e394ce3afb354a496323bf68ac1755a30de t7
741 hook: +M fd3a9e394ce3afb354a496323bf68ac1755a30de t7
742 $ hg update -r 'p1(t7)'
742 $ hg update -r 'p1(t7)'
743 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
743 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
744 $ printf '' > .hgtags
744 $ printf '' > .hgtags
745 $ hg commit -m 'delete all tags'
745 $ hg commit -m 'delete all tags'
746 created new head
746 created new head
747 $ hg log -r 'max(t7::)'
747 $ hg log -r 'max(t7::)'
748 changeset: 17:ffe462b50880
748 changeset: 17:ffe462b50880
749 user: test
749 user: test
750 date: Thu Jan 01 00:00:00 1970 +0000
750 date: Thu Jan 01 00:00:00 1970 +0000
751 summary: Added tag t7 for changeset fd3a9e394ce3
751 summary: Added tag t7 for changeset fd3a9e394ce3
752
752
753 $ hg update -r 'max(t7::)'
753 $ hg update -r 'max(t7::)'
754 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
754 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
755 $ hg merge -r tip --tool internal:tagmerge
755 $ hg merge -r tip --tool internal:tagmerge
756 merging .hgtags
756 merging .hgtags
757 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
757 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
758 (branch merge, don't forget to commit)
758 (branch merge, don't forget to commit)
759 $ hg resolve -l
759 $ hg resolve -l
760 R .hgtags
760 R .hgtags
761 $ cat .hgtags
761 $ cat .hgtags
762 6cee5c8f3e5b4ae1a3996d2f6489c3e08eb5aea7 tbase
762 6cee5c8f3e5b4ae1a3996d2f6489c3e08eb5aea7 tbase
763 0000000000000000000000000000000000000000 tbase
763 0000000000000000000000000000000000000000 tbase
764 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t1
764 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t1
765 0000000000000000000000000000000000000000 t1
765 0000000000000000000000000000000000000000 t1
766 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
766 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
767 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
767 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
768 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
768 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
769 0000000000000000000000000000000000000000 t2
769 0000000000000000000000000000000000000000 t2
770 875517b4806a848f942811a315a5bce30804ae85 t5
770 875517b4806a848f942811a315a5bce30804ae85 t5
771 0000000000000000000000000000000000000000 t5
771 0000000000000000000000000000000000000000 t5
772 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
772 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
773 79505d5360b07e3e79d1052e347e73c02b8afa5b t3
773 79505d5360b07e3e79d1052e347e73c02b8afa5b t3
774 0000000000000000000000000000000000000000 t3
774 0000000000000000000000000000000000000000 t3
775 ea918d56be86a4afc5a95312e8b6750e1428d9d2 t7
775 ea918d56be86a4afc5a95312e8b6750e1428d9d2 t7
776 0000000000000000000000000000000000000000 t7
776 0000000000000000000000000000000000000000 t7
777 ea918d56be86a4afc5a95312e8b6750e1428d9d2 t7
777 ea918d56be86a4afc5a95312e8b6750e1428d9d2 t7
778 fd3a9e394ce3afb354a496323bf68ac1755a30de t7
778 fd3a9e394ce3afb354a496323bf68ac1755a30de t7
779
779
780 also check that we minimize the diff with the 1st merge parent
780 also check that we minimize the diff with the 1st merge parent
781
781
782 $ hg diff --git -r 'p1()' .hgtags
782 $ hg diff --git -r 'p1()' .hgtags
783 diff --git a/.hgtags b/.hgtags
783 diff --git a/.hgtags b/.hgtags
784 --- a/.hgtags
784 --- a/.hgtags
785 +++ b/.hgtags
785 +++ b/.hgtags
786 @@ -1,12 +1,17 @@
786 @@ -1,12 +1,17 @@
787 6cee5c8f3e5b4ae1a3996d2f6489c3e08eb5aea7 tbase
787 6cee5c8f3e5b4ae1a3996d2f6489c3e08eb5aea7 tbase
788 +0000000000000000000000000000000000000000 tbase
788 +0000000000000000000000000000000000000000 tbase
789 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t1
789 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t1
790 +0000000000000000000000000000000000000000 t1
790 +0000000000000000000000000000000000000000 t1
791 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
791 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
792 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
792 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
793 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
793 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t2
794 0000000000000000000000000000000000000000 t2
794 0000000000000000000000000000000000000000 t2
795 875517b4806a848f942811a315a5bce30804ae85 t5
795 875517b4806a848f942811a315a5bce30804ae85 t5
796 +0000000000000000000000000000000000000000 t5
796 +0000000000000000000000000000000000000000 t5
797 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
797 4f3e9b90005b68b4d8a3f4355cedc302a8364f5c t3
798 79505d5360b07e3e79d1052e347e73c02b8afa5b t3
798 79505d5360b07e3e79d1052e347e73c02b8afa5b t3
799 +0000000000000000000000000000000000000000 t3
799 +0000000000000000000000000000000000000000 t3
800 ea918d56be86a4afc5a95312e8b6750e1428d9d2 t7
800 ea918d56be86a4afc5a95312e8b6750e1428d9d2 t7
801 +0000000000000000000000000000000000000000 t7
801 +0000000000000000000000000000000000000000 t7
802 ea918d56be86a4afc5a95312e8b6750e1428d9d2 t7
802 ea918d56be86a4afc5a95312e8b6750e1428d9d2 t7
803 fd3a9e394ce3afb354a496323bf68ac1755a30de t7
803 fd3a9e394ce3afb354a496323bf68ac1755a30de t7
804
804
General Comments 0
You need to be logged in to leave comments. Login now