##// END OF EJS Templates
tests: use 'legacy.exchange' option in various mixed tests...
Pierre-Yves David -
r29687:ac9b8507 default
parent child Browse files
Show More
@@ -1,866 +1,866 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=createmarkers,exchange
9 > evolution=createmarkers,exchange
10 > EOF
10 > EOF
11
11
12 initialize
12 initialize
13
13
14 $ hg init a
14 $ hg init a
15 $ cd a
15 $ cd a
16 $ echo 'test' > test
16 $ echo 'test' > test
17 $ hg commit -Am'test'
17 $ hg commit -Am'test'
18 adding test
18 adding test
19
19
20 set bookmarks
20 set bookmarks
21
21
22 $ hg bookmark X
22 $ hg bookmark X
23 $ hg bookmark Y
23 $ hg bookmark Y
24 $ hg bookmark Z
24 $ hg bookmark Z
25
25
26 import bookmark by name
26 import bookmark by name
27
27
28 $ hg init ../b
28 $ hg init ../b
29 $ cd ../b
29 $ cd ../b
30 $ hg book Y
30 $ hg book Y
31 $ hg book
31 $ hg book
32 * Y -1:000000000000
32 * Y -1:000000000000
33 $ hg pull ../a
33 $ hg pull ../a
34 pulling from ../a
34 pulling from ../a
35 requesting all changes
35 requesting all changes
36 adding changesets
36 adding changesets
37 adding manifests
37 adding manifests
38 adding file changes
38 adding file changes
39 added 1 changesets with 1 changes to 1 files
39 added 1 changesets with 1 changes to 1 files
40 adding remote bookmark X
40 adding remote bookmark X
41 updating bookmark Y
41 updating bookmark Y
42 adding remote bookmark Z
42 adding remote bookmark Z
43 (run 'hg update' to get a working copy)
43 (run 'hg update' to get a working copy)
44 $ hg bookmarks
44 $ hg bookmarks
45 X 0:4e3505fd9583
45 X 0:4e3505fd9583
46 * Y 0:4e3505fd9583
46 * Y 0:4e3505fd9583
47 Z 0:4e3505fd9583
47 Z 0:4e3505fd9583
48 $ hg debugpushkey ../a namespaces
48 $ hg debugpushkey ../a namespaces
49 bookmarks
49 bookmarks
50 namespaces
50 namespaces
51 obsolete
51 obsolete
52 phases
52 phases
53 $ hg debugpushkey ../a bookmarks
53 $ hg debugpushkey ../a bookmarks
54 X 4e3505fd95835d721066b76e75dbb8cc554d7f77
54 X 4e3505fd95835d721066b76e75dbb8cc554d7f77
55 Y 4e3505fd95835d721066b76e75dbb8cc554d7f77
55 Y 4e3505fd95835d721066b76e75dbb8cc554d7f77
56 Z 4e3505fd95835d721066b76e75dbb8cc554d7f77
56 Z 4e3505fd95835d721066b76e75dbb8cc554d7f77
57
57
58 delete the bookmark to re-pull it
58 delete the bookmark to re-pull it
59
59
60 $ hg book -d X
60 $ hg book -d X
61 $ hg pull -B X ../a
61 $ hg pull -B X ../a
62 pulling from ../a
62 pulling from ../a
63 no changes found
63 no changes found
64 adding remote bookmark X
64 adding remote bookmark X
65
65
66 finally no-op pull
66 finally no-op pull
67
67
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 $ hg bookmark
71 $ hg bookmark
72 X 0:4e3505fd9583
72 X 0:4e3505fd9583
73 * Y 0:4e3505fd9583
73 * Y 0:4e3505fd9583
74 Z 0:4e3505fd9583
74 Z 0:4e3505fd9583
75
75
76 export bookmark by name
76 export bookmark by name
77
77
78 $ hg bookmark W
78 $ hg bookmark W
79 $ hg bookmark foo
79 $ hg bookmark foo
80 $ hg bookmark foobar
80 $ hg bookmark foobar
81 $ hg push -B W ../a
81 $ hg push -B W ../a
82 pushing to ../a
82 pushing to ../a
83 searching for changes
83 searching for changes
84 no changes found
84 no changes found
85 exporting bookmark W
85 exporting bookmark W
86 [1]
86 [1]
87 $ hg -R ../a bookmarks
87 $ hg -R ../a bookmarks
88 W -1:000000000000
88 W -1:000000000000
89 X 0:4e3505fd9583
89 X 0:4e3505fd9583
90 Y 0:4e3505fd9583
90 Y 0:4e3505fd9583
91 * Z 0:4e3505fd9583
91 * Z 0:4e3505fd9583
92
92
93 delete a remote bookmark
93 delete a remote bookmark
94
94
95 $ hg book -d W
95 $ hg book -d W
96 $ hg push -B W ../a
96 $ hg push -B W ../a
97 pushing to ../a
97 pushing to ../a
98 searching for changes
98 searching for changes
99 no changes found
99 no changes found
100 deleting remote bookmark W
100 deleting remote bookmark W
101 [1]
101 [1]
102
102
103 export the active bookmark
103 export the active bookmark
104
104
105 $ hg bookmark V
105 $ hg bookmark V
106 $ hg push -B . ../a
106 $ hg push -B . ../a
107 pushing to ../a
107 pushing to ../a
108 searching for changes
108 searching for changes
109 no changes found
109 no changes found
110 exporting bookmark V
110 exporting bookmark V
111 [1]
111 [1]
112
112
113 exporting the active bookmark with 'push -B .'
113 exporting the active bookmark with 'push -B .'
114 demand that one of the bookmarks is activated
114 demand that one of the bookmarks is activated
115
115
116 $ hg update -r default
116 $ hg update -r default
117 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
117 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
118 (leaving bookmark V)
118 (leaving bookmark V)
119 $ hg push -B . ../a
119 $ hg push -B . ../a
120 abort: no active bookmark
120 abort: no active bookmark
121 [255]
121 [255]
122 $ hg update -r V
122 $ hg update -r V
123 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
123 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
124 (activating bookmark V)
124 (activating bookmark V)
125
125
126 delete the bookmark
126 delete the bookmark
127
127
128 $ hg book -d V
128 $ hg book -d V
129 $ hg push -B V ../a
129 $ hg push -B V ../a
130 pushing to ../a
130 pushing to ../a
131 searching for changes
131 searching for changes
132 no changes found
132 no changes found
133 deleting remote bookmark V
133 deleting remote bookmark V
134 [1]
134 [1]
135 $ hg up foobar
135 $ hg up foobar
136 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
136 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
137 (activating bookmark foobar)
137 (activating bookmark foobar)
138
138
139 push/pull name that doesn't exist
139 push/pull name that doesn't exist
140
140
141 $ hg push -B badname ../a
141 $ hg push -B badname ../a
142 pushing to ../a
142 pushing to ../a
143 searching for changes
143 searching for changes
144 bookmark badname does not exist on the local or remote repository!
144 bookmark badname does not exist on the local or remote repository!
145 no changes found
145 no changes found
146 [2]
146 [2]
147 $ hg pull -B anotherbadname ../a
147 $ hg pull -B anotherbadname ../a
148 pulling from ../a
148 pulling from ../a
149 abort: remote bookmark anotherbadname not found!
149 abort: remote bookmark anotherbadname not found!
150 [255]
150 [255]
151
151
152 divergent bookmarks
152 divergent bookmarks
153
153
154 $ cd ../a
154 $ cd ../a
155 $ echo c1 > f1
155 $ echo c1 > f1
156 $ hg ci -Am1
156 $ hg ci -Am1
157 adding f1
157 adding f1
158 $ hg book -f @
158 $ hg book -f @
159 $ hg book -f X
159 $ hg book -f X
160 $ hg book
160 $ hg book
161 @ 1:0d2164f0ce0d
161 @ 1:0d2164f0ce0d
162 * X 1:0d2164f0ce0d
162 * X 1:0d2164f0ce0d
163 Y 0:4e3505fd9583
163 Y 0:4e3505fd9583
164 Z 1:0d2164f0ce0d
164 Z 1:0d2164f0ce0d
165
165
166 $ cd ../b
166 $ cd ../b
167 $ hg up
167 $ hg up
168 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
168 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
169 updating bookmark foobar
169 updating bookmark foobar
170 $ echo c2 > f2
170 $ echo c2 > f2
171 $ hg ci -Am2
171 $ hg ci -Am2
172 adding f2
172 adding f2
173 $ hg book -if @
173 $ hg book -if @
174 $ hg book -if X
174 $ hg book -if X
175 $ hg book
175 $ hg book
176 @ 1:9b140be10808
176 @ 1:9b140be10808
177 X 1:9b140be10808
177 X 1:9b140be10808
178 Y 0:4e3505fd9583
178 Y 0:4e3505fd9583
179 Z 0:4e3505fd9583
179 Z 0:4e3505fd9583
180 foo -1:000000000000
180 foo -1:000000000000
181 * foobar 1:9b140be10808
181 * foobar 1:9b140be10808
182
182
183 $ hg pull --config paths.foo=../a foo
183 $ hg pull --config paths.foo=../a foo
184 pulling from $TESTTMP/a (glob)
184 pulling from $TESTTMP/a (glob)
185 searching for changes
185 searching for changes
186 adding changesets
186 adding changesets
187 adding manifests
187 adding manifests
188 adding file changes
188 adding file changes
189 added 1 changesets with 1 changes to 1 files (+1 heads)
189 added 1 changesets with 1 changes to 1 files (+1 heads)
190 divergent bookmark @ stored as @foo
190 divergent bookmark @ stored as @foo
191 divergent bookmark X stored as X@foo
191 divergent bookmark X stored as X@foo
192 updating bookmark Z
192 updating bookmark Z
193 (run 'hg heads' to see heads, 'hg merge' to merge)
193 (run 'hg heads' to see heads, 'hg merge' to merge)
194 $ hg book
194 $ hg book
195 @ 1:9b140be10808
195 @ 1:9b140be10808
196 @foo 2:0d2164f0ce0d
196 @foo 2:0d2164f0ce0d
197 X 1:9b140be10808
197 X 1:9b140be10808
198 X@foo 2:0d2164f0ce0d
198 X@foo 2:0d2164f0ce0d
199 Y 0:4e3505fd9583
199 Y 0:4e3505fd9583
200 Z 2:0d2164f0ce0d
200 Z 2:0d2164f0ce0d
201 foo -1:000000000000
201 foo -1:000000000000
202 * foobar 1:9b140be10808
202 * foobar 1:9b140be10808
203
203
204 (test that too many divergence of bookmark)
204 (test that too many divergence of bookmark)
205
205
206 $ python $TESTDIR/seq.py 1 100 | while read i; do hg bookmarks -r 000000000000 "X@${i}"; done
206 $ python $TESTDIR/seq.py 1 100 | while read i; do hg bookmarks -r 000000000000 "X@${i}"; done
207 $ hg pull ../a
207 $ hg pull ../a
208 pulling from ../a
208 pulling from ../a
209 searching for changes
209 searching for changes
210 no changes found
210 no changes found
211 warning: failed to assign numbered name to divergent bookmark X
211 warning: failed to assign numbered name to divergent bookmark X
212 divergent bookmark @ stored as @1
212 divergent bookmark @ stored as @1
213 $ hg bookmarks | grep '^ X' | grep -v ':000000000000'
213 $ hg bookmarks | grep '^ X' | grep -v ':000000000000'
214 X 1:9b140be10808
214 X 1:9b140be10808
215 X@foo 2:0d2164f0ce0d
215 X@foo 2:0d2164f0ce0d
216
216
217 (test that remotely diverged bookmarks are reused if they aren't changed)
217 (test that remotely diverged bookmarks are reused if they aren't changed)
218
218
219 $ hg bookmarks | grep '^ @'
219 $ hg bookmarks | grep '^ @'
220 @ 1:9b140be10808
220 @ 1:9b140be10808
221 @1 2:0d2164f0ce0d
221 @1 2:0d2164f0ce0d
222 @foo 2:0d2164f0ce0d
222 @foo 2:0d2164f0ce0d
223 $ hg pull ../a
223 $ hg pull ../a
224 pulling from ../a
224 pulling from ../a
225 searching for changes
225 searching for changes
226 no changes found
226 no changes found
227 warning: failed to assign numbered name to divergent bookmark X
227 warning: failed to assign numbered name to divergent bookmark X
228 divergent bookmark @ stored as @1
228 divergent bookmark @ stored as @1
229 $ hg bookmarks | grep '^ @'
229 $ hg bookmarks | grep '^ @'
230 @ 1:9b140be10808
230 @ 1:9b140be10808
231 @1 2:0d2164f0ce0d
231 @1 2:0d2164f0ce0d
232 @foo 2:0d2164f0ce0d
232 @foo 2:0d2164f0ce0d
233
233
234 $ python $TESTDIR/seq.py 1 100 | while read i; do hg bookmarks -d "X@${i}"; done
234 $ python $TESTDIR/seq.py 1 100 | while read i; do hg bookmarks -d "X@${i}"; done
235 $ hg bookmarks -d "@1"
235 $ hg bookmarks -d "@1"
236
236
237 $ hg push -f ../a
237 $ hg push -f ../a
238 pushing to ../a
238 pushing to ../a
239 searching for changes
239 searching for changes
240 adding changesets
240 adding changesets
241 adding manifests
241 adding manifests
242 adding file changes
242 adding file changes
243 added 1 changesets with 1 changes to 1 files (+1 heads)
243 added 1 changesets with 1 changes to 1 files (+1 heads)
244 $ hg -R ../a book
244 $ hg -R ../a book
245 @ 1:0d2164f0ce0d
245 @ 1:0d2164f0ce0d
246 * X 1:0d2164f0ce0d
246 * X 1:0d2164f0ce0d
247 Y 0:4e3505fd9583
247 Y 0:4e3505fd9583
248 Z 1:0d2164f0ce0d
248 Z 1:0d2164f0ce0d
249
249
250 explicit pull should overwrite the local version (issue4439)
250 explicit pull should overwrite the local version (issue4439)
251
251
252 $ hg update -r X
252 $ hg update -r X
253 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
253 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
254 (activating bookmark X)
254 (activating bookmark X)
255 $ hg pull --config paths.foo=../a foo -B .
255 $ hg pull --config paths.foo=../a foo -B .
256 pulling from $TESTTMP/a (glob)
256 pulling from $TESTTMP/a (glob)
257 no changes found
257 no changes found
258 divergent bookmark @ stored as @foo
258 divergent bookmark @ stored as @foo
259 importing bookmark X
259 importing bookmark X
260
260
261 reinstall state for further testing:
261 reinstall state for further testing:
262
262
263 $ hg book -fr 9b140be10808 X
263 $ hg book -fr 9b140be10808 X
264
264
265 revsets should not ignore divergent bookmarks
265 revsets should not ignore divergent bookmarks
266
266
267 $ hg bookmark -fr 1 Z
267 $ hg bookmark -fr 1 Z
268 $ hg log -r 'bookmark()' --template '{rev}:{node|short} {bookmarks}\n'
268 $ hg log -r 'bookmark()' --template '{rev}:{node|short} {bookmarks}\n'
269 0:4e3505fd9583 Y
269 0:4e3505fd9583 Y
270 1:9b140be10808 @ X Z foobar
270 1:9b140be10808 @ X Z foobar
271 2:0d2164f0ce0d @foo X@foo
271 2:0d2164f0ce0d @foo X@foo
272 $ hg log -r 'bookmark("X@foo")' --template '{rev}:{node|short} {bookmarks}\n'
272 $ hg log -r 'bookmark("X@foo")' --template '{rev}:{node|short} {bookmarks}\n'
273 2:0d2164f0ce0d @foo X@foo
273 2:0d2164f0ce0d @foo X@foo
274 $ hg log -r 'bookmark("re:X@foo")' --template '{rev}:{node|short} {bookmarks}\n'
274 $ hg log -r 'bookmark("re:X@foo")' --template '{rev}:{node|short} {bookmarks}\n'
275 2:0d2164f0ce0d @foo X@foo
275 2:0d2164f0ce0d @foo X@foo
276
276
277 update a remote bookmark from a non-head to a head
277 update a remote bookmark from a non-head to a head
278
278
279 $ hg up -q Y
279 $ hg up -q Y
280 $ echo c3 > f2
280 $ echo c3 > f2
281 $ hg ci -Am3
281 $ hg ci -Am3
282 adding f2
282 adding f2
283 created new head
283 created new head
284 $ hg push ../a
284 $ hg push ../a
285 pushing to ../a
285 pushing to ../a
286 searching for changes
286 searching for changes
287 adding changesets
287 adding changesets
288 adding manifests
288 adding manifests
289 adding file changes
289 adding file changes
290 added 1 changesets with 1 changes to 1 files (+1 heads)
290 added 1 changesets with 1 changes to 1 files (+1 heads)
291 updating bookmark Y
291 updating bookmark Y
292 $ hg -R ../a book
292 $ hg -R ../a book
293 @ 1:0d2164f0ce0d
293 @ 1:0d2164f0ce0d
294 * X 1:0d2164f0ce0d
294 * X 1:0d2164f0ce0d
295 Y 3:f6fc62dde3c0
295 Y 3:f6fc62dde3c0
296 Z 1:0d2164f0ce0d
296 Z 1:0d2164f0ce0d
297
297
298 update a bookmark in the middle of a client pulling changes
298 update a bookmark in the middle of a client pulling changes
299
299
300 $ cd ..
300 $ cd ..
301 $ hg clone -q a pull-race
301 $ hg clone -q a pull-race
302
302
303 We want to use http because it is stateless and therefore more susceptible to
303 We want to use http because it is stateless and therefore more susceptible to
304 race conditions
304 race conditions
305
305
306 $ hg serve -R pull-race -p $HGPORT -d --pid-file=pull-race.pid -E main-error.log
306 $ hg serve -R pull-race -p $HGPORT -d --pid-file=pull-race.pid -E main-error.log
307 $ cat pull-race.pid >> $DAEMON_PIDS
307 $ cat pull-race.pid >> $DAEMON_PIDS
308
308
309 $ hg clone -q http://localhost:$HGPORT/ pull-race2
309 $ hg clone -q http://localhost:$HGPORT/ pull-race2
310 $ cd pull-race
310 $ cd pull-race
311 $ hg up -q Y
311 $ hg up -q Y
312 $ echo c4 > f2
312 $ echo c4 > f2
313 $ hg ci -Am4
313 $ hg ci -Am4
314 $ echo c5 > f3
314 $ echo c5 > f3
315 $ cat <<EOF > .hg/hgrc
315 $ cat <<EOF > .hg/hgrc
316 > [hooks]
316 > [hooks]
317 > outgoing.makecommit = hg ci -Am5; echo committed in pull-race
317 > outgoing.makecommit = hg ci -Am5; echo committed in pull-race
318 > EOF
318 > EOF
319
319
320 (new config needs a server restart)
320 (new config needs a server restart)
321
321
322 $ cd ..
322 $ cd ..
323 $ killdaemons.py
323 $ killdaemons.py
324 $ hg serve -R pull-race -p $HGPORT -d --pid-file=pull-race.pid -E main-error.log
324 $ hg serve -R pull-race -p $HGPORT -d --pid-file=pull-race.pid -E main-error.log
325 $ cat pull-race.pid >> $DAEMON_PIDS
325 $ cat pull-race.pid >> $DAEMON_PIDS
326 $ cd pull-race2
326 $ cd pull-race2
327 $ hg -R $TESTTMP/pull-race book
327 $ hg -R $TESTTMP/pull-race book
328 @ 1:0d2164f0ce0d
328 @ 1:0d2164f0ce0d
329 X 1:0d2164f0ce0d
329 X 1:0d2164f0ce0d
330 * Y 4:b0a5eff05604
330 * Y 4:b0a5eff05604
331 Z 1:0d2164f0ce0d
331 Z 1:0d2164f0ce0d
332 $ hg pull
332 $ hg pull
333 pulling from http://localhost:$HGPORT/
333 pulling from http://localhost:$HGPORT/
334 searching for changes
334 searching for changes
335 adding changesets
335 adding changesets
336 adding manifests
336 adding manifests
337 adding file changes
337 adding file changes
338 added 1 changesets with 1 changes to 1 files
338 added 1 changesets with 1 changes to 1 files
339 updating bookmark Y
339 updating bookmark Y
340 (run 'hg update' to get a working copy)
340 (run 'hg update' to get a working copy)
341 $ hg book
341 $ hg book
342 * @ 1:0d2164f0ce0d
342 * @ 1:0d2164f0ce0d
343 X 1:0d2164f0ce0d
343 X 1:0d2164f0ce0d
344 Y 4:b0a5eff05604
344 Y 4:b0a5eff05604
345 Z 1:0d2164f0ce0d
345 Z 1:0d2164f0ce0d
346
346
347 Update a bookmark right after the initial lookup -B (issue4689)
347 Update a bookmark right after the initial lookup -B (issue4689)
348
348
349 $ echo c6 > ../pull-race/f3 # to be committed during the race
349 $ echo c6 > ../pull-race/f3 # to be committed during the race
350 $ cat <<EOF > ../pull-race/.hg/hgrc
350 $ cat <<EOF > ../pull-race/.hg/hgrc
351 > [hooks]
351 > [hooks]
352 > # If anything to commit, commit it right after the first key listing used
352 > # If anything to commit, commit it right after the first key listing used
353 > # during lookup. This makes the commit appear before the actual getbundle
353 > # during lookup. This makes the commit appear before the actual getbundle
354 > # call.
354 > # call.
355 > listkeys.makecommit= ((hg st | grep -q M) && (hg commit -m race; echo commited in pull-race)) || exit 0
355 > listkeys.makecommit= ((hg st | grep -q M) && (hg commit -m race; echo commited in pull-race)) || exit 0
356 > EOF
356 > EOF
357
357
358 (new config need server restart)
358 (new config need server restart)
359
359
360 $ killdaemons.py
360 $ killdaemons.py
361 $ hg serve -R ../pull-race -p $HGPORT -d --pid-file=../pull-race.pid -E main-error.log
361 $ hg serve -R ../pull-race -p $HGPORT -d --pid-file=../pull-race.pid -E main-error.log
362 $ cat ../pull-race.pid >> $DAEMON_PIDS
362 $ cat ../pull-race.pid >> $DAEMON_PIDS
363
363
364 $ hg -R $TESTTMP/pull-race book
364 $ hg -R $TESTTMP/pull-race book
365 @ 1:0d2164f0ce0d
365 @ 1:0d2164f0ce0d
366 X 1:0d2164f0ce0d
366 X 1:0d2164f0ce0d
367 * Y 5:35d1ef0a8d1b
367 * Y 5:35d1ef0a8d1b
368 Z 1:0d2164f0ce0d
368 Z 1:0d2164f0ce0d
369 $ hg update -r Y
369 $ hg update -r Y
370 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
370 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
371 (activating bookmark Y)
371 (activating bookmark Y)
372 $ hg pull -B .
372 $ hg pull -B .
373 pulling from http://localhost:$HGPORT/
373 pulling from http://localhost:$HGPORT/
374 searching for changes
374 searching for changes
375 adding changesets
375 adding changesets
376 adding manifests
376 adding manifests
377 adding file changes
377 adding file changes
378 added 1 changesets with 1 changes to 1 files
378 added 1 changesets with 1 changes to 1 files
379 updating bookmark Y
379 updating bookmark Y
380 (run 'hg update' to get a working copy)
380 (run 'hg update' to get a working copy)
381 $ hg book
381 $ hg book
382 @ 1:0d2164f0ce0d
382 @ 1:0d2164f0ce0d
383 X 1:0d2164f0ce0d
383 X 1:0d2164f0ce0d
384 * Y 5:35d1ef0a8d1b
384 * Y 5:35d1ef0a8d1b
385 Z 1:0d2164f0ce0d
385 Z 1:0d2164f0ce0d
386
386
387 (done with this section of the test)
387 (done with this section of the test)
388
388
389 $ killdaemons.py
389 $ killdaemons.py
390 $ cd ../b
390 $ cd ../b
391
391
392 diverging a remote bookmark fails
392 diverging a remote bookmark fails
393
393
394 $ hg up -q 4e3505fd9583
394 $ hg up -q 4e3505fd9583
395 $ echo c4 > f2
395 $ echo c4 > f2
396 $ hg ci -Am4
396 $ hg ci -Am4
397 adding f2
397 adding f2
398 created new head
398 created new head
399 $ echo c5 > f2
399 $ echo c5 > f2
400 $ hg ci -Am5
400 $ hg ci -Am5
401 $ hg log -G
401 $ hg log -G
402 @ 5:c922c0139ca0 5
402 @ 5:c922c0139ca0 5
403 |
403 |
404 o 4:4efff6d98829 4
404 o 4:4efff6d98829 4
405 |
405 |
406 | o 3:f6fc62dde3c0 3
406 | o 3:f6fc62dde3c0 3
407 |/
407 |/
408 | o 2:0d2164f0ce0d 1
408 | o 2:0d2164f0ce0d 1
409 |/
409 |/
410 | o 1:9b140be10808 2
410 | o 1:9b140be10808 2
411 |/
411 |/
412 o 0:4e3505fd9583 test
412 o 0:4e3505fd9583 test
413
413
414
414
415 $ hg book -f Y
415 $ hg book -f Y
416
416
417 $ cat <<EOF > ../a/.hg/hgrc
417 $ cat <<EOF > ../a/.hg/hgrc
418 > [web]
418 > [web]
419 > push_ssl = false
419 > push_ssl = false
420 > allow_push = *
420 > allow_push = *
421 > EOF
421 > EOF
422
422
423 $ hg serve -R ../a -p $HGPORT2 -d --pid-file=../hg2.pid
423 $ hg serve -R ../a -p $HGPORT2 -d --pid-file=../hg2.pid
424 $ cat ../hg2.pid >> $DAEMON_PIDS
424 $ cat ../hg2.pid >> $DAEMON_PIDS
425
425
426 $ hg push http://localhost:$HGPORT2/
426 $ hg push http://localhost:$HGPORT2/
427 pushing to http://localhost:$HGPORT2/
427 pushing to http://localhost:$HGPORT2/
428 searching for changes
428 searching for changes
429 abort: push creates new remote head c922c0139ca0 with bookmark 'Y'!
429 abort: push creates new remote head c922c0139ca0 with bookmark 'Y'!
430 (merge or see "hg help push" for details about pushing new heads)
430 (merge or see "hg help push" for details about pushing new heads)
431 [255]
431 [255]
432 $ hg -R ../a book
432 $ hg -R ../a book
433 @ 1:0d2164f0ce0d
433 @ 1:0d2164f0ce0d
434 * X 1:0d2164f0ce0d
434 * X 1:0d2164f0ce0d
435 Y 3:f6fc62dde3c0
435 Y 3:f6fc62dde3c0
436 Z 1:0d2164f0ce0d
436 Z 1:0d2164f0ce0d
437
437
438
438
439 Unrelated marker does not alter the decision
439 Unrelated marker does not alter the decision
440
440
441 $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
441 $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
442 $ hg push http://localhost:$HGPORT2/
442 $ hg push http://localhost:$HGPORT2/
443 pushing to http://localhost:$HGPORT2/
443 pushing to http://localhost:$HGPORT2/
444 searching for changes
444 searching for changes
445 abort: push creates new remote head c922c0139ca0 with bookmark 'Y'!
445 abort: push creates new remote head c922c0139ca0 with bookmark 'Y'!
446 (merge or see "hg help push" for details about pushing new heads)
446 (merge or see "hg help push" for details about pushing new heads)
447 [255]
447 [255]
448 $ hg -R ../a book
448 $ hg -R ../a book
449 @ 1:0d2164f0ce0d
449 @ 1:0d2164f0ce0d
450 * X 1:0d2164f0ce0d
450 * X 1:0d2164f0ce0d
451 Y 3:f6fc62dde3c0
451 Y 3:f6fc62dde3c0
452 Z 1:0d2164f0ce0d
452 Z 1:0d2164f0ce0d
453
453
454 Update to a successor works
454 Update to a successor works
455
455
456 $ hg id --debug -r 3
456 $ hg id --debug -r 3
457 f6fc62dde3c0771e29704af56ba4d8af77abcc2f
457 f6fc62dde3c0771e29704af56ba4d8af77abcc2f
458 $ hg id --debug -r 4
458 $ hg id --debug -r 4
459 4efff6d98829d9c824c621afd6e3f01865f5439f
459 4efff6d98829d9c824c621afd6e3f01865f5439f
460 $ hg id --debug -r 5
460 $ hg id --debug -r 5
461 c922c0139ca03858f655e4a2af4dd02796a63969 tip Y
461 c922c0139ca03858f655e4a2af4dd02796a63969 tip Y
462 $ hg debugobsolete f6fc62dde3c0771e29704af56ba4d8af77abcc2f cccccccccccccccccccccccccccccccccccccccc
462 $ hg debugobsolete f6fc62dde3c0771e29704af56ba4d8af77abcc2f cccccccccccccccccccccccccccccccccccccccc
463 $ hg debugobsolete cccccccccccccccccccccccccccccccccccccccc 4efff6d98829d9c824c621afd6e3f01865f5439f
463 $ hg debugobsolete cccccccccccccccccccccccccccccccccccccccc 4efff6d98829d9c824c621afd6e3f01865f5439f
464 $ hg push http://localhost:$HGPORT2/
464 $ hg push http://localhost:$HGPORT2/
465 pushing to http://localhost:$HGPORT2/
465 pushing to http://localhost:$HGPORT2/
466 searching for changes
466 searching for changes
467 remote: adding changesets
467 remote: adding changesets
468 remote: adding manifests
468 remote: adding manifests
469 remote: adding file changes
469 remote: adding file changes
470 remote: added 2 changesets with 2 changes to 1 files (+1 heads)
470 remote: added 2 changesets with 2 changes to 1 files (+1 heads)
471 remote: 2 new obsolescence markers
471 remote: 2 new obsolescence markers
472 updating bookmark Y
472 updating bookmark Y
473 $ hg -R ../a book
473 $ hg -R ../a book
474 @ 1:0d2164f0ce0d
474 @ 1:0d2164f0ce0d
475 * X 1:0d2164f0ce0d
475 * X 1:0d2164f0ce0d
476 Y 5:c922c0139ca0
476 Y 5:c922c0139ca0
477 Z 1:0d2164f0ce0d
477 Z 1:0d2164f0ce0d
478
478
479 hgweb
479 hgweb
480
480
481 $ cat <<EOF > .hg/hgrc
481 $ cat <<EOF > .hg/hgrc
482 > [web]
482 > [web]
483 > push_ssl = false
483 > push_ssl = false
484 > allow_push = *
484 > allow_push = *
485 > EOF
485 > EOF
486
486
487 $ hg serve -p $HGPORT -d --pid-file=../hg.pid -E errors.log
487 $ hg serve -p $HGPORT -d --pid-file=../hg.pid -E errors.log
488 $ cat ../hg.pid >> $DAEMON_PIDS
488 $ cat ../hg.pid >> $DAEMON_PIDS
489 $ cd ../a
489 $ cd ../a
490
490
491 $ hg debugpushkey http://localhost:$HGPORT/ namespaces
491 $ hg debugpushkey http://localhost:$HGPORT/ namespaces
492 bookmarks
492 bookmarks
493 namespaces
493 namespaces
494 obsolete
494 obsolete
495 phases
495 phases
496 $ hg debugpushkey http://localhost:$HGPORT/ bookmarks
496 $ hg debugpushkey http://localhost:$HGPORT/ bookmarks
497 @ 9b140be1080824d768c5a4691a564088eede71f9
497 @ 9b140be1080824d768c5a4691a564088eede71f9
498 X 9b140be1080824d768c5a4691a564088eede71f9
498 X 9b140be1080824d768c5a4691a564088eede71f9
499 Y c922c0139ca03858f655e4a2af4dd02796a63969
499 Y c922c0139ca03858f655e4a2af4dd02796a63969
500 Z 9b140be1080824d768c5a4691a564088eede71f9
500 Z 9b140be1080824d768c5a4691a564088eede71f9
501 foo 0000000000000000000000000000000000000000
501 foo 0000000000000000000000000000000000000000
502 foobar 9b140be1080824d768c5a4691a564088eede71f9
502 foobar 9b140be1080824d768c5a4691a564088eede71f9
503 $ hg out -B http://localhost:$HGPORT/
503 $ hg out -B http://localhost:$HGPORT/
504 comparing with http://localhost:$HGPORT/
504 comparing with http://localhost:$HGPORT/
505 searching for changed bookmarks
505 searching for changed bookmarks
506 @ 0d2164f0ce0d
506 @ 0d2164f0ce0d
507 X 0d2164f0ce0d
507 X 0d2164f0ce0d
508 Z 0d2164f0ce0d
508 Z 0d2164f0ce0d
509 foo
509 foo
510 foobar
510 foobar
511 $ hg push -B Z http://localhost:$HGPORT/
511 $ hg push -B Z http://localhost:$HGPORT/
512 pushing to http://localhost:$HGPORT/
512 pushing to http://localhost:$HGPORT/
513 searching for changes
513 searching for changes
514 no changes found
514 no changes found
515 updating bookmark Z
515 updating bookmark Z
516 [1]
516 [1]
517 $ hg book -d Z
517 $ hg book -d Z
518 $ hg in -B http://localhost:$HGPORT/
518 $ hg in -B http://localhost:$HGPORT/
519 comparing with http://localhost:$HGPORT/
519 comparing with http://localhost:$HGPORT/
520 searching for changed bookmarks
520 searching for changed bookmarks
521 @ 9b140be10808
521 @ 9b140be10808
522 X 9b140be10808
522 X 9b140be10808
523 Z 0d2164f0ce0d
523 Z 0d2164f0ce0d
524 foo 000000000000
524 foo 000000000000
525 foobar 9b140be10808
525 foobar 9b140be10808
526 $ hg pull -B Z http://localhost:$HGPORT/
526 $ hg pull -B Z http://localhost:$HGPORT/
527 pulling from http://localhost:$HGPORT/
527 pulling from http://localhost:$HGPORT/
528 no changes found
528 no changes found
529 divergent bookmark @ stored as @1
529 divergent bookmark @ stored as @1
530 divergent bookmark X stored as X@1
530 divergent bookmark X stored as X@1
531 adding remote bookmark Z
531 adding remote bookmark Z
532 adding remote bookmark foo
532 adding remote bookmark foo
533 adding remote bookmark foobar
533 adding remote bookmark foobar
534 $ hg clone http://localhost:$HGPORT/ cloned-bookmarks
534 $ hg clone http://localhost:$HGPORT/ cloned-bookmarks
535 requesting all changes
535 requesting all changes
536 adding changesets
536 adding changesets
537 adding manifests
537 adding manifests
538 adding file changes
538 adding file changes
539 added 5 changesets with 5 changes to 3 files (+2 heads)
539 added 5 changesets with 5 changes to 3 files (+2 heads)
540 2 new obsolescence markers
540 2 new obsolescence markers
541 updating to bookmark @
541 updating to bookmark @
542 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
542 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
543 $ hg -R cloned-bookmarks bookmarks
543 $ hg -R cloned-bookmarks bookmarks
544 * @ 1:9b140be10808
544 * @ 1:9b140be10808
545 X 1:9b140be10808
545 X 1:9b140be10808
546 Y 4:c922c0139ca0
546 Y 4:c922c0139ca0
547 Z 2:0d2164f0ce0d
547 Z 2:0d2164f0ce0d
548 foo -1:000000000000
548 foo -1:000000000000
549 foobar 1:9b140be10808
549 foobar 1:9b140be10808
550
550
551 $ cd ..
551 $ cd ..
552
552
553 Test to show result of bookmarks comparision
553 Test to show result of bookmarks comparision
554
554
555 $ mkdir bmcomparison
555 $ mkdir bmcomparison
556 $ cd bmcomparison
556 $ cd bmcomparison
557
557
558 $ hg init source
558 $ hg init source
559 $ hg -R source debugbuilddag '+2*2*3*4'
559 $ hg -R source debugbuilddag '+2*2*3*4'
560 $ hg -R source log -G --template '{rev}:{node|short}'
560 $ hg -R source log -G --template '{rev}:{node|short}'
561 o 4:e7bd5218ca15
561 o 4:e7bd5218ca15
562 |
562 |
563 | o 3:6100d3090acf
563 | o 3:6100d3090acf
564 |/
564 |/
565 | o 2:fa942426a6fd
565 | o 2:fa942426a6fd
566 |/
566 |/
567 | o 1:66f7d451a68b
567 | o 1:66f7d451a68b
568 |/
568 |/
569 o 0:1ea73414a91b
569 o 0:1ea73414a91b
570
570
571 $ hg -R source bookmarks -r 0 SAME
571 $ hg -R source bookmarks -r 0 SAME
572 $ hg -R source bookmarks -r 0 ADV_ON_REPO1
572 $ hg -R source bookmarks -r 0 ADV_ON_REPO1
573 $ hg -R source bookmarks -r 0 ADV_ON_REPO2
573 $ hg -R source bookmarks -r 0 ADV_ON_REPO2
574 $ hg -R source bookmarks -r 0 DIFF_ADV_ON_REPO1
574 $ hg -R source bookmarks -r 0 DIFF_ADV_ON_REPO1
575 $ hg -R source bookmarks -r 0 DIFF_ADV_ON_REPO2
575 $ hg -R source bookmarks -r 0 DIFF_ADV_ON_REPO2
576 $ hg -R source bookmarks -r 1 DIVERGED
576 $ hg -R source bookmarks -r 1 DIVERGED
577
577
578 $ hg clone -U source repo1
578 $ hg clone -U source repo1
579
579
580 (test that incoming/outgoing exit with 1, if there is no bookmark to
580 (test that incoming/outgoing exit with 1, if there is no bookmark to
581 be exchanged)
581 be exchanged)
582
582
583 $ hg -R repo1 incoming -B
583 $ hg -R repo1 incoming -B
584 comparing with $TESTTMP/bmcomparison/source
584 comparing with $TESTTMP/bmcomparison/source
585 searching for changed bookmarks
585 searching for changed bookmarks
586 no changed bookmarks found
586 no changed bookmarks found
587 [1]
587 [1]
588 $ hg -R repo1 outgoing -B
588 $ hg -R repo1 outgoing -B
589 comparing with $TESTTMP/bmcomparison/source
589 comparing with $TESTTMP/bmcomparison/source
590 searching for changed bookmarks
590 searching for changed bookmarks
591 no changed bookmarks found
591 no changed bookmarks found
592 [1]
592 [1]
593
593
594 $ hg -R repo1 bookmarks -f -r 1 ADD_ON_REPO1
594 $ hg -R repo1 bookmarks -f -r 1 ADD_ON_REPO1
595 $ hg -R repo1 bookmarks -f -r 2 ADV_ON_REPO1
595 $ hg -R repo1 bookmarks -f -r 2 ADV_ON_REPO1
596 $ hg -R repo1 bookmarks -f -r 3 DIFF_ADV_ON_REPO1
596 $ hg -R repo1 bookmarks -f -r 3 DIFF_ADV_ON_REPO1
597 $ hg -R repo1 bookmarks -f -r 3 DIFF_DIVERGED
597 $ hg -R repo1 bookmarks -f -r 3 DIFF_DIVERGED
598 $ hg -R repo1 -q --config extensions.mq= strip 4
598 $ hg -R repo1 -q --config extensions.mq= strip 4
599 $ hg -R repo1 log -G --template '{node|short} ({bookmarks})'
599 $ hg -R repo1 log -G --template '{node|short} ({bookmarks})'
600 o 6100d3090acf (DIFF_ADV_ON_REPO1 DIFF_DIVERGED)
600 o 6100d3090acf (DIFF_ADV_ON_REPO1 DIFF_DIVERGED)
601 |
601 |
602 | o fa942426a6fd (ADV_ON_REPO1)
602 | o fa942426a6fd (ADV_ON_REPO1)
603 |/
603 |/
604 | o 66f7d451a68b (ADD_ON_REPO1 DIVERGED)
604 | o 66f7d451a68b (ADD_ON_REPO1 DIVERGED)
605 |/
605 |/
606 o 1ea73414a91b (ADV_ON_REPO2 DIFF_ADV_ON_REPO2 SAME)
606 o 1ea73414a91b (ADV_ON_REPO2 DIFF_ADV_ON_REPO2 SAME)
607
607
608
608
609 $ hg clone -U source repo2
609 $ hg clone -U source repo2
610 $ hg -R repo2 bookmarks -f -r 1 ADD_ON_REPO2
610 $ hg -R repo2 bookmarks -f -r 1 ADD_ON_REPO2
611 $ hg -R repo2 bookmarks -f -r 1 ADV_ON_REPO2
611 $ hg -R repo2 bookmarks -f -r 1 ADV_ON_REPO2
612 $ hg -R repo2 bookmarks -f -r 2 DIVERGED
612 $ hg -R repo2 bookmarks -f -r 2 DIVERGED
613 $ hg -R repo2 bookmarks -f -r 4 DIFF_ADV_ON_REPO2
613 $ hg -R repo2 bookmarks -f -r 4 DIFF_ADV_ON_REPO2
614 $ hg -R repo2 bookmarks -f -r 4 DIFF_DIVERGED
614 $ hg -R repo2 bookmarks -f -r 4 DIFF_DIVERGED
615 $ hg -R repo2 -q --config extensions.mq= strip 3
615 $ hg -R repo2 -q --config extensions.mq= strip 3
616 $ hg -R repo2 log -G --template '{node|short} ({bookmarks})'
616 $ hg -R repo2 log -G --template '{node|short} ({bookmarks})'
617 o e7bd5218ca15 (DIFF_ADV_ON_REPO2 DIFF_DIVERGED)
617 o e7bd5218ca15 (DIFF_ADV_ON_REPO2 DIFF_DIVERGED)
618 |
618 |
619 | o fa942426a6fd (DIVERGED)
619 | o fa942426a6fd (DIVERGED)
620 |/
620 |/
621 | o 66f7d451a68b (ADD_ON_REPO2 ADV_ON_REPO2)
621 | o 66f7d451a68b (ADD_ON_REPO2 ADV_ON_REPO2)
622 |/
622 |/
623 o 1ea73414a91b (ADV_ON_REPO1 DIFF_ADV_ON_REPO1 SAME)
623 o 1ea73414a91b (ADV_ON_REPO1 DIFF_ADV_ON_REPO1 SAME)
624
624
625
625
626 (test that difference of bookmarks between repositories are fully shown)
626 (test that difference of bookmarks between repositories are fully shown)
627
627
628 $ hg -R repo1 incoming -B repo2 -v
628 $ hg -R repo1 incoming -B repo2 -v
629 comparing with repo2
629 comparing with repo2
630 searching for changed bookmarks
630 searching for changed bookmarks
631 ADD_ON_REPO2 66f7d451a68b added
631 ADD_ON_REPO2 66f7d451a68b added
632 ADV_ON_REPO2 66f7d451a68b advanced
632 ADV_ON_REPO2 66f7d451a68b advanced
633 DIFF_ADV_ON_REPO2 e7bd5218ca15 changed
633 DIFF_ADV_ON_REPO2 e7bd5218ca15 changed
634 DIFF_DIVERGED e7bd5218ca15 changed
634 DIFF_DIVERGED e7bd5218ca15 changed
635 DIVERGED fa942426a6fd diverged
635 DIVERGED fa942426a6fd diverged
636 $ hg -R repo1 outgoing -B repo2 -v
636 $ hg -R repo1 outgoing -B repo2 -v
637 comparing with repo2
637 comparing with repo2
638 searching for changed bookmarks
638 searching for changed bookmarks
639 ADD_ON_REPO1 66f7d451a68b added
639 ADD_ON_REPO1 66f7d451a68b added
640 ADD_ON_REPO2 deleted
640 ADD_ON_REPO2 deleted
641 ADV_ON_REPO1 fa942426a6fd advanced
641 ADV_ON_REPO1 fa942426a6fd advanced
642 DIFF_ADV_ON_REPO1 6100d3090acf advanced
642 DIFF_ADV_ON_REPO1 6100d3090acf advanced
643 DIFF_ADV_ON_REPO2 1ea73414a91b changed
643 DIFF_ADV_ON_REPO2 1ea73414a91b changed
644 DIFF_DIVERGED 6100d3090acf changed
644 DIFF_DIVERGED 6100d3090acf changed
645 DIVERGED 66f7d451a68b diverged
645 DIVERGED 66f7d451a68b diverged
646
646
647 $ hg -R repo2 incoming -B repo1 -v
647 $ hg -R repo2 incoming -B repo1 -v
648 comparing with repo1
648 comparing with repo1
649 searching for changed bookmarks
649 searching for changed bookmarks
650 ADD_ON_REPO1 66f7d451a68b added
650 ADD_ON_REPO1 66f7d451a68b added
651 ADV_ON_REPO1 fa942426a6fd advanced
651 ADV_ON_REPO1 fa942426a6fd advanced
652 DIFF_ADV_ON_REPO1 6100d3090acf changed
652 DIFF_ADV_ON_REPO1 6100d3090acf changed
653 DIFF_DIVERGED 6100d3090acf changed
653 DIFF_DIVERGED 6100d3090acf changed
654 DIVERGED 66f7d451a68b diverged
654 DIVERGED 66f7d451a68b diverged
655 $ hg -R repo2 outgoing -B repo1 -v
655 $ hg -R repo2 outgoing -B repo1 -v
656 comparing with repo1
656 comparing with repo1
657 searching for changed bookmarks
657 searching for changed bookmarks
658 ADD_ON_REPO1 deleted
658 ADD_ON_REPO1 deleted
659 ADD_ON_REPO2 66f7d451a68b added
659 ADD_ON_REPO2 66f7d451a68b added
660 ADV_ON_REPO2 66f7d451a68b advanced
660 ADV_ON_REPO2 66f7d451a68b advanced
661 DIFF_ADV_ON_REPO1 1ea73414a91b changed
661 DIFF_ADV_ON_REPO1 1ea73414a91b changed
662 DIFF_ADV_ON_REPO2 e7bd5218ca15 advanced
662 DIFF_ADV_ON_REPO2 e7bd5218ca15 advanced
663 DIFF_DIVERGED e7bd5218ca15 changed
663 DIFF_DIVERGED e7bd5218ca15 changed
664 DIVERGED fa942426a6fd diverged
664 DIVERGED fa942426a6fd diverged
665
665
666 $ cd ..
666 $ cd ..
667
667
668 Pushing a bookmark should only push the changes required by that
668 Pushing a bookmark should only push the changes required by that
669 bookmark, not all outgoing changes:
669 bookmark, not all outgoing changes:
670 $ hg clone http://localhost:$HGPORT/ addmarks
670 $ hg clone http://localhost:$HGPORT/ addmarks
671 requesting all changes
671 requesting all changes
672 adding changesets
672 adding changesets
673 adding manifests
673 adding manifests
674 adding file changes
674 adding file changes
675 added 5 changesets with 5 changes to 3 files (+2 heads)
675 added 5 changesets with 5 changes to 3 files (+2 heads)
676 2 new obsolescence markers
676 2 new obsolescence markers
677 updating to bookmark @
677 updating to bookmark @
678 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
678 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
679 $ cd addmarks
679 $ cd addmarks
680 $ echo foo > foo
680 $ echo foo > foo
681 $ hg add foo
681 $ hg add foo
682 $ hg commit -m 'add foo'
682 $ hg commit -m 'add foo'
683 $ echo bar > bar
683 $ echo bar > bar
684 $ hg add bar
684 $ hg add bar
685 $ hg commit -m 'add bar'
685 $ hg commit -m 'add bar'
686 $ hg co "tip^"
686 $ hg co "tip^"
687 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
687 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
688 (leaving bookmark @)
688 (leaving bookmark @)
689 $ hg book add-foo
689 $ hg book add-foo
690 $ hg book -r tip add-bar
690 $ hg book -r tip add-bar
691 Note: this push *must* push only a single changeset, as that's the point
691 Note: this push *must* push only a single changeset, as that's the point
692 of this test.
692 of this test.
693 $ hg push -B add-foo --traceback
693 $ hg push -B add-foo --traceback
694 pushing to http://localhost:$HGPORT/
694 pushing to http://localhost:$HGPORT/
695 searching for changes
695 searching for changes
696 remote: adding changesets
696 remote: adding changesets
697 remote: adding manifests
697 remote: adding manifests
698 remote: adding file changes
698 remote: adding file changes
699 remote: added 1 changesets with 1 changes to 1 files
699 remote: added 1 changesets with 1 changes to 1 files
700 exporting bookmark add-foo
700 exporting bookmark add-foo
701
701
702 pushing a new bookmark on a new head does not require -f if -B is specified
702 pushing a new bookmark on a new head does not require -f if -B is specified
703
703
704 $ hg up -q X
704 $ hg up -q X
705 $ hg book W
705 $ hg book W
706 $ echo c5 > f2
706 $ echo c5 > f2
707 $ hg ci -Am5
707 $ hg ci -Am5
708 created new head
708 created new head
709 $ hg push -B .
709 $ hg push -B .
710 pushing to http://localhost:$HGPORT/
710 pushing to http://localhost:$HGPORT/
711 searching for changes
711 searching for changes
712 remote: adding changesets
712 remote: adding changesets
713 remote: adding manifests
713 remote: adding manifests
714 remote: adding file changes
714 remote: adding file changes
715 remote: added 1 changesets with 1 changes to 1 files (+1 heads)
715 remote: added 1 changesets with 1 changes to 1 files (+1 heads)
716 exporting bookmark W
716 exporting bookmark W
717 $ hg -R ../b id -r W
717 $ hg -R ../b id -r W
718 cc978a373a53 tip W
718 cc978a373a53 tip W
719
719
720 pushing an existing but divergent bookmark with -B still requires -f
720 pushing an existing but divergent bookmark with -B still requires -f
721
721
722 $ hg clone -q . ../r
722 $ hg clone -q . ../r
723 $ hg up -q X
723 $ hg up -q X
724 $ echo 1 > f2
724 $ echo 1 > f2
725 $ hg ci -qAml
725 $ hg ci -qAml
726
726
727 $ cd ../r
727 $ cd ../r
728 $ hg up -q X
728 $ hg up -q X
729 $ echo 2 > f2
729 $ echo 2 > f2
730 $ hg ci -qAmr
730 $ hg ci -qAmr
731 $ hg push -B X
731 $ hg push -B X
732 pushing to $TESTTMP/addmarks (glob)
732 pushing to $TESTTMP/addmarks (glob)
733 searching for changes
733 searching for changes
734 remote has heads on branch 'default' that are not known locally: a2a606d9ff1b
734 remote has heads on branch 'default' that are not known locally: a2a606d9ff1b
735 abort: push creates new remote head 54694f811df9 with bookmark 'X'!
735 abort: push creates new remote head 54694f811df9 with bookmark 'X'!
736 (pull and merge or see "hg help push" for details about pushing new heads)
736 (pull and merge or see "hg help push" for details about pushing new heads)
737 [255]
737 [255]
738 $ cd ../addmarks
738 $ cd ../addmarks
739
739
740 Check summary output for incoming/outgoing bookmarks
740 Check summary output for incoming/outgoing bookmarks
741
741
742 $ hg bookmarks -d X
742 $ hg bookmarks -d X
743 $ hg bookmarks -d Y
743 $ hg bookmarks -d Y
744 $ hg summary --remote | grep '^remote:'
744 $ hg summary --remote | grep '^remote:'
745 remote: *, 2 incoming bookmarks, 1 outgoing bookmarks (glob)
745 remote: *, 2 incoming bookmarks, 1 outgoing bookmarks (glob)
746
746
747 $ cd ..
747 $ cd ..
748
748
749 pushing an unchanged bookmark should result in no changes
749 pushing an unchanged bookmark should result in no changes
750
750
751 $ hg init unchanged-a
751 $ hg init unchanged-a
752 $ hg init unchanged-b
752 $ hg init unchanged-b
753 $ cd unchanged-a
753 $ cd unchanged-a
754 $ echo initial > foo
754 $ echo initial > foo
755 $ hg commit -A -m initial
755 $ hg commit -A -m initial
756 adding foo
756 adding foo
757 $ hg bookmark @
757 $ hg bookmark @
758 $ hg push -B @ ../unchanged-b
758 $ hg push -B @ ../unchanged-b
759 pushing to ../unchanged-b
759 pushing to ../unchanged-b
760 searching for changes
760 searching for changes
761 adding changesets
761 adding changesets
762 adding manifests
762 adding manifests
763 adding file changes
763 adding file changes
764 added 1 changesets with 1 changes to 1 files
764 added 1 changesets with 1 changes to 1 files
765 exporting bookmark @
765 exporting bookmark @
766
766
767 $ hg push -B @ ../unchanged-b
767 $ hg push -B @ ../unchanged-b
768 pushing to ../unchanged-b
768 pushing to ../unchanged-b
769 searching for changes
769 searching for changes
770 no changes found
770 no changes found
771 [1]
771 [1]
772
772
773
773
774 Check hook preventing push (issue4455)
774 Check hook preventing push (issue4455)
775 ======================================
775 ======================================
776
776
777 $ hg bookmarks
777 $ hg bookmarks
778 * @ 0:55482a6fb4b1
778 * @ 0:55482a6fb4b1
779 $ hg log -G
779 $ hg log -G
780 @ 0:55482a6fb4b1 initial
780 @ 0:55482a6fb4b1 initial
781
781
782 $ hg init ../issue4455-dest
782 $ hg init ../issue4455-dest
783 $ hg push ../issue4455-dest # changesets only
783 $ hg push ../issue4455-dest # changesets only
784 pushing to ../issue4455-dest
784 pushing to ../issue4455-dest
785 searching for changes
785 searching for changes
786 adding changesets
786 adding changesets
787 adding manifests
787 adding manifests
788 adding file changes
788 adding file changes
789 added 1 changesets with 1 changes to 1 files
789 added 1 changesets with 1 changes to 1 files
790 $ cat >> .hg/hgrc << EOF
790 $ cat >> .hg/hgrc << EOF
791 > [paths]
791 > [paths]
792 > local=../issue4455-dest/
792 > local=../issue4455-dest/
793 > ssh=ssh://user@dummy/issue4455-dest
793 > ssh=ssh://user@dummy/issue4455-dest
794 > http=http://localhost:$HGPORT/
794 > http=http://localhost:$HGPORT/
795 > [ui]
795 > [ui]
796 > ssh=python "$TESTDIR/dummyssh"
796 > ssh=python "$TESTDIR/dummyssh"
797 > EOF
797 > EOF
798 $ cat >> ../issue4455-dest/.hg/hgrc << EOF
798 $ cat >> ../issue4455-dest/.hg/hgrc << EOF
799 > [hooks]
799 > [hooks]
800 > prepushkey=false
800 > prepushkey=false
801 > [web]
801 > [web]
802 > push_ssl = false
802 > push_ssl = false
803 > allow_push = *
803 > allow_push = *
804 > EOF
804 > EOF
805 $ killdaemons.py
805 $ killdaemons.py
806 $ hg serve -R ../issue4455-dest -p $HGPORT -d --pid-file=../issue4455.pid -E ../issue4455-error.log
806 $ hg serve -R ../issue4455-dest -p $HGPORT -d --pid-file=../issue4455.pid -E ../issue4455-error.log
807 $ cat ../issue4455.pid >> $DAEMON_PIDS
807 $ cat ../issue4455.pid >> $DAEMON_PIDS
808
808
809 Local push
809 Local push
810 ----------
810 ----------
811
811
812 $ hg push -B @ local
812 $ hg push -B @ local
813 pushing to $TESTTMP/issue4455-dest (glob)
813 pushing to $TESTTMP/issue4455-dest (glob)
814 searching for changes
814 searching for changes
815 no changes found
815 no changes found
816 pushkey-abort: prepushkey hook exited with status 1
816 pushkey-abort: prepushkey hook exited with status 1
817 abort: exporting bookmark @ failed!
817 abort: exporting bookmark @ failed!
818 [255]
818 [255]
819 $ hg -R ../issue4455-dest/ bookmarks
819 $ hg -R ../issue4455-dest/ bookmarks
820 no bookmarks set
820 no bookmarks set
821
821
822 Using ssh
822 Using ssh
823 ---------
823 ---------
824
824
825 $ hg push -B @ ssh --config experimental.bundle2-exp=True
825 $ hg push -B @ ssh --config experimental.bundle2-exp=True
826 pushing to ssh://user@dummy/issue4455-dest
826 pushing to ssh://user@dummy/issue4455-dest
827 searching for changes
827 searching for changes
828 no changes found
828 no changes found
829 remote: pushkey-abort: prepushkey hook exited with status 1
829 remote: pushkey-abort: prepushkey hook exited with status 1
830 abort: exporting bookmark @ failed!
830 abort: exporting bookmark @ failed!
831 [255]
831 [255]
832 $ hg -R ../issue4455-dest/ bookmarks
832 $ hg -R ../issue4455-dest/ bookmarks
833 no bookmarks set
833 no bookmarks set
834
834
835 $ hg push -B @ ssh --config experimental.bundle2-exp=False
835 $ hg push -B @ ssh --config devel.legacy.exchange=bundle1
836 pushing to ssh://user@dummy/issue4455-dest
836 pushing to ssh://user@dummy/issue4455-dest
837 searching for changes
837 searching for changes
838 no changes found
838 no changes found
839 remote: pushkey-abort: prepushkey hook exited with status 1
839 remote: pushkey-abort: prepushkey hook exited with status 1
840 exporting bookmark @ failed!
840 exporting bookmark @ failed!
841 [1]
841 [1]
842 $ hg -R ../issue4455-dest/ bookmarks
842 $ hg -R ../issue4455-dest/ bookmarks
843 no bookmarks set
843 no bookmarks set
844
844
845 Using http
845 Using http
846 ----------
846 ----------
847
847
848 $ hg push -B @ http --config experimental.bundle2-exp=True
848 $ hg push -B @ http --config experimental.bundle2-exp=True
849 pushing to http://localhost:$HGPORT/
849 pushing to http://localhost:$HGPORT/
850 searching for changes
850 searching for changes
851 no changes found
851 no changes found
852 remote: pushkey-abort: prepushkey hook exited with status 1
852 remote: pushkey-abort: prepushkey hook exited with status 1
853 abort: exporting bookmark @ failed!
853 abort: exporting bookmark @ failed!
854 [255]
854 [255]
855 $ hg -R ../issue4455-dest/ bookmarks
855 $ hg -R ../issue4455-dest/ bookmarks
856 no bookmarks set
856 no bookmarks set
857
857
858 $ hg push -B @ http --config experimental.bundle2-exp=False
858 $ hg push -B @ http --config devel.legacy.exchange=bundle1
859 pushing to http://localhost:$HGPORT/
859 pushing to http://localhost:$HGPORT/
860 searching for changes
860 searching for changes
861 no changes found
861 no changes found
862 remote: pushkey-abort: prepushkey hook exited with status 1
862 remote: pushkey-abort: prepushkey hook exited with status 1
863 exporting bookmark @ failed!
863 exporting bookmark @ failed!
864 [1]
864 [1]
865 $ hg -R ../issue4455-dest/ bookmarks
865 $ hg -R ../issue4455-dest/ bookmarks
866 no bookmarks set
866 no bookmarks set
@@ -1,1191 +1,1191 b''
1 #require killdaemons
1 #require killdaemons
2
2
3 $ hgph() { hg log -G --template "{rev} {phase} {desc} - {node|short}\n" $*; }
3 $ hgph() { hg log -G --template "{rev} {phase} {desc} - {node|short}\n" $*; }
4
4
5 $ mkcommit() {
5 $ mkcommit() {
6 > echo "$1" > "$1"
6 > echo "$1" > "$1"
7 > hg add "$1"
7 > hg add "$1"
8 > message="$1"
8 > message="$1"
9 > shift
9 > shift
10 > hg ci -m "$message" $*
10 > hg ci -m "$message" $*
11 > }
11 > }
12
12
13 $ hg init alpha
13 $ hg init alpha
14 $ cd alpha
14 $ cd alpha
15 $ mkcommit a-A
15 $ mkcommit a-A
16 $ mkcommit a-B
16 $ mkcommit a-B
17 $ mkcommit a-C
17 $ mkcommit a-C
18 $ mkcommit a-D
18 $ mkcommit a-D
19 $ hgph
19 $ hgph
20 @ 3 draft a-D - b555f63b6063
20 @ 3 draft a-D - b555f63b6063
21 |
21 |
22 o 2 draft a-C - 54acac6f23ab
22 o 2 draft a-C - 54acac6f23ab
23 |
23 |
24 o 1 draft a-B - 548a3d25dbf0
24 o 1 draft a-B - 548a3d25dbf0
25 |
25 |
26 o 0 draft a-A - 054250a37db4
26 o 0 draft a-A - 054250a37db4
27
27
28
28
29 $ hg init ../beta
29 $ hg init ../beta
30 $ hg push -r 1 ../beta
30 $ hg push -r 1 ../beta
31 pushing to ../beta
31 pushing to ../beta
32 searching for changes
32 searching for changes
33 adding changesets
33 adding changesets
34 adding manifests
34 adding manifests
35 adding file changes
35 adding file changes
36 added 2 changesets with 2 changes to 2 files
36 added 2 changesets with 2 changes to 2 files
37 $ hgph
37 $ hgph
38 @ 3 draft a-D - b555f63b6063
38 @ 3 draft a-D - b555f63b6063
39 |
39 |
40 o 2 draft a-C - 54acac6f23ab
40 o 2 draft a-C - 54acac6f23ab
41 |
41 |
42 o 1 public a-B - 548a3d25dbf0
42 o 1 public a-B - 548a3d25dbf0
43 |
43 |
44 o 0 public a-A - 054250a37db4
44 o 0 public a-A - 054250a37db4
45
45
46
46
47 $ cd ../beta
47 $ cd ../beta
48 $ hgph
48 $ hgph
49 o 1 public a-B - 548a3d25dbf0
49 o 1 public a-B - 548a3d25dbf0
50 |
50 |
51 o 0 public a-A - 054250a37db4
51 o 0 public a-A - 054250a37db4
52
52
53 $ hg up -q
53 $ hg up -q
54 $ mkcommit b-A
54 $ mkcommit b-A
55 $ hgph
55 $ hgph
56 @ 2 draft b-A - f54f1bb90ff3
56 @ 2 draft b-A - f54f1bb90ff3
57 |
57 |
58 o 1 public a-B - 548a3d25dbf0
58 o 1 public a-B - 548a3d25dbf0
59 |
59 |
60 o 0 public a-A - 054250a37db4
60 o 0 public a-A - 054250a37db4
61
61
62 $ hg pull ../alpha
62 $ hg pull ../alpha
63 pulling from ../alpha
63 pulling from ../alpha
64 searching for changes
64 searching for changes
65 adding changesets
65 adding changesets
66 adding manifests
66 adding manifests
67 adding file changes
67 adding file changes
68 added 2 changesets with 2 changes to 2 files (+1 heads)
68 added 2 changesets with 2 changes to 2 files (+1 heads)
69 (run 'hg heads' to see heads, 'hg merge' to merge)
69 (run 'hg heads' to see heads, 'hg merge' to merge)
70 $ hgph
70 $ hgph
71 o 4 public a-D - b555f63b6063
71 o 4 public a-D - b555f63b6063
72 |
72 |
73 o 3 public a-C - 54acac6f23ab
73 o 3 public a-C - 54acac6f23ab
74 |
74 |
75 | @ 2 draft b-A - f54f1bb90ff3
75 | @ 2 draft b-A - f54f1bb90ff3
76 |/
76 |/
77 o 1 public a-B - 548a3d25dbf0
77 o 1 public a-B - 548a3d25dbf0
78 |
78 |
79 o 0 public a-A - 054250a37db4
79 o 0 public a-A - 054250a37db4
80
80
81
81
82 pull did not updated ../alpha state.
82 pull did not updated ../alpha state.
83 push from alpha to beta should update phase even if nothing is transferred
83 push from alpha to beta should update phase even if nothing is transferred
84
84
85 $ cd ../alpha
85 $ cd ../alpha
86 $ hgph # not updated by remote pull
86 $ hgph # not updated by remote pull
87 @ 3 draft a-D - b555f63b6063
87 @ 3 draft a-D - b555f63b6063
88 |
88 |
89 o 2 draft a-C - 54acac6f23ab
89 o 2 draft a-C - 54acac6f23ab
90 |
90 |
91 o 1 public a-B - 548a3d25dbf0
91 o 1 public a-B - 548a3d25dbf0
92 |
92 |
93 o 0 public a-A - 054250a37db4
93 o 0 public a-A - 054250a37db4
94
94
95 $ hg push -r 2 ../beta
95 $ hg push -r 2 ../beta
96 pushing to ../beta
96 pushing to ../beta
97 searching for changes
97 searching for changes
98 no changes found
98 no changes found
99 [1]
99 [1]
100 $ hgph
100 $ hgph
101 @ 3 draft a-D - b555f63b6063
101 @ 3 draft a-D - b555f63b6063
102 |
102 |
103 o 2 public a-C - 54acac6f23ab
103 o 2 public a-C - 54acac6f23ab
104 |
104 |
105 o 1 public a-B - 548a3d25dbf0
105 o 1 public a-B - 548a3d25dbf0
106 |
106 |
107 o 0 public a-A - 054250a37db4
107 o 0 public a-A - 054250a37db4
108
108
109 $ hg push ../beta
109 $ hg push ../beta
110 pushing to ../beta
110 pushing to ../beta
111 searching for changes
111 searching for changes
112 no changes found
112 no changes found
113 [1]
113 [1]
114 $ hgph
114 $ hgph
115 @ 3 public a-D - b555f63b6063
115 @ 3 public a-D - b555f63b6063
116 |
116 |
117 o 2 public a-C - 54acac6f23ab
117 o 2 public a-C - 54acac6f23ab
118 |
118 |
119 o 1 public a-B - 548a3d25dbf0
119 o 1 public a-B - 548a3d25dbf0
120 |
120 |
121 o 0 public a-A - 054250a37db4
121 o 0 public a-A - 054250a37db4
122
122
123
123
124 update must update phase of common changeset too
124 update must update phase of common changeset too
125
125
126 $ hg pull ../beta # getting b-A
126 $ hg pull ../beta # getting b-A
127 pulling from ../beta
127 pulling from ../beta
128 searching for changes
128 searching for changes
129 adding changesets
129 adding changesets
130 adding manifests
130 adding manifests
131 adding file changes
131 adding file changes
132 added 1 changesets with 1 changes to 1 files (+1 heads)
132 added 1 changesets with 1 changes to 1 files (+1 heads)
133 (run 'hg heads' to see heads, 'hg merge' to merge)
133 (run 'hg heads' to see heads, 'hg merge' to merge)
134
134
135 $ cd ../beta
135 $ cd ../beta
136 $ hgph # not updated by remote pull
136 $ hgph # not updated by remote pull
137 o 4 public a-D - b555f63b6063
137 o 4 public a-D - b555f63b6063
138 |
138 |
139 o 3 public a-C - 54acac6f23ab
139 o 3 public a-C - 54acac6f23ab
140 |
140 |
141 | @ 2 draft b-A - f54f1bb90ff3
141 | @ 2 draft b-A - f54f1bb90ff3
142 |/
142 |/
143 o 1 public a-B - 548a3d25dbf0
143 o 1 public a-B - 548a3d25dbf0
144 |
144 |
145 o 0 public a-A - 054250a37db4
145 o 0 public a-A - 054250a37db4
146
146
147 $ hg pull ../alpha
147 $ hg pull ../alpha
148 pulling from ../alpha
148 pulling from ../alpha
149 searching for changes
149 searching for changes
150 no changes found
150 no changes found
151 $ hgph
151 $ hgph
152 o 4 public a-D - b555f63b6063
152 o 4 public a-D - b555f63b6063
153 |
153 |
154 o 3 public a-C - 54acac6f23ab
154 o 3 public a-C - 54acac6f23ab
155 |
155 |
156 | @ 2 public b-A - f54f1bb90ff3
156 | @ 2 public b-A - f54f1bb90ff3
157 |/
157 |/
158 o 1 public a-B - 548a3d25dbf0
158 o 1 public a-B - 548a3d25dbf0
159 |
159 |
160 o 0 public a-A - 054250a37db4
160 o 0 public a-A - 054250a37db4
161
161
162
162
163 Publish configuration option
163 Publish configuration option
164 ----------------------------
164 ----------------------------
165
165
166 Pull
166 Pull
167 ````
167 ````
168
168
169 changegroup are added without phase movement
169 changegroup are added without phase movement
170
170
171 $ hg bundle -a ../base.bundle
171 $ hg bundle -a ../base.bundle
172 5 changesets found
172 5 changesets found
173 $ cd ..
173 $ cd ..
174 $ hg init mu
174 $ hg init mu
175 $ cd mu
175 $ cd mu
176 $ cat > .hg/hgrc << EOF
176 $ cat > .hg/hgrc << EOF
177 > [phases]
177 > [phases]
178 > publish=0
178 > publish=0
179 > EOF
179 > EOF
180 $ hg unbundle ../base.bundle
180 $ hg unbundle ../base.bundle
181 adding changesets
181 adding changesets
182 adding manifests
182 adding manifests
183 adding file changes
183 adding file changes
184 added 5 changesets with 5 changes to 5 files (+1 heads)
184 added 5 changesets with 5 changes to 5 files (+1 heads)
185 (run 'hg heads' to see heads, 'hg merge' to merge)
185 (run 'hg heads' to see heads, 'hg merge' to merge)
186 $ hgph
186 $ hgph
187 o 4 draft a-D - b555f63b6063
187 o 4 draft a-D - b555f63b6063
188 |
188 |
189 o 3 draft a-C - 54acac6f23ab
189 o 3 draft a-C - 54acac6f23ab
190 |
190 |
191 | o 2 draft b-A - f54f1bb90ff3
191 | o 2 draft b-A - f54f1bb90ff3
192 |/
192 |/
193 o 1 draft a-B - 548a3d25dbf0
193 o 1 draft a-B - 548a3d25dbf0
194 |
194 |
195 o 0 draft a-A - 054250a37db4
195 o 0 draft a-A - 054250a37db4
196
196
197 $ cd ..
197 $ cd ..
198
198
199 Pulling from publish=False to publish=False does not move boundary.
199 Pulling from publish=False to publish=False does not move boundary.
200
200
201 $ hg init nu
201 $ hg init nu
202 $ cd nu
202 $ cd nu
203 $ cat > .hg/hgrc << EOF
203 $ cat > .hg/hgrc << EOF
204 > [phases]
204 > [phases]
205 > publish=0
205 > publish=0
206 > EOF
206 > EOF
207 $ hg pull ../mu -r 54acac6f23ab
207 $ hg pull ../mu -r 54acac6f23ab
208 pulling from ../mu
208 pulling from ../mu
209 adding changesets
209 adding changesets
210 adding manifests
210 adding manifests
211 adding file changes
211 adding file changes
212 added 3 changesets with 3 changes to 3 files
212 added 3 changesets with 3 changes to 3 files
213 (run 'hg update' to get a working copy)
213 (run 'hg update' to get a working copy)
214 $ hgph
214 $ hgph
215 o 2 draft a-C - 54acac6f23ab
215 o 2 draft a-C - 54acac6f23ab
216 |
216 |
217 o 1 draft a-B - 548a3d25dbf0
217 o 1 draft a-B - 548a3d25dbf0
218 |
218 |
219 o 0 draft a-A - 054250a37db4
219 o 0 draft a-A - 054250a37db4
220
220
221
221
222 Even for common
222 Even for common
223
223
224 $ hg pull ../mu -r f54f1bb90ff3
224 $ hg pull ../mu -r f54f1bb90ff3
225 pulling from ../mu
225 pulling from ../mu
226 searching for changes
226 searching for changes
227 adding changesets
227 adding changesets
228 adding manifests
228 adding manifests
229 adding file changes
229 adding file changes
230 added 1 changesets with 1 changes to 1 files (+1 heads)
230 added 1 changesets with 1 changes to 1 files (+1 heads)
231 (run 'hg heads' to see heads, 'hg merge' to merge)
231 (run 'hg heads' to see heads, 'hg merge' to merge)
232 $ hgph
232 $ hgph
233 o 3 draft b-A - f54f1bb90ff3
233 o 3 draft b-A - f54f1bb90ff3
234 |
234 |
235 | o 2 draft a-C - 54acac6f23ab
235 | o 2 draft a-C - 54acac6f23ab
236 |/
236 |/
237 o 1 draft a-B - 548a3d25dbf0
237 o 1 draft a-B - 548a3d25dbf0
238 |
238 |
239 o 0 draft a-A - 054250a37db4
239 o 0 draft a-A - 054250a37db4
240
240
241
241
242
242
243 Pulling from Publish=True to Publish=False move boundary in common set.
243 Pulling from Publish=True to Publish=False move boundary in common set.
244 we are in nu
244 we are in nu
245
245
246 $ hg pull ../alpha -r b555f63b6063
246 $ hg pull ../alpha -r b555f63b6063
247 pulling from ../alpha
247 pulling from ../alpha
248 searching for changes
248 searching for changes
249 adding changesets
249 adding changesets
250 adding manifests
250 adding manifests
251 adding file changes
251 adding file changes
252 added 1 changesets with 1 changes to 1 files
252 added 1 changesets with 1 changes to 1 files
253 (run 'hg update' to get a working copy)
253 (run 'hg update' to get a working copy)
254 $ hgph # f54f1bb90ff3 stay draft, not ancestor of -r
254 $ hgph # f54f1bb90ff3 stay draft, not ancestor of -r
255 o 4 public a-D - b555f63b6063
255 o 4 public a-D - b555f63b6063
256 |
256 |
257 | o 3 draft b-A - f54f1bb90ff3
257 | o 3 draft b-A - f54f1bb90ff3
258 | |
258 | |
259 o | 2 public a-C - 54acac6f23ab
259 o | 2 public a-C - 54acac6f23ab
260 |/
260 |/
261 o 1 public a-B - 548a3d25dbf0
261 o 1 public a-B - 548a3d25dbf0
262 |
262 |
263 o 0 public a-A - 054250a37db4
263 o 0 public a-A - 054250a37db4
264
264
265
265
266 pulling from Publish=False to publish=False with some public
266 pulling from Publish=False to publish=False with some public
267
267
268 $ hg up -q f54f1bb90ff3
268 $ hg up -q f54f1bb90ff3
269 $ mkcommit n-A
269 $ mkcommit n-A
270 $ mkcommit n-B
270 $ mkcommit n-B
271 $ hgph
271 $ hgph
272 @ 6 draft n-B - 145e75495359
272 @ 6 draft n-B - 145e75495359
273 |
273 |
274 o 5 draft n-A - d6bcb4f74035
274 o 5 draft n-A - d6bcb4f74035
275 |
275 |
276 | o 4 public a-D - b555f63b6063
276 | o 4 public a-D - b555f63b6063
277 | |
277 | |
278 o | 3 draft b-A - f54f1bb90ff3
278 o | 3 draft b-A - f54f1bb90ff3
279 | |
279 | |
280 | o 2 public a-C - 54acac6f23ab
280 | o 2 public a-C - 54acac6f23ab
281 |/
281 |/
282 o 1 public a-B - 548a3d25dbf0
282 o 1 public a-B - 548a3d25dbf0
283 |
283 |
284 o 0 public a-A - 054250a37db4
284 o 0 public a-A - 054250a37db4
285
285
286 $ cd ../mu
286 $ cd ../mu
287 $ hg pull ../nu
287 $ hg pull ../nu
288 pulling from ../nu
288 pulling from ../nu
289 searching for changes
289 searching for changes
290 adding changesets
290 adding changesets
291 adding manifests
291 adding manifests
292 adding file changes
292 adding file changes
293 added 2 changesets with 2 changes to 2 files
293 added 2 changesets with 2 changes to 2 files
294 (run 'hg update' to get a working copy)
294 (run 'hg update' to get a working copy)
295 $ hgph
295 $ hgph
296 o 6 draft n-B - 145e75495359
296 o 6 draft n-B - 145e75495359
297 |
297 |
298 o 5 draft n-A - d6bcb4f74035
298 o 5 draft n-A - d6bcb4f74035
299 |
299 |
300 | o 4 public a-D - b555f63b6063
300 | o 4 public a-D - b555f63b6063
301 | |
301 | |
302 | o 3 public a-C - 54acac6f23ab
302 | o 3 public a-C - 54acac6f23ab
303 | |
303 | |
304 o | 2 draft b-A - f54f1bb90ff3
304 o | 2 draft b-A - f54f1bb90ff3
305 |/
305 |/
306 o 1 public a-B - 548a3d25dbf0
306 o 1 public a-B - 548a3d25dbf0
307 |
307 |
308 o 0 public a-A - 054250a37db4
308 o 0 public a-A - 054250a37db4
309
309
310 $ cd ..
310 $ cd ..
311
311
312 pulling into publish=True
312 pulling into publish=True
313
313
314 $ cd alpha
314 $ cd alpha
315 $ hgph
315 $ hgph
316 o 4 public b-A - f54f1bb90ff3
316 o 4 public b-A - f54f1bb90ff3
317 |
317 |
318 | @ 3 public a-D - b555f63b6063
318 | @ 3 public a-D - b555f63b6063
319 | |
319 | |
320 | o 2 public a-C - 54acac6f23ab
320 | o 2 public a-C - 54acac6f23ab
321 |/
321 |/
322 o 1 public a-B - 548a3d25dbf0
322 o 1 public a-B - 548a3d25dbf0
323 |
323 |
324 o 0 public a-A - 054250a37db4
324 o 0 public a-A - 054250a37db4
325
325
326 $ hg pull ../mu
326 $ hg pull ../mu
327 pulling from ../mu
327 pulling from ../mu
328 searching for changes
328 searching for changes
329 adding changesets
329 adding changesets
330 adding manifests
330 adding manifests
331 adding file changes
331 adding file changes
332 added 2 changesets with 2 changes to 2 files
332 added 2 changesets with 2 changes to 2 files
333 (run 'hg update' to get a working copy)
333 (run 'hg update' to get a working copy)
334 $ hgph
334 $ hgph
335 o 6 draft n-B - 145e75495359
335 o 6 draft n-B - 145e75495359
336 |
336 |
337 o 5 draft n-A - d6bcb4f74035
337 o 5 draft n-A - d6bcb4f74035
338 |
338 |
339 o 4 public b-A - f54f1bb90ff3
339 o 4 public b-A - f54f1bb90ff3
340 |
340 |
341 | @ 3 public a-D - b555f63b6063
341 | @ 3 public a-D - b555f63b6063
342 | |
342 | |
343 | o 2 public a-C - 54acac6f23ab
343 | o 2 public a-C - 54acac6f23ab
344 |/
344 |/
345 o 1 public a-B - 548a3d25dbf0
345 o 1 public a-B - 548a3d25dbf0
346 |
346 |
347 o 0 public a-A - 054250a37db4
347 o 0 public a-A - 054250a37db4
348
348
349 $ cd ..
349 $ cd ..
350
350
351 pulling back into original repo
351 pulling back into original repo
352
352
353 $ cd nu
353 $ cd nu
354 $ hg pull ../alpha
354 $ hg pull ../alpha
355 pulling from ../alpha
355 pulling from ../alpha
356 searching for changes
356 searching for changes
357 no changes found
357 no changes found
358 $ hgph
358 $ hgph
359 @ 6 public n-B - 145e75495359
359 @ 6 public n-B - 145e75495359
360 |
360 |
361 o 5 public n-A - d6bcb4f74035
361 o 5 public n-A - d6bcb4f74035
362 |
362 |
363 | o 4 public a-D - b555f63b6063
363 | o 4 public a-D - b555f63b6063
364 | |
364 | |
365 o | 3 public b-A - f54f1bb90ff3
365 o | 3 public b-A - f54f1bb90ff3
366 | |
366 | |
367 | o 2 public a-C - 54acac6f23ab
367 | o 2 public a-C - 54acac6f23ab
368 |/
368 |/
369 o 1 public a-B - 548a3d25dbf0
369 o 1 public a-B - 548a3d25dbf0
370 |
370 |
371 o 0 public a-A - 054250a37db4
371 o 0 public a-A - 054250a37db4
372
372
373
373
374 Push
374 Push
375 ````
375 ````
376
376
377 (inserted)
377 (inserted)
378
378
379 Test that phase are pushed even when they are nothing to pus
379 Test that phase are pushed even when they are nothing to pus
380 (this might be tested later bu are very convenient to not alter too much test)
380 (this might be tested later bu are very convenient to not alter too much test)
381
381
382 Push back to alpha
382 Push back to alpha
383
383
384 $ hg push ../alpha # from nu
384 $ hg push ../alpha # from nu
385 pushing to ../alpha
385 pushing to ../alpha
386 searching for changes
386 searching for changes
387 no changes found
387 no changes found
388 [1]
388 [1]
389 $ cd ..
389 $ cd ..
390 $ cd alpha
390 $ cd alpha
391 $ hgph
391 $ hgph
392 o 6 public n-B - 145e75495359
392 o 6 public n-B - 145e75495359
393 |
393 |
394 o 5 public n-A - d6bcb4f74035
394 o 5 public n-A - d6bcb4f74035
395 |
395 |
396 o 4 public b-A - f54f1bb90ff3
396 o 4 public b-A - f54f1bb90ff3
397 |
397 |
398 | @ 3 public a-D - b555f63b6063
398 | @ 3 public a-D - b555f63b6063
399 | |
399 | |
400 | o 2 public a-C - 54acac6f23ab
400 | o 2 public a-C - 54acac6f23ab
401 |/
401 |/
402 o 1 public a-B - 548a3d25dbf0
402 o 1 public a-B - 548a3d25dbf0
403 |
403 |
404 o 0 public a-A - 054250a37db4
404 o 0 public a-A - 054250a37db4
405
405
406
406
407 (end insertion)
407 (end insertion)
408
408
409
409
410 initial setup
410 initial setup
411
411
412 $ hg log -G # of alpha
412 $ hg log -G # of alpha
413 o changeset: 6:145e75495359
413 o changeset: 6:145e75495359
414 | tag: tip
414 | tag: tip
415 | user: test
415 | user: test
416 | date: Thu Jan 01 00:00:00 1970 +0000
416 | date: Thu Jan 01 00:00:00 1970 +0000
417 | summary: n-B
417 | summary: n-B
418 |
418 |
419 o changeset: 5:d6bcb4f74035
419 o changeset: 5:d6bcb4f74035
420 | user: test
420 | user: test
421 | date: Thu Jan 01 00:00:00 1970 +0000
421 | date: Thu Jan 01 00:00:00 1970 +0000
422 | summary: n-A
422 | summary: n-A
423 |
423 |
424 o changeset: 4:f54f1bb90ff3
424 o changeset: 4:f54f1bb90ff3
425 | parent: 1:548a3d25dbf0
425 | parent: 1:548a3d25dbf0
426 | user: test
426 | user: test
427 | date: Thu Jan 01 00:00:00 1970 +0000
427 | date: Thu Jan 01 00:00:00 1970 +0000
428 | summary: b-A
428 | summary: b-A
429 |
429 |
430 | @ changeset: 3:b555f63b6063
430 | @ changeset: 3:b555f63b6063
431 | | user: test
431 | | user: test
432 | | date: Thu Jan 01 00:00:00 1970 +0000
432 | | date: Thu Jan 01 00:00:00 1970 +0000
433 | | summary: a-D
433 | | summary: a-D
434 | |
434 | |
435 | o changeset: 2:54acac6f23ab
435 | o changeset: 2:54acac6f23ab
436 |/ user: test
436 |/ user: test
437 | date: Thu Jan 01 00:00:00 1970 +0000
437 | date: Thu Jan 01 00:00:00 1970 +0000
438 | summary: a-C
438 | summary: a-C
439 |
439 |
440 o changeset: 1:548a3d25dbf0
440 o changeset: 1:548a3d25dbf0
441 | user: test
441 | user: test
442 | date: Thu Jan 01 00:00:00 1970 +0000
442 | date: Thu Jan 01 00:00:00 1970 +0000
443 | summary: a-B
443 | summary: a-B
444 |
444 |
445 o changeset: 0:054250a37db4
445 o changeset: 0:054250a37db4
446 user: test
446 user: test
447 date: Thu Jan 01 00:00:00 1970 +0000
447 date: Thu Jan 01 00:00:00 1970 +0000
448 summary: a-A
448 summary: a-A
449
449
450 $ mkcommit a-E
450 $ mkcommit a-E
451 $ mkcommit a-F
451 $ mkcommit a-F
452 $ mkcommit a-G
452 $ mkcommit a-G
453 $ hg up d6bcb4f74035 -q
453 $ hg up d6bcb4f74035 -q
454 $ mkcommit a-H
454 $ mkcommit a-H
455 created new head
455 created new head
456 $ hgph
456 $ hgph
457 @ 10 draft a-H - 967b449fbc94
457 @ 10 draft a-H - 967b449fbc94
458 |
458 |
459 | o 9 draft a-G - 3e27b6f1eee1
459 | o 9 draft a-G - 3e27b6f1eee1
460 | |
460 | |
461 | o 8 draft a-F - b740e3e5c05d
461 | o 8 draft a-F - b740e3e5c05d
462 | |
462 | |
463 | o 7 draft a-E - e9f537e46dea
463 | o 7 draft a-E - e9f537e46dea
464 | |
464 | |
465 +---o 6 public n-B - 145e75495359
465 +---o 6 public n-B - 145e75495359
466 | |
466 | |
467 o | 5 public n-A - d6bcb4f74035
467 o | 5 public n-A - d6bcb4f74035
468 | |
468 | |
469 o | 4 public b-A - f54f1bb90ff3
469 o | 4 public b-A - f54f1bb90ff3
470 | |
470 | |
471 | o 3 public a-D - b555f63b6063
471 | o 3 public a-D - b555f63b6063
472 | |
472 | |
473 | o 2 public a-C - 54acac6f23ab
473 | o 2 public a-C - 54acac6f23ab
474 |/
474 |/
475 o 1 public a-B - 548a3d25dbf0
475 o 1 public a-B - 548a3d25dbf0
476 |
476 |
477 o 0 public a-A - 054250a37db4
477 o 0 public a-A - 054250a37db4
478
478
479
479
480 Pulling from bundle does not alter phases of changeset not present in the bundle
480 Pulling from bundle does not alter phases of changeset not present in the bundle
481
481
482 $ hg bundle --base 1 -r 6 -r 3 ../partial-bundle.hg
482 $ hg bundle --base 1 -r 6 -r 3 ../partial-bundle.hg
483 5 changesets found
483 5 changesets found
484 $ hg pull ../partial-bundle.hg
484 $ hg pull ../partial-bundle.hg
485 pulling from ../partial-bundle.hg
485 pulling from ../partial-bundle.hg
486 searching for changes
486 searching for changes
487 no changes found
487 no changes found
488 $ hgph
488 $ hgph
489 @ 10 draft a-H - 967b449fbc94
489 @ 10 draft a-H - 967b449fbc94
490 |
490 |
491 | o 9 draft a-G - 3e27b6f1eee1
491 | o 9 draft a-G - 3e27b6f1eee1
492 | |
492 | |
493 | o 8 draft a-F - b740e3e5c05d
493 | o 8 draft a-F - b740e3e5c05d
494 | |
494 | |
495 | o 7 draft a-E - e9f537e46dea
495 | o 7 draft a-E - e9f537e46dea
496 | |
496 | |
497 +---o 6 public n-B - 145e75495359
497 +---o 6 public n-B - 145e75495359
498 | |
498 | |
499 o | 5 public n-A - d6bcb4f74035
499 o | 5 public n-A - d6bcb4f74035
500 | |
500 | |
501 o | 4 public b-A - f54f1bb90ff3
501 o | 4 public b-A - f54f1bb90ff3
502 | |
502 | |
503 | o 3 public a-D - b555f63b6063
503 | o 3 public a-D - b555f63b6063
504 | |
504 | |
505 | o 2 public a-C - 54acac6f23ab
505 | o 2 public a-C - 54acac6f23ab
506 |/
506 |/
507 o 1 public a-B - 548a3d25dbf0
507 o 1 public a-B - 548a3d25dbf0
508 |
508 |
509 o 0 public a-A - 054250a37db4
509 o 0 public a-A - 054250a37db4
510
510
511
511
512 Pushing to Publish=False (unknown changeset)
512 Pushing to Publish=False (unknown changeset)
513
513
514 $ hg push ../mu -r b740e3e5c05d # a-F
514 $ hg push ../mu -r b740e3e5c05d # a-F
515 pushing to ../mu
515 pushing to ../mu
516 searching for changes
516 searching for changes
517 adding changesets
517 adding changesets
518 adding manifests
518 adding manifests
519 adding file changes
519 adding file changes
520 added 2 changesets with 2 changes to 2 files
520 added 2 changesets with 2 changes to 2 files
521 $ hgph
521 $ hgph
522 @ 10 draft a-H - 967b449fbc94
522 @ 10 draft a-H - 967b449fbc94
523 |
523 |
524 | o 9 draft a-G - 3e27b6f1eee1
524 | o 9 draft a-G - 3e27b6f1eee1
525 | |
525 | |
526 | o 8 draft a-F - b740e3e5c05d
526 | o 8 draft a-F - b740e3e5c05d
527 | |
527 | |
528 | o 7 draft a-E - e9f537e46dea
528 | o 7 draft a-E - e9f537e46dea
529 | |
529 | |
530 +---o 6 public n-B - 145e75495359
530 +---o 6 public n-B - 145e75495359
531 | |
531 | |
532 o | 5 public n-A - d6bcb4f74035
532 o | 5 public n-A - d6bcb4f74035
533 | |
533 | |
534 o | 4 public b-A - f54f1bb90ff3
534 o | 4 public b-A - f54f1bb90ff3
535 | |
535 | |
536 | o 3 public a-D - b555f63b6063
536 | o 3 public a-D - b555f63b6063
537 | |
537 | |
538 | o 2 public a-C - 54acac6f23ab
538 | o 2 public a-C - 54acac6f23ab
539 |/
539 |/
540 o 1 public a-B - 548a3d25dbf0
540 o 1 public a-B - 548a3d25dbf0
541 |
541 |
542 o 0 public a-A - 054250a37db4
542 o 0 public a-A - 054250a37db4
543
543
544
544
545 $ cd ../mu
545 $ cd ../mu
546 $ hgph # again f54f1bb90ff3, d6bcb4f74035 and 145e75495359 stay draft,
546 $ hgph # again f54f1bb90ff3, d6bcb4f74035 and 145e75495359 stay draft,
547 > # not ancestor of -r
547 > # not ancestor of -r
548 o 8 draft a-F - b740e3e5c05d
548 o 8 draft a-F - b740e3e5c05d
549 |
549 |
550 o 7 draft a-E - e9f537e46dea
550 o 7 draft a-E - e9f537e46dea
551 |
551 |
552 | o 6 draft n-B - 145e75495359
552 | o 6 draft n-B - 145e75495359
553 | |
553 | |
554 | o 5 draft n-A - d6bcb4f74035
554 | o 5 draft n-A - d6bcb4f74035
555 | |
555 | |
556 o | 4 public a-D - b555f63b6063
556 o | 4 public a-D - b555f63b6063
557 | |
557 | |
558 o | 3 public a-C - 54acac6f23ab
558 o | 3 public a-C - 54acac6f23ab
559 | |
559 | |
560 | o 2 draft b-A - f54f1bb90ff3
560 | o 2 draft b-A - f54f1bb90ff3
561 |/
561 |/
562 o 1 public a-B - 548a3d25dbf0
562 o 1 public a-B - 548a3d25dbf0
563 |
563 |
564 o 0 public a-A - 054250a37db4
564 o 0 public a-A - 054250a37db4
565
565
566
566
567 Pushing to Publish=True (unknown changeset)
567 Pushing to Publish=True (unknown changeset)
568
568
569 $ hg push ../beta -r b740e3e5c05d
569 $ hg push ../beta -r b740e3e5c05d
570 pushing to ../beta
570 pushing to ../beta
571 searching for changes
571 searching for changes
572 adding changesets
572 adding changesets
573 adding manifests
573 adding manifests
574 adding file changes
574 adding file changes
575 added 2 changesets with 2 changes to 2 files
575 added 2 changesets with 2 changes to 2 files
576 $ hgph # again f54f1bb90ff3, d6bcb4f74035 and 145e75495359 stay draft,
576 $ hgph # again f54f1bb90ff3, d6bcb4f74035 and 145e75495359 stay draft,
577 > # not ancestor of -r
577 > # not ancestor of -r
578 o 8 public a-F - b740e3e5c05d
578 o 8 public a-F - b740e3e5c05d
579 |
579 |
580 o 7 public a-E - e9f537e46dea
580 o 7 public a-E - e9f537e46dea
581 |
581 |
582 | o 6 draft n-B - 145e75495359
582 | o 6 draft n-B - 145e75495359
583 | |
583 | |
584 | o 5 draft n-A - d6bcb4f74035
584 | o 5 draft n-A - d6bcb4f74035
585 | |
585 | |
586 o | 4 public a-D - b555f63b6063
586 o | 4 public a-D - b555f63b6063
587 | |
587 | |
588 o | 3 public a-C - 54acac6f23ab
588 o | 3 public a-C - 54acac6f23ab
589 | |
589 | |
590 | o 2 draft b-A - f54f1bb90ff3
590 | o 2 draft b-A - f54f1bb90ff3
591 |/
591 |/
592 o 1 public a-B - 548a3d25dbf0
592 o 1 public a-B - 548a3d25dbf0
593 |
593 |
594 o 0 public a-A - 054250a37db4
594 o 0 public a-A - 054250a37db4
595
595
596
596
597 Pushing to Publish=True (common changeset)
597 Pushing to Publish=True (common changeset)
598
598
599 $ cd ../beta
599 $ cd ../beta
600 $ hg push ../alpha
600 $ hg push ../alpha
601 pushing to ../alpha
601 pushing to ../alpha
602 searching for changes
602 searching for changes
603 no changes found
603 no changes found
604 [1]
604 [1]
605 $ hgph
605 $ hgph
606 o 6 public a-F - b740e3e5c05d
606 o 6 public a-F - b740e3e5c05d
607 |
607 |
608 o 5 public a-E - e9f537e46dea
608 o 5 public a-E - e9f537e46dea
609 |
609 |
610 o 4 public a-D - b555f63b6063
610 o 4 public a-D - b555f63b6063
611 |
611 |
612 o 3 public a-C - 54acac6f23ab
612 o 3 public a-C - 54acac6f23ab
613 |
613 |
614 | @ 2 public b-A - f54f1bb90ff3
614 | @ 2 public b-A - f54f1bb90ff3
615 |/
615 |/
616 o 1 public a-B - 548a3d25dbf0
616 o 1 public a-B - 548a3d25dbf0
617 |
617 |
618 o 0 public a-A - 054250a37db4
618 o 0 public a-A - 054250a37db4
619
619
620 $ cd ../alpha
620 $ cd ../alpha
621 $ hgph
621 $ hgph
622 @ 10 draft a-H - 967b449fbc94
622 @ 10 draft a-H - 967b449fbc94
623 |
623 |
624 | o 9 draft a-G - 3e27b6f1eee1
624 | o 9 draft a-G - 3e27b6f1eee1
625 | |
625 | |
626 | o 8 public a-F - b740e3e5c05d
626 | o 8 public a-F - b740e3e5c05d
627 | |
627 | |
628 | o 7 public a-E - e9f537e46dea
628 | o 7 public a-E - e9f537e46dea
629 | |
629 | |
630 +---o 6 public n-B - 145e75495359
630 +---o 6 public n-B - 145e75495359
631 | |
631 | |
632 o | 5 public n-A - d6bcb4f74035
632 o | 5 public n-A - d6bcb4f74035
633 | |
633 | |
634 o | 4 public b-A - f54f1bb90ff3
634 o | 4 public b-A - f54f1bb90ff3
635 | |
635 | |
636 | o 3 public a-D - b555f63b6063
636 | o 3 public a-D - b555f63b6063
637 | |
637 | |
638 | o 2 public a-C - 54acac6f23ab
638 | o 2 public a-C - 54acac6f23ab
639 |/
639 |/
640 o 1 public a-B - 548a3d25dbf0
640 o 1 public a-B - 548a3d25dbf0
641 |
641 |
642 o 0 public a-A - 054250a37db4
642 o 0 public a-A - 054250a37db4
643
643
644
644
645 Pushing to Publish=False (common changeset that change phase + unknown one)
645 Pushing to Publish=False (common changeset that change phase + unknown one)
646
646
647 $ hg push ../mu -r 967b449fbc94 -f
647 $ hg push ../mu -r 967b449fbc94 -f
648 pushing to ../mu
648 pushing to ../mu
649 searching for changes
649 searching for changes
650 adding changesets
650 adding changesets
651 adding manifests
651 adding manifests
652 adding file changes
652 adding file changes
653 added 1 changesets with 1 changes to 1 files (+1 heads)
653 added 1 changesets with 1 changes to 1 files (+1 heads)
654 $ hgph
654 $ hgph
655 @ 10 draft a-H - 967b449fbc94
655 @ 10 draft a-H - 967b449fbc94
656 |
656 |
657 | o 9 draft a-G - 3e27b6f1eee1
657 | o 9 draft a-G - 3e27b6f1eee1
658 | |
658 | |
659 | o 8 public a-F - b740e3e5c05d
659 | o 8 public a-F - b740e3e5c05d
660 | |
660 | |
661 | o 7 public a-E - e9f537e46dea
661 | o 7 public a-E - e9f537e46dea
662 | |
662 | |
663 +---o 6 public n-B - 145e75495359
663 +---o 6 public n-B - 145e75495359
664 | |
664 | |
665 o | 5 public n-A - d6bcb4f74035
665 o | 5 public n-A - d6bcb4f74035
666 | |
666 | |
667 o | 4 public b-A - f54f1bb90ff3
667 o | 4 public b-A - f54f1bb90ff3
668 | |
668 | |
669 | o 3 public a-D - b555f63b6063
669 | o 3 public a-D - b555f63b6063
670 | |
670 | |
671 | o 2 public a-C - 54acac6f23ab
671 | o 2 public a-C - 54acac6f23ab
672 |/
672 |/
673 o 1 public a-B - 548a3d25dbf0
673 o 1 public a-B - 548a3d25dbf0
674 |
674 |
675 o 0 public a-A - 054250a37db4
675 o 0 public a-A - 054250a37db4
676
676
677 $ cd ../mu
677 $ cd ../mu
678 $ hgph # d6bcb4f74035 should have changed phase
678 $ hgph # d6bcb4f74035 should have changed phase
679 > # 145e75495359 is still draft. not ancestor of -r
679 > # 145e75495359 is still draft. not ancestor of -r
680 o 9 draft a-H - 967b449fbc94
680 o 9 draft a-H - 967b449fbc94
681 |
681 |
682 | o 8 public a-F - b740e3e5c05d
682 | o 8 public a-F - b740e3e5c05d
683 | |
683 | |
684 | o 7 public a-E - e9f537e46dea
684 | o 7 public a-E - e9f537e46dea
685 | |
685 | |
686 +---o 6 draft n-B - 145e75495359
686 +---o 6 draft n-B - 145e75495359
687 | |
687 | |
688 o | 5 public n-A - d6bcb4f74035
688 o | 5 public n-A - d6bcb4f74035
689 | |
689 | |
690 | o 4 public a-D - b555f63b6063
690 | o 4 public a-D - b555f63b6063
691 | |
691 | |
692 | o 3 public a-C - 54acac6f23ab
692 | o 3 public a-C - 54acac6f23ab
693 | |
693 | |
694 o | 2 public b-A - f54f1bb90ff3
694 o | 2 public b-A - f54f1bb90ff3
695 |/
695 |/
696 o 1 public a-B - 548a3d25dbf0
696 o 1 public a-B - 548a3d25dbf0
697 |
697 |
698 o 0 public a-A - 054250a37db4
698 o 0 public a-A - 054250a37db4
699
699
700
700
701
701
702 Pushing to Publish=True (common changeset from publish=False)
702 Pushing to Publish=True (common changeset from publish=False)
703
703
704 (in mu)
704 (in mu)
705 $ hg push ../alpha
705 $ hg push ../alpha
706 pushing to ../alpha
706 pushing to ../alpha
707 searching for changes
707 searching for changes
708 no changes found
708 no changes found
709 [1]
709 [1]
710 $ hgph
710 $ hgph
711 o 9 public a-H - 967b449fbc94
711 o 9 public a-H - 967b449fbc94
712 |
712 |
713 | o 8 public a-F - b740e3e5c05d
713 | o 8 public a-F - b740e3e5c05d
714 | |
714 | |
715 | o 7 public a-E - e9f537e46dea
715 | o 7 public a-E - e9f537e46dea
716 | |
716 | |
717 +---o 6 public n-B - 145e75495359
717 +---o 6 public n-B - 145e75495359
718 | |
718 | |
719 o | 5 public n-A - d6bcb4f74035
719 o | 5 public n-A - d6bcb4f74035
720 | |
720 | |
721 | o 4 public a-D - b555f63b6063
721 | o 4 public a-D - b555f63b6063
722 | |
722 | |
723 | o 3 public a-C - 54acac6f23ab
723 | o 3 public a-C - 54acac6f23ab
724 | |
724 | |
725 o | 2 public b-A - f54f1bb90ff3
725 o | 2 public b-A - f54f1bb90ff3
726 |/
726 |/
727 o 1 public a-B - 548a3d25dbf0
727 o 1 public a-B - 548a3d25dbf0
728 |
728 |
729 o 0 public a-A - 054250a37db4
729 o 0 public a-A - 054250a37db4
730
730
731 $ hgph -R ../alpha # a-H should have been synced to 0
731 $ hgph -R ../alpha # a-H should have been synced to 0
732 @ 10 public a-H - 967b449fbc94
732 @ 10 public a-H - 967b449fbc94
733 |
733 |
734 | o 9 draft a-G - 3e27b6f1eee1
734 | o 9 draft a-G - 3e27b6f1eee1
735 | |
735 | |
736 | o 8 public a-F - b740e3e5c05d
736 | o 8 public a-F - b740e3e5c05d
737 | |
737 | |
738 | o 7 public a-E - e9f537e46dea
738 | o 7 public a-E - e9f537e46dea
739 | |
739 | |
740 +---o 6 public n-B - 145e75495359
740 +---o 6 public n-B - 145e75495359
741 | |
741 | |
742 o | 5 public n-A - d6bcb4f74035
742 o | 5 public n-A - d6bcb4f74035
743 | |
743 | |
744 o | 4 public b-A - f54f1bb90ff3
744 o | 4 public b-A - f54f1bb90ff3
745 | |
745 | |
746 | o 3 public a-D - b555f63b6063
746 | o 3 public a-D - b555f63b6063
747 | |
747 | |
748 | o 2 public a-C - 54acac6f23ab
748 | o 2 public a-C - 54acac6f23ab
749 |/
749 |/
750 o 1 public a-B - 548a3d25dbf0
750 o 1 public a-B - 548a3d25dbf0
751 |
751 |
752 o 0 public a-A - 054250a37db4
752 o 0 public a-A - 054250a37db4
753
753
754
754
755
755
756 Bare push with next changeset and common changeset needing sync (issue3575)
756 Bare push with next changeset and common changeset needing sync (issue3575)
757
757
758 (reset some stat on remote repo to avoid confusing other tests)
758 (reset some stat on remote repo to avoid confusing other tests)
759
759
760 $ hg -R ../alpha --config extensions.strip= strip --no-backup 967b449fbc94
760 $ hg -R ../alpha --config extensions.strip= strip --no-backup 967b449fbc94
761 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
761 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
762 $ hg phase --force --draft b740e3e5c05d 967b449fbc94
762 $ hg phase --force --draft b740e3e5c05d 967b449fbc94
763 $ hg push -fv ../alpha
763 $ hg push -fv ../alpha
764 pushing to ../alpha
764 pushing to ../alpha
765 searching for changes
765 searching for changes
766 1 changesets found
766 1 changesets found
767 uncompressed size of bundle content:
767 uncompressed size of bundle content:
768 192 (changelog)
768 192 (changelog)
769 165 (manifests)
769 165 (manifests)
770 131 a-H
770 131 a-H
771 adding changesets
771 adding changesets
772 adding manifests
772 adding manifests
773 adding file changes
773 adding file changes
774 added 1 changesets with 1 changes to 1 files (+1 heads)
774 added 1 changesets with 1 changes to 1 files (+1 heads)
775 $ hgph
775 $ hgph
776 o 9 public a-H - 967b449fbc94
776 o 9 public a-H - 967b449fbc94
777 |
777 |
778 | o 8 public a-F - b740e3e5c05d
778 | o 8 public a-F - b740e3e5c05d
779 | |
779 | |
780 | o 7 public a-E - e9f537e46dea
780 | o 7 public a-E - e9f537e46dea
781 | |
781 | |
782 +---o 6 public n-B - 145e75495359
782 +---o 6 public n-B - 145e75495359
783 | |
783 | |
784 o | 5 public n-A - d6bcb4f74035
784 o | 5 public n-A - d6bcb4f74035
785 | |
785 | |
786 | o 4 public a-D - b555f63b6063
786 | o 4 public a-D - b555f63b6063
787 | |
787 | |
788 | o 3 public a-C - 54acac6f23ab
788 | o 3 public a-C - 54acac6f23ab
789 | |
789 | |
790 o | 2 public b-A - f54f1bb90ff3
790 o | 2 public b-A - f54f1bb90ff3
791 |/
791 |/
792 o 1 public a-B - 548a3d25dbf0
792 o 1 public a-B - 548a3d25dbf0
793 |
793 |
794 o 0 public a-A - 054250a37db4
794 o 0 public a-A - 054250a37db4
795
795
796
796
797 $ hg -R ../alpha update 967b449fbc94 #for latter test consistency
797 $ hg -R ../alpha update 967b449fbc94 #for latter test consistency
798 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
798 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
799 $ hgph -R ../alpha
799 $ hgph -R ../alpha
800 @ 10 public a-H - 967b449fbc94
800 @ 10 public a-H - 967b449fbc94
801 |
801 |
802 | o 9 draft a-G - 3e27b6f1eee1
802 | o 9 draft a-G - 3e27b6f1eee1
803 | |
803 | |
804 | o 8 public a-F - b740e3e5c05d
804 | o 8 public a-F - b740e3e5c05d
805 | |
805 | |
806 | o 7 public a-E - e9f537e46dea
806 | o 7 public a-E - e9f537e46dea
807 | |
807 | |
808 +---o 6 public n-B - 145e75495359
808 +---o 6 public n-B - 145e75495359
809 | |
809 | |
810 o | 5 public n-A - d6bcb4f74035
810 o | 5 public n-A - d6bcb4f74035
811 | |
811 | |
812 o | 4 public b-A - f54f1bb90ff3
812 o | 4 public b-A - f54f1bb90ff3
813 | |
813 | |
814 | o 3 public a-D - b555f63b6063
814 | o 3 public a-D - b555f63b6063
815 | |
815 | |
816 | o 2 public a-C - 54acac6f23ab
816 | o 2 public a-C - 54acac6f23ab
817 |/
817 |/
818 o 1 public a-B - 548a3d25dbf0
818 o 1 public a-B - 548a3d25dbf0
819 |
819 |
820 o 0 public a-A - 054250a37db4
820 o 0 public a-A - 054250a37db4
821
821
822
822
823 Discovery locally secret changeset on a remote repository:
823 Discovery locally secret changeset on a remote repository:
824
824
825 - should make it non-secret
825 - should make it non-secret
826
826
827 $ cd ../alpha
827 $ cd ../alpha
828 $ mkcommit A-secret --config phases.new-commit=2
828 $ mkcommit A-secret --config phases.new-commit=2
829 $ hgph
829 $ hgph
830 @ 11 secret A-secret - 435b5d83910c
830 @ 11 secret A-secret - 435b5d83910c
831 |
831 |
832 o 10 public a-H - 967b449fbc94
832 o 10 public a-H - 967b449fbc94
833 |
833 |
834 | o 9 draft a-G - 3e27b6f1eee1
834 | o 9 draft a-G - 3e27b6f1eee1
835 | |
835 | |
836 | o 8 public a-F - b740e3e5c05d
836 | o 8 public a-F - b740e3e5c05d
837 | |
837 | |
838 | o 7 public a-E - e9f537e46dea
838 | o 7 public a-E - e9f537e46dea
839 | |
839 | |
840 +---o 6 public n-B - 145e75495359
840 +---o 6 public n-B - 145e75495359
841 | |
841 | |
842 o | 5 public n-A - d6bcb4f74035
842 o | 5 public n-A - d6bcb4f74035
843 | |
843 | |
844 o | 4 public b-A - f54f1bb90ff3
844 o | 4 public b-A - f54f1bb90ff3
845 | |
845 | |
846 | o 3 public a-D - b555f63b6063
846 | o 3 public a-D - b555f63b6063
847 | |
847 | |
848 | o 2 public a-C - 54acac6f23ab
848 | o 2 public a-C - 54acac6f23ab
849 |/
849 |/
850 o 1 public a-B - 548a3d25dbf0
850 o 1 public a-B - 548a3d25dbf0
851 |
851 |
852 o 0 public a-A - 054250a37db4
852 o 0 public a-A - 054250a37db4
853
853
854 $ hg bundle --base 'parents(.)' -r . ../secret-bundle.hg
854 $ hg bundle --base 'parents(.)' -r . ../secret-bundle.hg
855 1 changesets found
855 1 changesets found
856 $ hg -R ../mu unbundle ../secret-bundle.hg
856 $ hg -R ../mu unbundle ../secret-bundle.hg
857 adding changesets
857 adding changesets
858 adding manifests
858 adding manifests
859 adding file changes
859 adding file changes
860 added 1 changesets with 1 changes to 1 files
860 added 1 changesets with 1 changes to 1 files
861 (run 'hg update' to get a working copy)
861 (run 'hg update' to get a working copy)
862 $ hgph -R ../mu
862 $ hgph -R ../mu
863 o 10 draft A-secret - 435b5d83910c
863 o 10 draft A-secret - 435b5d83910c
864 |
864 |
865 o 9 public a-H - 967b449fbc94
865 o 9 public a-H - 967b449fbc94
866 |
866 |
867 | o 8 public a-F - b740e3e5c05d
867 | o 8 public a-F - b740e3e5c05d
868 | |
868 | |
869 | o 7 public a-E - e9f537e46dea
869 | o 7 public a-E - e9f537e46dea
870 | |
870 | |
871 +---o 6 public n-B - 145e75495359
871 +---o 6 public n-B - 145e75495359
872 | |
872 | |
873 o | 5 public n-A - d6bcb4f74035
873 o | 5 public n-A - d6bcb4f74035
874 | |
874 | |
875 | o 4 public a-D - b555f63b6063
875 | o 4 public a-D - b555f63b6063
876 | |
876 | |
877 | o 3 public a-C - 54acac6f23ab
877 | o 3 public a-C - 54acac6f23ab
878 | |
878 | |
879 o | 2 public b-A - f54f1bb90ff3
879 o | 2 public b-A - f54f1bb90ff3
880 |/
880 |/
881 o 1 public a-B - 548a3d25dbf0
881 o 1 public a-B - 548a3d25dbf0
882 |
882 |
883 o 0 public a-A - 054250a37db4
883 o 0 public a-A - 054250a37db4
884
884
885 $ hg pull ../mu
885 $ hg pull ../mu
886 pulling from ../mu
886 pulling from ../mu
887 searching for changes
887 searching for changes
888 no changes found
888 no changes found
889 $ hgph
889 $ hgph
890 @ 11 draft A-secret - 435b5d83910c
890 @ 11 draft A-secret - 435b5d83910c
891 |
891 |
892 o 10 public a-H - 967b449fbc94
892 o 10 public a-H - 967b449fbc94
893 |
893 |
894 | o 9 draft a-G - 3e27b6f1eee1
894 | o 9 draft a-G - 3e27b6f1eee1
895 | |
895 | |
896 | o 8 public a-F - b740e3e5c05d
896 | o 8 public a-F - b740e3e5c05d
897 | |
897 | |
898 | o 7 public a-E - e9f537e46dea
898 | o 7 public a-E - e9f537e46dea
899 | |
899 | |
900 +---o 6 public n-B - 145e75495359
900 +---o 6 public n-B - 145e75495359
901 | |
901 | |
902 o | 5 public n-A - d6bcb4f74035
902 o | 5 public n-A - d6bcb4f74035
903 | |
903 | |
904 o | 4 public b-A - f54f1bb90ff3
904 o | 4 public b-A - f54f1bb90ff3
905 | |
905 | |
906 | o 3 public a-D - b555f63b6063
906 | o 3 public a-D - b555f63b6063
907 | |
907 | |
908 | o 2 public a-C - 54acac6f23ab
908 | o 2 public a-C - 54acac6f23ab
909 |/
909 |/
910 o 1 public a-B - 548a3d25dbf0
910 o 1 public a-B - 548a3d25dbf0
911 |
911 |
912 o 0 public a-A - 054250a37db4
912 o 0 public a-A - 054250a37db4
913
913
914
914
915 pushing a locally public and draft changesets remotely secret should make them
915 pushing a locally public and draft changesets remotely secret should make them
916 appear on the remote side.
916 appear on the remote side.
917
917
918 $ hg -R ../mu phase --secret --force 967b449fbc94
918 $ hg -R ../mu phase --secret --force 967b449fbc94
919 $ hg push -r 435b5d83910c ../mu
919 $ hg push -r 435b5d83910c ../mu
920 pushing to ../mu
920 pushing to ../mu
921 searching for changes
921 searching for changes
922 abort: push creates new remote head 435b5d83910c!
922 abort: push creates new remote head 435b5d83910c!
923 (merge or see "hg help push" for details about pushing new heads)
923 (merge or see "hg help push" for details about pushing new heads)
924 [255]
924 [255]
925 $ hg push -fr 435b5d83910c ../mu # because the push will create new visible head
925 $ hg push -fr 435b5d83910c ../mu # because the push will create new visible head
926 pushing to ../mu
926 pushing to ../mu
927 searching for changes
927 searching for changes
928 adding changesets
928 adding changesets
929 adding manifests
929 adding manifests
930 adding file changes
930 adding file changes
931 added 0 changesets with 0 changes to 2 files
931 added 0 changesets with 0 changes to 2 files
932 $ hgph -R ../mu
932 $ hgph -R ../mu
933 o 10 draft A-secret - 435b5d83910c
933 o 10 draft A-secret - 435b5d83910c
934 |
934 |
935 o 9 public a-H - 967b449fbc94
935 o 9 public a-H - 967b449fbc94
936 |
936 |
937 | o 8 public a-F - b740e3e5c05d
937 | o 8 public a-F - b740e3e5c05d
938 | |
938 | |
939 | o 7 public a-E - e9f537e46dea
939 | o 7 public a-E - e9f537e46dea
940 | |
940 | |
941 +---o 6 public n-B - 145e75495359
941 +---o 6 public n-B - 145e75495359
942 | |
942 | |
943 o | 5 public n-A - d6bcb4f74035
943 o | 5 public n-A - d6bcb4f74035
944 | |
944 | |
945 | o 4 public a-D - b555f63b6063
945 | o 4 public a-D - b555f63b6063
946 | |
946 | |
947 | o 3 public a-C - 54acac6f23ab
947 | o 3 public a-C - 54acac6f23ab
948 | |
948 | |
949 o | 2 public b-A - f54f1bb90ff3
949 o | 2 public b-A - f54f1bb90ff3
950 |/
950 |/
951 o 1 public a-B - 548a3d25dbf0
951 o 1 public a-B - 548a3d25dbf0
952 |
952 |
953 o 0 public a-A - 054250a37db4
953 o 0 public a-A - 054250a37db4
954
954
955
955
956 pull new changeset with common draft locally
956 pull new changeset with common draft locally
957
957
958 $ hg up -q 967b449fbc94 # create a new root for draft
958 $ hg up -q 967b449fbc94 # create a new root for draft
959 $ mkcommit 'alpha-more'
959 $ mkcommit 'alpha-more'
960 created new head
960 created new head
961 $ hg push -fr . ../mu
961 $ hg push -fr . ../mu
962 pushing to ../mu
962 pushing to ../mu
963 searching for changes
963 searching for changes
964 adding changesets
964 adding changesets
965 adding manifests
965 adding manifests
966 adding file changes
966 adding file changes
967 added 1 changesets with 1 changes to 1 files (+1 heads)
967 added 1 changesets with 1 changes to 1 files (+1 heads)
968 $ cd ../mu
968 $ cd ../mu
969 $ hg phase --secret --force 1c5cfd894796
969 $ hg phase --secret --force 1c5cfd894796
970 $ hg up -q 435b5d83910c
970 $ hg up -q 435b5d83910c
971 $ mkcommit 'mu-more'
971 $ mkcommit 'mu-more'
972 $ cd ../alpha
972 $ cd ../alpha
973 $ hg pull ../mu
973 $ hg pull ../mu
974 pulling from ../mu
974 pulling from ../mu
975 searching for changes
975 searching for changes
976 adding changesets
976 adding changesets
977 adding manifests
977 adding manifests
978 adding file changes
978 adding file changes
979 added 1 changesets with 1 changes to 1 files
979 added 1 changesets with 1 changes to 1 files
980 (run 'hg update' to get a working copy)
980 (run 'hg update' to get a working copy)
981 $ hgph
981 $ hgph
982 o 13 draft mu-more - 5237fb433fc8
982 o 13 draft mu-more - 5237fb433fc8
983 |
983 |
984 | @ 12 draft alpha-more - 1c5cfd894796
984 | @ 12 draft alpha-more - 1c5cfd894796
985 | |
985 | |
986 o | 11 draft A-secret - 435b5d83910c
986 o | 11 draft A-secret - 435b5d83910c
987 |/
987 |/
988 o 10 public a-H - 967b449fbc94
988 o 10 public a-H - 967b449fbc94
989 |
989 |
990 | o 9 draft a-G - 3e27b6f1eee1
990 | o 9 draft a-G - 3e27b6f1eee1
991 | |
991 | |
992 | o 8 public a-F - b740e3e5c05d
992 | o 8 public a-F - b740e3e5c05d
993 | |
993 | |
994 | o 7 public a-E - e9f537e46dea
994 | o 7 public a-E - e9f537e46dea
995 | |
995 | |
996 +---o 6 public n-B - 145e75495359
996 +---o 6 public n-B - 145e75495359
997 | |
997 | |
998 o | 5 public n-A - d6bcb4f74035
998 o | 5 public n-A - d6bcb4f74035
999 | |
999 | |
1000 o | 4 public b-A - f54f1bb90ff3
1000 o | 4 public b-A - f54f1bb90ff3
1001 | |
1001 | |
1002 | o 3 public a-D - b555f63b6063
1002 | o 3 public a-D - b555f63b6063
1003 | |
1003 | |
1004 | o 2 public a-C - 54acac6f23ab
1004 | o 2 public a-C - 54acac6f23ab
1005 |/
1005 |/
1006 o 1 public a-B - 548a3d25dbf0
1006 o 1 public a-B - 548a3d25dbf0
1007 |
1007 |
1008 o 0 public a-A - 054250a37db4
1008 o 0 public a-A - 054250a37db4
1009
1009
1010
1010
1011 Test that test are properly ignored on remote event when existing locally
1011 Test that test are properly ignored on remote event when existing locally
1012
1012
1013 $ cd ..
1013 $ cd ..
1014 $ hg clone -qU -r b555f63b6063 -r f54f1bb90ff3 beta gamma
1014 $ hg clone -qU -r b555f63b6063 -r f54f1bb90ff3 beta gamma
1015
1015
1016 # pathological case are
1016 # pathological case are
1017 #
1017 #
1018 # * secret remotely
1018 # * secret remotely
1019 # * known locally
1019 # * known locally
1020 # * repo have uncommon changeset
1020 # * repo have uncommon changeset
1021
1021
1022 $ hg -R beta phase --secret --force f54f1bb90ff3
1022 $ hg -R beta phase --secret --force f54f1bb90ff3
1023 $ hg -R gamma phase --draft --force f54f1bb90ff3
1023 $ hg -R gamma phase --draft --force f54f1bb90ff3
1024
1024
1025 $ cd gamma
1025 $ cd gamma
1026 $ hg pull ../beta
1026 $ hg pull ../beta
1027 pulling from ../beta
1027 pulling from ../beta
1028 searching for changes
1028 searching for changes
1029 adding changesets
1029 adding changesets
1030 adding manifests
1030 adding manifests
1031 adding file changes
1031 adding file changes
1032 added 2 changesets with 2 changes to 2 files
1032 added 2 changesets with 2 changes to 2 files
1033 (run 'hg update' to get a working copy)
1033 (run 'hg update' to get a working copy)
1034 $ hg phase f54f1bb90ff3
1034 $ hg phase f54f1bb90ff3
1035 2: draft
1035 2: draft
1036
1036
1037 same over the wire
1037 same over the wire
1038
1038
1039 $ cd ../beta
1039 $ cd ../beta
1040 $ hg serve -p $HGPORT -d --pid-file=../beta.pid -E ../beta-error.log
1040 $ hg serve -p $HGPORT -d --pid-file=../beta.pid -E ../beta-error.log
1041 $ cat ../beta.pid >> $DAEMON_PIDS
1041 $ cat ../beta.pid >> $DAEMON_PIDS
1042 $ cd ../gamma
1042 $ cd ../gamma
1043
1043
1044 $ hg pull http://localhost:$HGPORT/ --config experimental.bundle2-exp=True
1044 $ hg pull http://localhost:$HGPORT/ --config experimental.bundle2-exp=True
1045 pulling from http://localhost:$HGPORT/
1045 pulling from http://localhost:$HGPORT/
1046 searching for changes
1046 searching for changes
1047 no changes found
1047 no changes found
1048 $ hg phase f54f1bb90ff3
1048 $ hg phase f54f1bb90ff3
1049 2: draft
1049 2: draft
1050
1050
1051 enforce bundle1
1051 enforce bundle1
1052
1052
1053 $ hg pull http://localhost:$HGPORT/ --config experimental.bundle2-exp=False
1053 $ hg pull http://localhost:$HGPORT/ --config devel.legacy.exchange=bundle1
1054 pulling from http://localhost:$HGPORT/
1054 pulling from http://localhost:$HGPORT/
1055 searching for changes
1055 searching for changes
1056 no changes found
1056 no changes found
1057 $ hg phase f54f1bb90ff3
1057 $ hg phase f54f1bb90ff3
1058 2: draft
1058 2: draft
1059
1059
1060 check that secret local on both side are not synced to public
1060 check that secret local on both side are not synced to public
1061
1061
1062 $ hg push -r b555f63b6063 http://localhost:$HGPORT/
1062 $ hg push -r b555f63b6063 http://localhost:$HGPORT/
1063 pushing to http://localhost:$HGPORT/
1063 pushing to http://localhost:$HGPORT/
1064 searching for changes
1064 searching for changes
1065 no changes found
1065 no changes found
1066 [1]
1066 [1]
1067 $ hg phase f54f1bb90ff3
1067 $ hg phase f54f1bb90ff3
1068 2: draft
1068 2: draft
1069
1069
1070 put the changeset in the draft state again
1070 put the changeset in the draft state again
1071 (first test after this one expect to be able to copy)
1071 (first test after this one expect to be able to copy)
1072
1072
1073 $ cd ..
1073 $ cd ..
1074
1074
1075
1075
1076 Test Clone behavior
1076 Test Clone behavior
1077
1077
1078 A. Clone without secret changeset
1078 A. Clone without secret changeset
1079
1079
1080 1. cloning non-publishing repository
1080 1. cloning non-publishing repository
1081 (Phase should be preserved)
1081 (Phase should be preserved)
1082
1082
1083 # make sure there is no secret so we can use a copy clone
1083 # make sure there is no secret so we can use a copy clone
1084
1084
1085 $ hg -R mu phase --draft 'secret()'
1085 $ hg -R mu phase --draft 'secret()'
1086
1086
1087 $ hg clone -U mu Tau
1087 $ hg clone -U mu Tau
1088 $ hgph -R Tau
1088 $ hgph -R Tau
1089 o 12 draft mu-more - 5237fb433fc8
1089 o 12 draft mu-more - 5237fb433fc8
1090 |
1090 |
1091 | o 11 draft alpha-more - 1c5cfd894796
1091 | o 11 draft alpha-more - 1c5cfd894796
1092 | |
1092 | |
1093 o | 10 draft A-secret - 435b5d83910c
1093 o | 10 draft A-secret - 435b5d83910c
1094 |/
1094 |/
1095 o 9 public a-H - 967b449fbc94
1095 o 9 public a-H - 967b449fbc94
1096 |
1096 |
1097 | o 8 public a-F - b740e3e5c05d
1097 | o 8 public a-F - b740e3e5c05d
1098 | |
1098 | |
1099 | o 7 public a-E - e9f537e46dea
1099 | o 7 public a-E - e9f537e46dea
1100 | |
1100 | |
1101 +---o 6 public n-B - 145e75495359
1101 +---o 6 public n-B - 145e75495359
1102 | |
1102 | |
1103 o | 5 public n-A - d6bcb4f74035
1103 o | 5 public n-A - d6bcb4f74035
1104 | |
1104 | |
1105 | o 4 public a-D - b555f63b6063
1105 | o 4 public a-D - b555f63b6063
1106 | |
1106 | |
1107 | o 3 public a-C - 54acac6f23ab
1107 | o 3 public a-C - 54acac6f23ab
1108 | |
1108 | |
1109 o | 2 public b-A - f54f1bb90ff3
1109 o | 2 public b-A - f54f1bb90ff3
1110 |/
1110 |/
1111 o 1 public a-B - 548a3d25dbf0
1111 o 1 public a-B - 548a3d25dbf0
1112 |
1112 |
1113 o 0 public a-A - 054250a37db4
1113 o 0 public a-A - 054250a37db4
1114
1114
1115
1115
1116 2. cloning publishing repository
1116 2. cloning publishing repository
1117
1117
1118 (everything should be public)
1118 (everything should be public)
1119
1119
1120 $ hg clone -U alpha Upsilon
1120 $ hg clone -U alpha Upsilon
1121 $ hgph -R Upsilon
1121 $ hgph -R Upsilon
1122 o 13 public mu-more - 5237fb433fc8
1122 o 13 public mu-more - 5237fb433fc8
1123 |
1123 |
1124 | o 12 public alpha-more - 1c5cfd894796
1124 | o 12 public alpha-more - 1c5cfd894796
1125 | |
1125 | |
1126 o | 11 public A-secret - 435b5d83910c
1126 o | 11 public A-secret - 435b5d83910c
1127 |/
1127 |/
1128 o 10 public a-H - 967b449fbc94
1128 o 10 public a-H - 967b449fbc94
1129 |
1129 |
1130 | o 9 public a-G - 3e27b6f1eee1
1130 | o 9 public a-G - 3e27b6f1eee1
1131 | |
1131 | |
1132 | o 8 public a-F - b740e3e5c05d
1132 | o 8 public a-F - b740e3e5c05d
1133 | |
1133 | |
1134 | o 7 public a-E - e9f537e46dea
1134 | o 7 public a-E - e9f537e46dea
1135 | |
1135 | |
1136 +---o 6 public n-B - 145e75495359
1136 +---o 6 public n-B - 145e75495359
1137 | |
1137 | |
1138 o | 5 public n-A - d6bcb4f74035
1138 o | 5 public n-A - d6bcb4f74035
1139 | |
1139 | |
1140 o | 4 public b-A - f54f1bb90ff3
1140 o | 4 public b-A - f54f1bb90ff3
1141 | |
1141 | |
1142 | o 3 public a-D - b555f63b6063
1142 | o 3 public a-D - b555f63b6063
1143 | |
1143 | |
1144 | o 2 public a-C - 54acac6f23ab
1144 | o 2 public a-C - 54acac6f23ab
1145 |/
1145 |/
1146 o 1 public a-B - 548a3d25dbf0
1146 o 1 public a-B - 548a3d25dbf0
1147 |
1147 |
1148 o 0 public a-A - 054250a37db4
1148 o 0 public a-A - 054250a37db4
1149
1149
1150 #if unix-permissions no-root
1150 #if unix-permissions no-root
1151
1151
1152 Pushing From an unlockable repo
1152 Pushing From an unlockable repo
1153 --------------------------------
1153 --------------------------------
1154 (issue3684)
1154 (issue3684)
1155
1155
1156 Unability to lock the source repo should not prevent the push. It will prevent
1156 Unability to lock the source repo should not prevent the push. It will prevent
1157 the retrieval of remote phase during push. For example, pushing to a publishing
1157 the retrieval of remote phase during push. For example, pushing to a publishing
1158 server won't turn changeset public.
1158 server won't turn changeset public.
1159
1159
1160 1. Test that push is not prevented
1160 1. Test that push is not prevented
1161
1161
1162 $ hg init Phi
1162 $ hg init Phi
1163 $ cd Upsilon
1163 $ cd Upsilon
1164 $ chmod -R -w .hg
1164 $ chmod -R -w .hg
1165 $ hg push ../Phi
1165 $ hg push ../Phi
1166 pushing to ../Phi
1166 pushing to ../Phi
1167 searching for changes
1167 searching for changes
1168 adding changesets
1168 adding changesets
1169 adding manifests
1169 adding manifests
1170 adding file changes
1170 adding file changes
1171 added 14 changesets with 14 changes to 14 files (+3 heads)
1171 added 14 changesets with 14 changes to 14 files (+3 heads)
1172 $ chmod -R +w .hg
1172 $ chmod -R +w .hg
1173
1173
1174 2. Test that failed phases movement are reported
1174 2. Test that failed phases movement are reported
1175
1175
1176 $ hg phase --force --draft 3
1176 $ hg phase --force --draft 3
1177 $ chmod -R -w .hg
1177 $ chmod -R -w .hg
1178 $ hg push ../Phi
1178 $ hg push ../Phi
1179 pushing to ../Phi
1179 pushing to ../Phi
1180 searching for changes
1180 searching for changes
1181 no changes found
1181 no changes found
1182 cannot lock source repo, skipping local public phase update
1182 cannot lock source repo, skipping local public phase update
1183 [1]
1183 [1]
1184 $ chmod -R +w .hg
1184 $ chmod -R +w .hg
1185 $ hgph Upsilon
1185 $ hgph Upsilon
1186
1186
1187 $ cd ..
1187 $ cd ..
1188
1188
1189 $ killdaemons.py
1189 $ killdaemons.py
1190
1190
1191 #endif
1191 #endif
@@ -1,80 +1,80 b''
1 #require killdaemons
1 #require killdaemons
2
2
3 $ hg init test
3 $ hg init test
4 $ cd test
4 $ cd test
5 $ echo a > a
5 $ echo a > a
6 $ hg ci -Ama
6 $ hg ci -Ama
7 adding a
7 adding a
8 $ cd ..
8 $ cd ..
9 $ hg clone test test2
9 $ hg clone test test2
10 updating to branch default
10 updating to branch default
11 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
11 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
12 $ cd test2
12 $ cd test2
13 $ echo a >> a
13 $ echo a >> a
14 $ hg ci -mb
14 $ hg ci -mb
15
15
16 Cloning with a password in the URL should not save the password in .hg/hgrc:
16 Cloning with a password in the URL should not save the password in .hg/hgrc:
17
17
18 $ hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
18 $ hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
19 $ cat hg.pid >> $DAEMON_PIDS
19 $ cat hg.pid >> $DAEMON_PIDS
20 $ hg clone http://foo:xyzzy@localhost:$HGPORT/ test3
20 $ hg clone http://foo:xyzzy@localhost:$HGPORT/ test3
21 requesting all changes
21 requesting all changes
22 adding changesets
22 adding changesets
23 adding manifests
23 adding manifests
24 adding file changes
24 adding file changes
25 added 2 changesets with 2 changes to 1 files
25 added 2 changesets with 2 changes to 1 files
26 updating to branch default
26 updating to branch default
27 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
27 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
28 $ cat test3/.hg/hgrc
28 $ cat test3/.hg/hgrc
29 # example repository config (see "hg help config" for more info)
29 # example repository config (see "hg help config" for more info)
30 [paths]
30 [paths]
31 default = http://foo@localhost:$HGPORT/
31 default = http://foo@localhost:$HGPORT/
32
32
33 # path aliases to other clones of this repo in URLs or filesystem paths
33 # path aliases to other clones of this repo in URLs or filesystem paths
34 # (see "hg help config.paths" for more info)
34 # (see "hg help config.paths" for more info)
35 #
35 #
36 # default-push = ssh://jdoe@example.net/hg/jdoes-fork
36 # default-push = ssh://jdoe@example.net/hg/jdoes-fork
37 # my-fork = ssh://jdoe@example.net/hg/jdoes-fork
37 # my-fork = ssh://jdoe@example.net/hg/jdoes-fork
38 # my-clone = /home/jdoe/jdoes-clone
38 # my-clone = /home/jdoe/jdoes-clone
39
39
40 [ui]
40 [ui]
41 # name and email (local to this repository, optional), e.g.
41 # name and email (local to this repository, optional), e.g.
42 # username = Jane Doe <jdoe@example.com>
42 # username = Jane Doe <jdoe@example.com>
43 $ killdaemons.py
43 $ killdaemons.py
44
44
45 expect error, cloning not allowed
45 expect error, cloning not allowed
46
46
47 $ echo '[web]' > .hg/hgrc
47 $ echo '[web]' > .hg/hgrc
48 $ echo 'allowpull = false' >> .hg/hgrc
48 $ echo 'allowpull = false' >> .hg/hgrc
49 $ hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
49 $ hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
50 $ cat hg.pid >> $DAEMON_PIDS
50 $ cat hg.pid >> $DAEMON_PIDS
51 $ hg clone http://localhost:$HGPORT/ test4 --config experimental.bundle2-exp=True
51 $ hg clone http://localhost:$HGPORT/ test4 --config experimental.bundle2-exp=True
52 requesting all changes
52 requesting all changes
53 abort: authorization failed
53 abort: authorization failed
54 [255]
54 [255]
55 $ hg clone http://localhost:$HGPORT/ test4 --config experimental.bundle2-exp=False
55 $ hg clone http://localhost:$HGPORT/ test4 --config devel.legacy.exchange=bundle1
56 abort: authorization failed
56 abort: authorization failed
57 [255]
57 [255]
58 $ killdaemons.py
58 $ killdaemons.py
59
59
60 serve errors
60 serve errors
61
61
62 $ cat errors.log
62 $ cat errors.log
63 $ req() {
63 $ req() {
64 > hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
64 > hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
65 > cat hg.pid >> $DAEMON_PIDS
65 > cat hg.pid >> $DAEMON_PIDS
66 > hg --cwd ../test pull http://localhost:$HGPORT/
66 > hg --cwd ../test pull http://localhost:$HGPORT/
67 > killdaemons.py hg.pid
67 > killdaemons.py hg.pid
68 > echo % serve errors
68 > echo % serve errors
69 > cat errors.log
69 > cat errors.log
70 > }
70 > }
71
71
72 expect error, pulling not allowed
72 expect error, pulling not allowed
73
73
74 $ req
74 $ req
75 pulling from http://localhost:$HGPORT/
75 pulling from http://localhost:$HGPORT/
76 searching for changes
76 searching for changes
77 abort: authorization failed
77 abort: authorization failed
78 % serve errors
78 % serve errors
79
79
80 $ cd ..
80 $ cd ..
@@ -1,50 +1,50 b''
1 $ hg init 1
1 $ hg init 1
2
2
3 $ echo '[ui]' >> 1/.hg/hgrc
3 $ echo '[ui]' >> 1/.hg/hgrc
4 $ echo 'timeout = 10' >> 1/.hg/hgrc
4 $ echo 'timeout = 10' >> 1/.hg/hgrc
5
5
6 $ echo foo > 1/foo
6 $ echo foo > 1/foo
7 $ hg --cwd 1 ci -A -m foo
7 $ hg --cwd 1 ci -A -m foo
8 adding foo
8 adding foo
9
9
10 $ hg clone 1 2
10 $ hg clone 1 2
11 updating to branch default
11 updating to branch default
12 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
12 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
13
13
14 $ hg clone 2 3
14 $ hg clone 2 3
15 updating to branch default
15 updating to branch default
16 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
16 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
17
17
18 $ cat <<EOF > $TESTTMP/debuglocks-pretxn-hook.sh
18 $ cat <<EOF > $TESTTMP/debuglocks-pretxn-hook.sh
19 > hg debuglocks
19 > hg debuglocks
20 > true
20 > true
21 > EOF
21 > EOF
22 $ echo '[hooks]' >> 2/.hg/hgrc
22 $ echo '[hooks]' >> 2/.hg/hgrc
23 $ echo "pretxnchangegroup.a = sh $TESTTMP/debuglocks-pretxn-hook.sh" >> 2/.hg/hgrc
23 $ echo "pretxnchangegroup.a = sh $TESTTMP/debuglocks-pretxn-hook.sh" >> 2/.hg/hgrc
24 $ echo 'changegroup.push = hg push -qf ../1' >> 2/.hg/hgrc
24 $ echo 'changegroup.push = hg push -qf ../1' >> 2/.hg/hgrc
25
25
26 $ echo bar >> 3/foo
26 $ echo bar >> 3/foo
27 $ hg --cwd 3 ci -m bar
27 $ hg --cwd 3 ci -m bar
28
28
29 $ hg --cwd 3 push ../2 --config experimental.bundle2-exp=False
29 $ hg --cwd 3 push ../2 --config devel.legacy.exchange=bundle1
30 pushing to ../2
30 pushing to ../2
31 searching for changes
31 searching for changes
32 adding changesets
32 adding changesets
33 adding manifests
33 adding manifests
34 adding file changes
34 adding file changes
35 added 1 changesets with 1 changes to 1 files
35 added 1 changesets with 1 changes to 1 files
36 lock: user *, process * (*s) (glob)
36 lock: user *, process * (*s) (glob)
37 wlock: free
37 wlock: free
38
38
39 $ hg --cwd 1 --config extensions.strip= strip tip -q
39 $ hg --cwd 1 --config extensions.strip= strip tip -q
40 $ hg --cwd 2 --config extensions.strip= strip tip -q
40 $ hg --cwd 2 --config extensions.strip= strip tip -q
41 $ hg --cwd 3 push ../2 --config experimental.bundle2-exp=True
41 $ hg --cwd 3 push ../2 --config experimental.bundle2-exp=True
42 pushing to ../2
42 pushing to ../2
43 searching for changes
43 searching for changes
44 adding changesets
44 adding changesets
45 adding manifests
45 adding manifests
46 adding file changes
46 adding file changes
47 added 1 changesets with 1 changes to 1 files
47 added 1 changesets with 1 changes to 1 files
48 lock: user *, process * (*s) (glob)
48 lock: user *, process * (*s) (glob)
49 wlock: user *, process * (*s) (glob)
49 wlock: user *, process * (*s) (glob)
50
50
@@ -1,1778 +1,1778 b''
1 Let commit recurse into subrepos by default to match pre-2.0 behavior:
1 Let commit recurse into subrepos by default to match pre-2.0 behavior:
2
2
3 $ echo "[ui]" >> $HGRCPATH
3 $ echo "[ui]" >> $HGRCPATH
4 $ echo "commitsubrepos = Yes" >> $HGRCPATH
4 $ echo "commitsubrepos = Yes" >> $HGRCPATH
5
5
6 $ hg init t
6 $ hg init t
7 $ cd t
7 $ cd t
8
8
9 first revision, no sub
9 first revision, no sub
10
10
11 $ echo a > a
11 $ echo a > a
12 $ hg ci -Am0
12 $ hg ci -Am0
13 adding a
13 adding a
14
14
15 add first sub
15 add first sub
16
16
17 $ echo s = s > .hgsub
17 $ echo s = s > .hgsub
18 $ hg add .hgsub
18 $ hg add .hgsub
19 $ hg init s
19 $ hg init s
20 $ echo a > s/a
20 $ echo a > s/a
21
21
22 Issue2232: committing a subrepo without .hgsub
22 Issue2232: committing a subrepo without .hgsub
23
23
24 $ hg ci -mbad s
24 $ hg ci -mbad s
25 abort: can't commit subrepos without .hgsub
25 abort: can't commit subrepos without .hgsub
26 [255]
26 [255]
27
27
28 $ hg -R s add s/a
28 $ hg -R s add s/a
29 $ hg files -S
29 $ hg files -S
30 .hgsub
30 .hgsub
31 a
31 a
32 s/a (glob)
32 s/a (glob)
33
33
34 $ hg -R s ci -Ams0
34 $ hg -R s ci -Ams0
35 $ hg sum
35 $ hg sum
36 parent: 0:f7b1eb17ad24 tip
36 parent: 0:f7b1eb17ad24 tip
37 0
37 0
38 branch: default
38 branch: default
39 commit: 1 added, 1 subrepos
39 commit: 1 added, 1 subrepos
40 update: (current)
40 update: (current)
41 phases: 1 draft
41 phases: 1 draft
42 $ hg ci -m1
42 $ hg ci -m1
43
43
44 test handling .hgsubstate "added" explicitly.
44 test handling .hgsubstate "added" explicitly.
45
45
46 $ hg parents --template '{node}\n{files}\n'
46 $ hg parents --template '{node}\n{files}\n'
47 7cf8cfea66e410e8e3336508dfeec07b3192de51
47 7cf8cfea66e410e8e3336508dfeec07b3192de51
48 .hgsub .hgsubstate
48 .hgsub .hgsubstate
49 $ hg rollback -q
49 $ hg rollback -q
50 $ hg add .hgsubstate
50 $ hg add .hgsubstate
51 $ hg ci -m1
51 $ hg ci -m1
52 $ hg parents --template '{node}\n{files}\n'
52 $ hg parents --template '{node}\n{files}\n'
53 7cf8cfea66e410e8e3336508dfeec07b3192de51
53 7cf8cfea66e410e8e3336508dfeec07b3192de51
54 .hgsub .hgsubstate
54 .hgsub .hgsubstate
55
55
56 Subrepopath which overlaps with filepath, does not change warnings in remove()
56 Subrepopath which overlaps with filepath, does not change warnings in remove()
57
57
58 $ mkdir snot
58 $ mkdir snot
59 $ touch snot/file
59 $ touch snot/file
60 $ hg remove -S snot/file
60 $ hg remove -S snot/file
61 not removing snot/file: file is untracked
61 not removing snot/file: file is untracked
62 [1]
62 [1]
63 $ hg cat snot/filenot
63 $ hg cat snot/filenot
64 snot/filenot: no such file in rev 7cf8cfea66e4
64 snot/filenot: no such file in rev 7cf8cfea66e4
65 [1]
65 [1]
66 $ rm -r snot
66 $ rm -r snot
67
67
68 Revert subrepo and test subrepo fileset keyword:
68 Revert subrepo and test subrepo fileset keyword:
69
69
70 $ echo b > s/a
70 $ echo b > s/a
71 $ hg revert --dry-run "set:subrepo('glob:s*')"
71 $ hg revert --dry-run "set:subrepo('glob:s*')"
72 reverting subrepo s
72 reverting subrepo s
73 reverting s/a (glob)
73 reverting s/a (glob)
74 $ cat s/a
74 $ cat s/a
75 b
75 b
76 $ hg revert "set:subrepo('glob:s*')"
76 $ hg revert "set:subrepo('glob:s*')"
77 reverting subrepo s
77 reverting subrepo s
78 reverting s/a (glob)
78 reverting s/a (glob)
79 $ cat s/a
79 $ cat s/a
80 a
80 a
81 $ rm s/a.orig
81 $ rm s/a.orig
82
82
83 Revert subrepo with no backup. The "reverting s/a" line is gone since
83 Revert subrepo with no backup. The "reverting s/a" line is gone since
84 we're really running 'hg update' in the subrepo:
84 we're really running 'hg update' in the subrepo:
85
85
86 $ echo b > s/a
86 $ echo b > s/a
87 $ hg revert --no-backup s
87 $ hg revert --no-backup s
88 reverting subrepo s
88 reverting subrepo s
89
89
90 Issue2022: update -C
90 Issue2022: update -C
91
91
92 $ echo b > s/a
92 $ echo b > s/a
93 $ hg sum
93 $ hg sum
94 parent: 1:7cf8cfea66e4 tip
94 parent: 1:7cf8cfea66e4 tip
95 1
95 1
96 branch: default
96 branch: default
97 commit: 1 subrepos
97 commit: 1 subrepos
98 update: (current)
98 update: (current)
99 phases: 2 draft
99 phases: 2 draft
100 $ hg co -C 1
100 $ hg co -C 1
101 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
101 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
102 $ hg sum
102 $ hg sum
103 parent: 1:7cf8cfea66e4 tip
103 parent: 1:7cf8cfea66e4 tip
104 1
104 1
105 branch: default
105 branch: default
106 commit: (clean)
106 commit: (clean)
107 update: (current)
107 update: (current)
108 phases: 2 draft
108 phases: 2 draft
109
109
110 commands that require a clean repo should respect subrepos
110 commands that require a clean repo should respect subrepos
111
111
112 $ echo b >> s/a
112 $ echo b >> s/a
113 $ hg backout tip
113 $ hg backout tip
114 abort: uncommitted changes in subrepository 's'
114 abort: uncommitted changes in subrepository 's'
115 [255]
115 [255]
116 $ hg revert -C -R s s/a
116 $ hg revert -C -R s s/a
117
117
118 add sub sub
118 add sub sub
119
119
120 $ echo ss = ss > s/.hgsub
120 $ echo ss = ss > s/.hgsub
121 $ hg init s/ss
121 $ hg init s/ss
122 $ echo a > s/ss/a
122 $ echo a > s/ss/a
123 $ hg -R s add s/.hgsub
123 $ hg -R s add s/.hgsub
124 $ hg -R s/ss add s/ss/a
124 $ hg -R s/ss add s/ss/a
125 $ hg sum
125 $ hg sum
126 parent: 1:7cf8cfea66e4 tip
126 parent: 1:7cf8cfea66e4 tip
127 1
127 1
128 branch: default
128 branch: default
129 commit: 1 subrepos
129 commit: 1 subrepos
130 update: (current)
130 update: (current)
131 phases: 2 draft
131 phases: 2 draft
132 $ hg ci -m2
132 $ hg ci -m2
133 committing subrepository s
133 committing subrepository s
134 committing subrepository s/ss (glob)
134 committing subrepository s/ss (glob)
135 $ hg sum
135 $ hg sum
136 parent: 2:df30734270ae tip
136 parent: 2:df30734270ae tip
137 2
137 2
138 branch: default
138 branch: default
139 commit: (clean)
139 commit: (clean)
140 update: (current)
140 update: (current)
141 phases: 3 draft
141 phases: 3 draft
142
142
143 test handling .hgsubstate "modified" explicitly.
143 test handling .hgsubstate "modified" explicitly.
144
144
145 $ hg parents --template '{node}\n{files}\n'
145 $ hg parents --template '{node}\n{files}\n'
146 df30734270ae757feb35e643b7018e818e78a9aa
146 df30734270ae757feb35e643b7018e818e78a9aa
147 .hgsubstate
147 .hgsubstate
148 $ hg rollback -q
148 $ hg rollback -q
149 $ hg status -A .hgsubstate
149 $ hg status -A .hgsubstate
150 M .hgsubstate
150 M .hgsubstate
151 $ hg ci -m2
151 $ hg ci -m2
152 $ hg parents --template '{node}\n{files}\n'
152 $ hg parents --template '{node}\n{files}\n'
153 df30734270ae757feb35e643b7018e818e78a9aa
153 df30734270ae757feb35e643b7018e818e78a9aa
154 .hgsubstate
154 .hgsubstate
155
155
156 bump sub rev (and check it is ignored by ui.commitsubrepos)
156 bump sub rev (and check it is ignored by ui.commitsubrepos)
157
157
158 $ echo b > s/a
158 $ echo b > s/a
159 $ hg -R s ci -ms1
159 $ hg -R s ci -ms1
160 $ hg --config ui.commitsubrepos=no ci -m3
160 $ hg --config ui.commitsubrepos=no ci -m3
161
161
162 leave sub dirty (and check ui.commitsubrepos=no aborts the commit)
162 leave sub dirty (and check ui.commitsubrepos=no aborts the commit)
163
163
164 $ echo c > s/a
164 $ echo c > s/a
165 $ hg --config ui.commitsubrepos=no ci -m4
165 $ hg --config ui.commitsubrepos=no ci -m4
166 abort: uncommitted changes in subrepository 's'
166 abort: uncommitted changes in subrepository 's'
167 (use --subrepos for recursive commit)
167 (use --subrepos for recursive commit)
168 [255]
168 [255]
169 $ hg id
169 $ hg id
170 f6affe3fbfaa+ tip
170 f6affe3fbfaa+ tip
171 $ hg -R s ci -mc
171 $ hg -R s ci -mc
172 $ hg id
172 $ hg id
173 f6affe3fbfaa+ tip
173 f6affe3fbfaa+ tip
174 $ echo d > s/a
174 $ echo d > s/a
175 $ hg ci -m4
175 $ hg ci -m4
176 committing subrepository s
176 committing subrepository s
177 $ hg tip -R s
177 $ hg tip -R s
178 changeset: 4:02dcf1d70411
178 changeset: 4:02dcf1d70411
179 tag: tip
179 tag: tip
180 user: test
180 user: test
181 date: Thu Jan 01 00:00:00 1970 +0000
181 date: Thu Jan 01 00:00:00 1970 +0000
182 summary: 4
182 summary: 4
183
183
184
184
185 check caching
185 check caching
186
186
187 $ hg co 0
187 $ hg co 0
188 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
188 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
189 $ hg debugsub
189 $ hg debugsub
190
190
191 restore
191 restore
192
192
193 $ hg co
193 $ hg co
194 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
194 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
195 $ hg debugsub
195 $ hg debugsub
196 path s
196 path s
197 source s
197 source s
198 revision 02dcf1d704118aee3ee306ccfa1910850d5b05ef
198 revision 02dcf1d704118aee3ee306ccfa1910850d5b05ef
199
199
200 new branch for merge tests
200 new branch for merge tests
201
201
202 $ hg co 1
202 $ hg co 1
203 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
203 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
204 $ echo t = t >> .hgsub
204 $ echo t = t >> .hgsub
205 $ hg init t
205 $ hg init t
206 $ echo t > t/t
206 $ echo t > t/t
207 $ hg -R t add t
207 $ hg -R t add t
208 adding t/t (glob)
208 adding t/t (glob)
209
209
210 5
210 5
211
211
212 $ hg ci -m5 # add sub
212 $ hg ci -m5 # add sub
213 committing subrepository t
213 committing subrepository t
214 created new head
214 created new head
215 $ echo t2 > t/t
215 $ echo t2 > t/t
216
216
217 6
217 6
218
218
219 $ hg st -R s
219 $ hg st -R s
220 $ hg ci -m6 # change sub
220 $ hg ci -m6 # change sub
221 committing subrepository t
221 committing subrepository t
222 $ hg debugsub
222 $ hg debugsub
223 path s
223 path s
224 source s
224 source s
225 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
225 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
226 path t
226 path t
227 source t
227 source t
228 revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad
228 revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad
229 $ echo t3 > t/t
229 $ echo t3 > t/t
230
230
231 7
231 7
232
232
233 $ hg ci -m7 # change sub again for conflict test
233 $ hg ci -m7 # change sub again for conflict test
234 committing subrepository t
234 committing subrepository t
235 $ hg rm .hgsub
235 $ hg rm .hgsub
236
236
237 8
237 8
238
238
239 $ hg ci -m8 # remove sub
239 $ hg ci -m8 # remove sub
240
240
241 test handling .hgsubstate "removed" explicitly.
241 test handling .hgsubstate "removed" explicitly.
242
242
243 $ hg parents --template '{node}\n{files}\n'
243 $ hg parents --template '{node}\n{files}\n'
244 96615c1dad2dc8e3796d7332c77ce69156f7b78e
244 96615c1dad2dc8e3796d7332c77ce69156f7b78e
245 .hgsub .hgsubstate
245 .hgsub .hgsubstate
246 $ hg rollback -q
246 $ hg rollback -q
247 $ hg remove .hgsubstate
247 $ hg remove .hgsubstate
248 $ hg ci -m8
248 $ hg ci -m8
249 $ hg parents --template '{node}\n{files}\n'
249 $ hg parents --template '{node}\n{files}\n'
250 96615c1dad2dc8e3796d7332c77ce69156f7b78e
250 96615c1dad2dc8e3796d7332c77ce69156f7b78e
251 .hgsub .hgsubstate
251 .hgsub .hgsubstate
252
252
253 merge tests
253 merge tests
254
254
255 $ hg co -C 3
255 $ hg co -C 3
256 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
256 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
257 $ hg merge 5 # test adding
257 $ hg merge 5 # test adding
258 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
258 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
259 (branch merge, don't forget to commit)
259 (branch merge, don't forget to commit)
260 $ hg debugsub
260 $ hg debugsub
261 path s
261 path s
262 source s
262 source s
263 revision fc627a69481fcbe5f1135069e8a3881c023e4cf5
263 revision fc627a69481fcbe5f1135069e8a3881c023e4cf5
264 path t
264 path t
265 source t
265 source t
266 revision 60ca1237c19474e7a3978b0dc1ca4e6f36d51382
266 revision 60ca1237c19474e7a3978b0dc1ca4e6f36d51382
267 $ hg ci -m9
267 $ hg ci -m9
268 created new head
268 created new head
269 $ hg merge 6 --debug # test change
269 $ hg merge 6 --debug # test change
270 searching for copies back to rev 2
270 searching for copies back to rev 2
271 resolving manifests
271 resolving manifests
272 branchmerge: True, force: False, partial: False
272 branchmerge: True, force: False, partial: False
273 ancestor: 1f14a2e2d3ec, local: f0d2028bf86d+, remote: 1831e14459c4
273 ancestor: 1f14a2e2d3ec, local: f0d2028bf86d+, remote: 1831e14459c4
274 starting 4 threads for background file closing (?)
274 starting 4 threads for background file closing (?)
275 .hgsubstate: versions differ -> m (premerge)
275 .hgsubstate: versions differ -> m (premerge)
276 subrepo merge f0d2028bf86d+ 1831e14459c4 1f14a2e2d3ec
276 subrepo merge f0d2028bf86d+ 1831e14459c4 1f14a2e2d3ec
277 subrepo t: other changed, get t:6747d179aa9a688023c4b0cad32e4c92bb7f34ad:hg
277 subrepo t: other changed, get t:6747d179aa9a688023c4b0cad32e4c92bb7f34ad:hg
278 getting subrepo t
278 getting subrepo t
279 resolving manifests
279 resolving manifests
280 branchmerge: False, force: False, partial: False
280 branchmerge: False, force: False, partial: False
281 ancestor: 60ca1237c194, local: 60ca1237c194+, remote: 6747d179aa9a
281 ancestor: 60ca1237c194, local: 60ca1237c194+, remote: 6747d179aa9a
282 t: remote is newer -> g
282 t: remote is newer -> g
283 getting t
283 getting t
284 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
284 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
285 (branch merge, don't forget to commit)
285 (branch merge, don't forget to commit)
286 $ hg debugsub
286 $ hg debugsub
287 path s
287 path s
288 source s
288 source s
289 revision fc627a69481fcbe5f1135069e8a3881c023e4cf5
289 revision fc627a69481fcbe5f1135069e8a3881c023e4cf5
290 path t
290 path t
291 source t
291 source t
292 revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad
292 revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad
293 $ echo conflict > t/t
293 $ echo conflict > t/t
294 $ hg ci -m10
294 $ hg ci -m10
295 committing subrepository t
295 committing subrepository t
296 $ HGMERGE=internal:merge hg merge --debug 7 # test conflict
296 $ HGMERGE=internal:merge hg merge --debug 7 # test conflict
297 searching for copies back to rev 2
297 searching for copies back to rev 2
298 resolving manifests
298 resolving manifests
299 branchmerge: True, force: False, partial: False
299 branchmerge: True, force: False, partial: False
300 ancestor: 1831e14459c4, local: e45c8b14af55+, remote: f94576341bcf
300 ancestor: 1831e14459c4, local: e45c8b14af55+, remote: f94576341bcf
301 starting 4 threads for background file closing (?)
301 starting 4 threads for background file closing (?)
302 .hgsubstate: versions differ -> m (premerge)
302 .hgsubstate: versions differ -> m (premerge)
303 subrepo merge e45c8b14af55+ f94576341bcf 1831e14459c4
303 subrepo merge e45c8b14af55+ f94576341bcf 1831e14459c4
304 subrepo t: both sides changed
304 subrepo t: both sides changed
305 subrepository t diverged (local revision: 20a0db6fbf6c, remote revision: 7af322bc1198)
305 subrepository t diverged (local revision: 20a0db6fbf6c, remote revision: 7af322bc1198)
306 (M)erge, keep (l)ocal or keep (r)emote? m
306 (M)erge, keep (l)ocal or keep (r)emote? m
307 merging subrepo t
307 merging subrepo t
308 searching for copies back to rev 2
308 searching for copies back to rev 2
309 resolving manifests
309 resolving manifests
310 branchmerge: True, force: False, partial: False
310 branchmerge: True, force: False, partial: False
311 ancestor: 6747d179aa9a, local: 20a0db6fbf6c+, remote: 7af322bc1198
311 ancestor: 6747d179aa9a, local: 20a0db6fbf6c+, remote: 7af322bc1198
312 preserving t for resolve of t
312 preserving t for resolve of t
313 starting 4 threads for background file closing (?)
313 starting 4 threads for background file closing (?)
314 t: versions differ -> m (premerge)
314 t: versions differ -> m (premerge)
315 picked tool ':merge' for t (binary False symlink False changedelete False)
315 picked tool ':merge' for t (binary False symlink False changedelete False)
316 merging t
316 merging t
317 my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a
317 my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a
318 t: versions differ -> m (merge)
318 t: versions differ -> m (merge)
319 picked tool ':merge' for t (binary False symlink False changedelete False)
319 picked tool ':merge' for t (binary False symlink False changedelete False)
320 my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a
320 my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a
321 warning: conflicts while merging t! (edit, then use 'hg resolve --mark')
321 warning: conflicts while merging t! (edit, then use 'hg resolve --mark')
322 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
322 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
323 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
323 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
324 subrepo t: merge with t:7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4:hg
324 subrepo t: merge with t:7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4:hg
325 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
325 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
326 (branch merge, don't forget to commit)
326 (branch merge, don't forget to commit)
327
327
328 should conflict
328 should conflict
329
329
330 $ cat t/t
330 $ cat t/t
331 <<<<<<< local: 20a0db6fbf6c - test: 10
331 <<<<<<< local: 20a0db6fbf6c - test: 10
332 conflict
332 conflict
333 =======
333 =======
334 t3
334 t3
335 >>>>>>> other: 7af322bc1198 - test: 7
335 >>>>>>> other: 7af322bc1198 - test: 7
336
336
337 11: remove subrepo t
337 11: remove subrepo t
338
338
339 $ hg co -C 5
339 $ hg co -C 5
340 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
340 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
341 $ hg revert -r 4 .hgsub # remove t
341 $ hg revert -r 4 .hgsub # remove t
342 $ hg ci -m11
342 $ hg ci -m11
343 created new head
343 created new head
344 $ hg debugsub
344 $ hg debugsub
345 path s
345 path s
346 source s
346 source s
347 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
347 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
348
348
349 local removed, remote changed, keep changed
349 local removed, remote changed, keep changed
350
350
351 $ hg merge 6
351 $ hg merge 6
352 remote changed subrepository t which local removed
352 remote changed subrepository t which local removed
353 use (c)hanged version or (d)elete? c
353 use (c)hanged version or (d)elete? c
354 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
354 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
355 (branch merge, don't forget to commit)
355 (branch merge, don't forget to commit)
356 BROKEN: should include subrepo t
356 BROKEN: should include subrepo t
357 $ hg debugsub
357 $ hg debugsub
358 path s
358 path s
359 source s
359 source s
360 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
360 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
361 $ cat .hgsubstate
361 $ cat .hgsubstate
362 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
362 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
363 6747d179aa9a688023c4b0cad32e4c92bb7f34ad t
363 6747d179aa9a688023c4b0cad32e4c92bb7f34ad t
364 $ hg ci -m 'local removed, remote changed, keep changed'
364 $ hg ci -m 'local removed, remote changed, keep changed'
365 BROKEN: should include subrepo t
365 BROKEN: should include subrepo t
366 $ hg debugsub
366 $ hg debugsub
367 path s
367 path s
368 source s
368 source s
369 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
369 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
370 BROKEN: should include subrepo t
370 BROKEN: should include subrepo t
371 $ cat .hgsubstate
371 $ cat .hgsubstate
372 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
372 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
373 $ cat t/t
373 $ cat t/t
374 t2
374 t2
375
375
376 local removed, remote changed, keep removed
376 local removed, remote changed, keep removed
377
377
378 $ hg co -C 11
378 $ hg co -C 11
379 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
379 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
380 $ hg merge --config ui.interactive=true 6 <<EOF
380 $ hg merge --config ui.interactive=true 6 <<EOF
381 > d
381 > d
382 > EOF
382 > EOF
383 remote changed subrepository t which local removed
383 remote changed subrepository t which local removed
384 use (c)hanged version or (d)elete? d
384 use (c)hanged version or (d)elete? d
385 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
385 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
386 (branch merge, don't forget to commit)
386 (branch merge, don't forget to commit)
387 $ hg debugsub
387 $ hg debugsub
388 path s
388 path s
389 source s
389 source s
390 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
390 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
391 $ cat .hgsubstate
391 $ cat .hgsubstate
392 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
392 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
393 $ hg ci -m 'local removed, remote changed, keep removed'
393 $ hg ci -m 'local removed, remote changed, keep removed'
394 created new head
394 created new head
395 $ hg debugsub
395 $ hg debugsub
396 path s
396 path s
397 source s
397 source s
398 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
398 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
399 $ cat .hgsubstate
399 $ cat .hgsubstate
400 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
400 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
401
401
402 local changed, remote removed, keep changed
402 local changed, remote removed, keep changed
403
403
404 $ hg co -C 6
404 $ hg co -C 6
405 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
405 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
406 $ hg merge 11
406 $ hg merge 11
407 local changed subrepository t which remote removed
407 local changed subrepository t which remote removed
408 use (c)hanged version or (d)elete? c
408 use (c)hanged version or (d)elete? c
409 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
409 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
410 (branch merge, don't forget to commit)
410 (branch merge, don't forget to commit)
411 BROKEN: should include subrepo t
411 BROKEN: should include subrepo t
412 $ hg debugsub
412 $ hg debugsub
413 path s
413 path s
414 source s
414 source s
415 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
415 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
416 BROKEN: should include subrepo t
416 BROKEN: should include subrepo t
417 $ cat .hgsubstate
417 $ cat .hgsubstate
418 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
418 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
419 $ hg ci -m 'local changed, remote removed, keep changed'
419 $ hg ci -m 'local changed, remote removed, keep changed'
420 created new head
420 created new head
421 BROKEN: should include subrepo t
421 BROKEN: should include subrepo t
422 $ hg debugsub
422 $ hg debugsub
423 path s
423 path s
424 source s
424 source s
425 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
425 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
426 BROKEN: should include subrepo t
426 BROKEN: should include subrepo t
427 $ cat .hgsubstate
427 $ cat .hgsubstate
428 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
428 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
429 $ cat t/t
429 $ cat t/t
430 t2
430 t2
431
431
432 local changed, remote removed, keep removed
432 local changed, remote removed, keep removed
433
433
434 $ hg co -C 6
434 $ hg co -C 6
435 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
435 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
436 $ hg merge --config ui.interactive=true 11 <<EOF
436 $ hg merge --config ui.interactive=true 11 <<EOF
437 > d
437 > d
438 > EOF
438 > EOF
439 local changed subrepository t which remote removed
439 local changed subrepository t which remote removed
440 use (c)hanged version or (d)elete? d
440 use (c)hanged version or (d)elete? d
441 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
441 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
442 (branch merge, don't forget to commit)
442 (branch merge, don't forget to commit)
443 $ hg debugsub
443 $ hg debugsub
444 path s
444 path s
445 source s
445 source s
446 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
446 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
447 $ cat .hgsubstate
447 $ cat .hgsubstate
448 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
448 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
449 $ hg ci -m 'local changed, remote removed, keep removed'
449 $ hg ci -m 'local changed, remote removed, keep removed'
450 created new head
450 created new head
451 $ hg debugsub
451 $ hg debugsub
452 path s
452 path s
453 source s
453 source s
454 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
454 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
455 $ cat .hgsubstate
455 $ cat .hgsubstate
456 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
456 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
457
457
458 clean up to avoid having to fix up the tests below
458 clean up to avoid having to fix up the tests below
459
459
460 $ hg co -C 10
460 $ hg co -C 10
461 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
461 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
462 $ cat >> $HGRCPATH <<EOF
462 $ cat >> $HGRCPATH <<EOF
463 > [extensions]
463 > [extensions]
464 > strip=
464 > strip=
465 > EOF
465 > EOF
466 $ hg strip -r 11:15
466 $ hg strip -r 11:15
467 saved backup bundle to $TESTTMP/t/.hg/strip-backup/*-backup.hg (glob)
467 saved backup bundle to $TESTTMP/t/.hg/strip-backup/*-backup.hg (glob)
468
468
469 clone
469 clone
470
470
471 $ cd ..
471 $ cd ..
472 $ hg clone t tc
472 $ hg clone t tc
473 updating to branch default
473 updating to branch default
474 cloning subrepo s from $TESTTMP/t/s
474 cloning subrepo s from $TESTTMP/t/s
475 cloning subrepo s/ss from $TESTTMP/t/s/ss (glob)
475 cloning subrepo s/ss from $TESTTMP/t/s/ss (glob)
476 cloning subrepo t from $TESTTMP/t/t
476 cloning subrepo t from $TESTTMP/t/t
477 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
477 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
478 $ cd tc
478 $ cd tc
479 $ hg debugsub
479 $ hg debugsub
480 path s
480 path s
481 source s
481 source s
482 revision fc627a69481fcbe5f1135069e8a3881c023e4cf5
482 revision fc627a69481fcbe5f1135069e8a3881c023e4cf5
483 path t
483 path t
484 source t
484 source t
485 revision 20a0db6fbf6c3d2836e6519a642ae929bfc67c0e
485 revision 20a0db6fbf6c3d2836e6519a642ae929bfc67c0e
486
486
487 push
487 push
488
488
489 $ echo bah > t/t
489 $ echo bah > t/t
490 $ hg ci -m11
490 $ hg ci -m11
491 committing subrepository t
491 committing subrepository t
492 $ hg push
492 $ hg push
493 pushing to $TESTTMP/t (glob)
493 pushing to $TESTTMP/t (glob)
494 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
494 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
495 no changes made to subrepo s since last push to $TESTTMP/t/s
495 no changes made to subrepo s since last push to $TESTTMP/t/s
496 pushing subrepo t to $TESTTMP/t/t
496 pushing subrepo t to $TESTTMP/t/t
497 searching for changes
497 searching for changes
498 adding changesets
498 adding changesets
499 adding manifests
499 adding manifests
500 adding file changes
500 adding file changes
501 added 1 changesets with 1 changes to 1 files
501 added 1 changesets with 1 changes to 1 files
502 searching for changes
502 searching for changes
503 adding changesets
503 adding changesets
504 adding manifests
504 adding manifests
505 adding file changes
505 adding file changes
506 added 1 changesets with 1 changes to 1 files
506 added 1 changesets with 1 changes to 1 files
507
507
508 push -f
508 push -f
509
509
510 $ echo bah > s/a
510 $ echo bah > s/a
511 $ hg ci -m12
511 $ hg ci -m12
512 committing subrepository s
512 committing subrepository s
513 $ hg push
513 $ hg push
514 pushing to $TESTTMP/t (glob)
514 pushing to $TESTTMP/t (glob)
515 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
515 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
516 pushing subrepo s to $TESTTMP/t/s
516 pushing subrepo s to $TESTTMP/t/s
517 searching for changes
517 searching for changes
518 abort: push creates new remote head 12a213df6fa9! (in subrepo s)
518 abort: push creates new remote head 12a213df6fa9! (in subrepo s)
519 (merge or see "hg help push" for details about pushing new heads)
519 (merge or see "hg help push" for details about pushing new heads)
520 [255]
520 [255]
521 $ hg push -f
521 $ hg push -f
522 pushing to $TESTTMP/t (glob)
522 pushing to $TESTTMP/t (glob)
523 pushing subrepo s/ss to $TESTTMP/t/s/ss (glob)
523 pushing subrepo s/ss to $TESTTMP/t/s/ss (glob)
524 searching for changes
524 searching for changes
525 no changes found
525 no changes found
526 pushing subrepo s to $TESTTMP/t/s
526 pushing subrepo s to $TESTTMP/t/s
527 searching for changes
527 searching for changes
528 adding changesets
528 adding changesets
529 adding manifests
529 adding manifests
530 adding file changes
530 adding file changes
531 added 1 changesets with 1 changes to 1 files (+1 heads)
531 added 1 changesets with 1 changes to 1 files (+1 heads)
532 pushing subrepo t to $TESTTMP/t/t
532 pushing subrepo t to $TESTTMP/t/t
533 searching for changes
533 searching for changes
534 no changes found
534 no changes found
535 searching for changes
535 searching for changes
536 adding changesets
536 adding changesets
537 adding manifests
537 adding manifests
538 adding file changes
538 adding file changes
539 added 1 changesets with 1 changes to 1 files
539 added 1 changesets with 1 changes to 1 files
540
540
541 check that unmodified subrepos are not pushed
541 check that unmodified subrepos are not pushed
542
542
543 $ hg clone . ../tcc
543 $ hg clone . ../tcc
544 updating to branch default
544 updating to branch default
545 cloning subrepo s from $TESTTMP/tc/s
545 cloning subrepo s from $TESTTMP/tc/s
546 cloning subrepo s/ss from $TESTTMP/tc/s/ss (glob)
546 cloning subrepo s/ss from $TESTTMP/tc/s/ss (glob)
547 cloning subrepo t from $TESTTMP/tc/t
547 cloning subrepo t from $TESTTMP/tc/t
548 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
548 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
549
549
550 the subrepos on the new clone have nothing to push to its source
550 the subrepos on the new clone have nothing to push to its source
551
551
552 $ hg push -R ../tcc .
552 $ hg push -R ../tcc .
553 pushing to .
553 pushing to .
554 no changes made to subrepo s/ss since last push to s/ss (glob)
554 no changes made to subrepo s/ss since last push to s/ss (glob)
555 no changes made to subrepo s since last push to s
555 no changes made to subrepo s since last push to s
556 no changes made to subrepo t since last push to t
556 no changes made to subrepo t since last push to t
557 searching for changes
557 searching for changes
558 no changes found
558 no changes found
559 [1]
559 [1]
560
560
561 the subrepos on the source do not have a clean store versus the clone target
561 the subrepos on the source do not have a clean store versus the clone target
562 because they were never explicitly pushed to the source
562 because they were never explicitly pushed to the source
563
563
564 $ hg push ../tcc
564 $ hg push ../tcc
565 pushing to ../tcc
565 pushing to ../tcc
566 pushing subrepo s/ss to ../tcc/s/ss (glob)
566 pushing subrepo s/ss to ../tcc/s/ss (glob)
567 searching for changes
567 searching for changes
568 no changes found
568 no changes found
569 pushing subrepo s to ../tcc/s
569 pushing subrepo s to ../tcc/s
570 searching for changes
570 searching for changes
571 no changes found
571 no changes found
572 pushing subrepo t to ../tcc/t
572 pushing subrepo t to ../tcc/t
573 searching for changes
573 searching for changes
574 no changes found
574 no changes found
575 searching for changes
575 searching for changes
576 no changes found
576 no changes found
577 [1]
577 [1]
578
578
579 after push their stores become clean
579 after push their stores become clean
580
580
581 $ hg push ../tcc
581 $ hg push ../tcc
582 pushing to ../tcc
582 pushing to ../tcc
583 no changes made to subrepo s/ss since last push to ../tcc/s/ss (glob)
583 no changes made to subrepo s/ss since last push to ../tcc/s/ss (glob)
584 no changes made to subrepo s since last push to ../tcc/s
584 no changes made to subrepo s since last push to ../tcc/s
585 no changes made to subrepo t since last push to ../tcc/t
585 no changes made to subrepo t since last push to ../tcc/t
586 searching for changes
586 searching for changes
587 no changes found
587 no changes found
588 [1]
588 [1]
589
589
590 updating a subrepo to a different revision or changing
590 updating a subrepo to a different revision or changing
591 its working directory does not make its store dirty
591 its working directory does not make its store dirty
592
592
593 $ hg -R s update '.^'
593 $ hg -R s update '.^'
594 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
594 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
595 $ hg push
595 $ hg push
596 pushing to $TESTTMP/t (glob)
596 pushing to $TESTTMP/t (glob)
597 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
597 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
598 no changes made to subrepo s since last push to $TESTTMP/t/s
598 no changes made to subrepo s since last push to $TESTTMP/t/s
599 no changes made to subrepo t since last push to $TESTTMP/t/t
599 no changes made to subrepo t since last push to $TESTTMP/t/t
600 searching for changes
600 searching for changes
601 no changes found
601 no changes found
602 [1]
602 [1]
603 $ echo foo >> s/a
603 $ echo foo >> s/a
604 $ hg push
604 $ hg push
605 pushing to $TESTTMP/t (glob)
605 pushing to $TESTTMP/t (glob)
606 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
606 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
607 no changes made to subrepo s since last push to $TESTTMP/t/s
607 no changes made to subrepo s since last push to $TESTTMP/t/s
608 no changes made to subrepo t since last push to $TESTTMP/t/t
608 no changes made to subrepo t since last push to $TESTTMP/t/t
609 searching for changes
609 searching for changes
610 no changes found
610 no changes found
611 [1]
611 [1]
612 $ hg -R s update -C tip
612 $ hg -R s update -C tip
613 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
613 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
614
614
615 committing into a subrepo makes its store (but not its parent's store) dirty
615 committing into a subrepo makes its store (but not its parent's store) dirty
616
616
617 $ echo foo >> s/ss/a
617 $ echo foo >> s/ss/a
618 $ hg -R s/ss commit -m 'test dirty store detection'
618 $ hg -R s/ss commit -m 'test dirty store detection'
619
619
620 $ hg out -S -r `hg log -r tip -T "{node|short}"`
620 $ hg out -S -r `hg log -r tip -T "{node|short}"`
621 comparing with $TESTTMP/t (glob)
621 comparing with $TESTTMP/t (glob)
622 searching for changes
622 searching for changes
623 no changes found
623 no changes found
624 comparing with $TESTTMP/t/s
624 comparing with $TESTTMP/t/s
625 searching for changes
625 searching for changes
626 no changes found
626 no changes found
627 comparing with $TESTTMP/t/s/ss
627 comparing with $TESTTMP/t/s/ss
628 searching for changes
628 searching for changes
629 changeset: 1:79ea5566a333
629 changeset: 1:79ea5566a333
630 tag: tip
630 tag: tip
631 user: test
631 user: test
632 date: Thu Jan 01 00:00:00 1970 +0000
632 date: Thu Jan 01 00:00:00 1970 +0000
633 summary: test dirty store detection
633 summary: test dirty store detection
634
634
635 comparing with $TESTTMP/t/t
635 comparing with $TESTTMP/t/t
636 searching for changes
636 searching for changes
637 no changes found
637 no changes found
638
638
639 $ hg push
639 $ hg push
640 pushing to $TESTTMP/t (glob)
640 pushing to $TESTTMP/t (glob)
641 pushing subrepo s/ss to $TESTTMP/t/s/ss (glob)
641 pushing subrepo s/ss to $TESTTMP/t/s/ss (glob)
642 searching for changes
642 searching for changes
643 adding changesets
643 adding changesets
644 adding manifests
644 adding manifests
645 adding file changes
645 adding file changes
646 added 1 changesets with 1 changes to 1 files
646 added 1 changesets with 1 changes to 1 files
647 no changes made to subrepo s since last push to $TESTTMP/t/s
647 no changes made to subrepo s since last push to $TESTTMP/t/s
648 no changes made to subrepo t since last push to $TESTTMP/t/t
648 no changes made to subrepo t since last push to $TESTTMP/t/t
649 searching for changes
649 searching for changes
650 no changes found
650 no changes found
651 [1]
651 [1]
652
652
653 a subrepo store may be clean versus one repo but not versus another
653 a subrepo store may be clean versus one repo but not versus another
654
654
655 $ hg push
655 $ hg push
656 pushing to $TESTTMP/t (glob)
656 pushing to $TESTTMP/t (glob)
657 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
657 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
658 no changes made to subrepo s since last push to $TESTTMP/t/s
658 no changes made to subrepo s since last push to $TESTTMP/t/s
659 no changes made to subrepo t since last push to $TESTTMP/t/t
659 no changes made to subrepo t since last push to $TESTTMP/t/t
660 searching for changes
660 searching for changes
661 no changes found
661 no changes found
662 [1]
662 [1]
663 $ hg push ../tcc
663 $ hg push ../tcc
664 pushing to ../tcc
664 pushing to ../tcc
665 pushing subrepo s/ss to ../tcc/s/ss (glob)
665 pushing subrepo s/ss to ../tcc/s/ss (glob)
666 searching for changes
666 searching for changes
667 adding changesets
667 adding changesets
668 adding manifests
668 adding manifests
669 adding file changes
669 adding file changes
670 added 1 changesets with 1 changes to 1 files
670 added 1 changesets with 1 changes to 1 files
671 no changes made to subrepo s since last push to ../tcc/s
671 no changes made to subrepo s since last push to ../tcc/s
672 no changes made to subrepo t since last push to ../tcc/t
672 no changes made to subrepo t since last push to ../tcc/t
673 searching for changes
673 searching for changes
674 no changes found
674 no changes found
675 [1]
675 [1]
676
676
677 update
677 update
678
678
679 $ cd ../t
679 $ cd ../t
680 $ hg up -C # discard our earlier merge
680 $ hg up -C # discard our earlier merge
681 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
681 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
682 2 other heads for branch "default"
682 2 other heads for branch "default"
683 $ echo blah > t/t
683 $ echo blah > t/t
684 $ hg ci -m13
684 $ hg ci -m13
685 committing subrepository t
685 committing subrepository t
686
686
687 backout calls revert internally with minimal opts, which should not raise
687 backout calls revert internally with minimal opts, which should not raise
688 KeyError
688 KeyError
689
689
690 $ hg backout ".^" --no-commit
690 $ hg backout ".^" --no-commit
691 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
691 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
692 changeset c373c8102e68 backed out, don't forget to commit.
692 changeset c373c8102e68 backed out, don't forget to commit.
693
693
694 $ hg up -C # discard changes
694 $ hg up -C # discard changes
695 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
695 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
696 2 other heads for branch "default"
696 2 other heads for branch "default"
697
697
698 pull
698 pull
699
699
700 $ cd ../tc
700 $ cd ../tc
701 $ hg pull
701 $ hg pull
702 pulling from $TESTTMP/t (glob)
702 pulling from $TESTTMP/t (glob)
703 searching for changes
703 searching for changes
704 adding changesets
704 adding changesets
705 adding manifests
705 adding manifests
706 adding file changes
706 adding file changes
707 added 1 changesets with 1 changes to 1 files
707 added 1 changesets with 1 changes to 1 files
708 (run 'hg update' to get a working copy)
708 (run 'hg update' to get a working copy)
709
709
710 should pull t
710 should pull t
711
711
712 $ hg incoming -S -r `hg log -r tip -T "{node|short}"`
712 $ hg incoming -S -r `hg log -r tip -T "{node|short}"`
713 comparing with $TESTTMP/t (glob)
713 comparing with $TESTTMP/t (glob)
714 no changes found
714 no changes found
715 comparing with $TESTTMP/t/s
715 comparing with $TESTTMP/t/s
716 searching for changes
716 searching for changes
717 no changes found
717 no changes found
718 comparing with $TESTTMP/t/s/ss
718 comparing with $TESTTMP/t/s/ss
719 searching for changes
719 searching for changes
720 no changes found
720 no changes found
721 comparing with $TESTTMP/t/t
721 comparing with $TESTTMP/t/t
722 searching for changes
722 searching for changes
723 changeset: 5:52c0adc0515a
723 changeset: 5:52c0adc0515a
724 tag: tip
724 tag: tip
725 user: test
725 user: test
726 date: Thu Jan 01 00:00:00 1970 +0000
726 date: Thu Jan 01 00:00:00 1970 +0000
727 summary: 13
727 summary: 13
728
728
729
729
730 $ hg up
730 $ hg up
731 pulling subrepo t from $TESTTMP/t/t
731 pulling subrepo t from $TESTTMP/t/t
732 searching for changes
732 searching for changes
733 adding changesets
733 adding changesets
734 adding manifests
734 adding manifests
735 adding file changes
735 adding file changes
736 added 1 changesets with 1 changes to 1 files
736 added 1 changesets with 1 changes to 1 files
737 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
737 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
738 2 other heads for branch "default"
738 2 other heads for branch "default"
739 $ cat t/t
739 $ cat t/t
740 blah
740 blah
741
741
742 bogus subrepo path aborts
742 bogus subrepo path aborts
743
743
744 $ echo 'bogus=[boguspath' >> .hgsub
744 $ echo 'bogus=[boguspath' >> .hgsub
745 $ hg ci -m 'bogus subrepo path'
745 $ hg ci -m 'bogus subrepo path'
746 abort: missing ] in subrepo source
746 abort: missing ] in subrepo source
747 [255]
747 [255]
748
748
749 Issue1986: merge aborts when trying to merge a subrepo that
749 Issue1986: merge aborts when trying to merge a subrepo that
750 shouldn't need merging
750 shouldn't need merging
751
751
752 # subrepo layout
752 # subrepo layout
753 #
753 #
754 # o 5 br
754 # o 5 br
755 # /|
755 # /|
756 # o | 4 default
756 # o | 4 default
757 # | |
757 # | |
758 # | o 3 br
758 # | o 3 br
759 # |/|
759 # |/|
760 # o | 2 default
760 # o | 2 default
761 # | |
761 # | |
762 # | o 1 br
762 # | o 1 br
763 # |/
763 # |/
764 # o 0 default
764 # o 0 default
765
765
766 $ cd ..
766 $ cd ..
767 $ rm -rf sub
767 $ rm -rf sub
768 $ hg init main
768 $ hg init main
769 $ cd main
769 $ cd main
770 $ hg init s
770 $ hg init s
771 $ cd s
771 $ cd s
772 $ echo a > a
772 $ echo a > a
773 $ hg ci -Am1
773 $ hg ci -Am1
774 adding a
774 adding a
775 $ hg branch br
775 $ hg branch br
776 marked working directory as branch br
776 marked working directory as branch br
777 (branches are permanent and global, did you want a bookmark?)
777 (branches are permanent and global, did you want a bookmark?)
778 $ echo a >> a
778 $ echo a >> a
779 $ hg ci -m1
779 $ hg ci -m1
780 $ hg up default
780 $ hg up default
781 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
781 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
782 $ echo b > b
782 $ echo b > b
783 $ hg ci -Am1
783 $ hg ci -Am1
784 adding b
784 adding b
785 $ hg up br
785 $ hg up br
786 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
786 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
787 $ hg merge tip
787 $ hg merge tip
788 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
788 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
789 (branch merge, don't forget to commit)
789 (branch merge, don't forget to commit)
790 $ hg ci -m1
790 $ hg ci -m1
791 $ hg up 2
791 $ hg up 2
792 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
792 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
793 $ echo c > c
793 $ echo c > c
794 $ hg ci -Am1
794 $ hg ci -Am1
795 adding c
795 adding c
796 $ hg up 3
796 $ hg up 3
797 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
797 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
798 $ hg merge 4
798 $ hg merge 4
799 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
799 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
800 (branch merge, don't forget to commit)
800 (branch merge, don't forget to commit)
801 $ hg ci -m1
801 $ hg ci -m1
802
802
803 # main repo layout:
803 # main repo layout:
804 #
804 #
805 # * <-- try to merge default into br again
805 # * <-- try to merge default into br again
806 # .`|
806 # .`|
807 # . o 5 br --> substate = 5
807 # . o 5 br --> substate = 5
808 # . |
808 # . |
809 # o | 4 default --> substate = 4
809 # o | 4 default --> substate = 4
810 # | |
810 # | |
811 # | o 3 br --> substate = 2
811 # | o 3 br --> substate = 2
812 # |/|
812 # |/|
813 # o | 2 default --> substate = 2
813 # o | 2 default --> substate = 2
814 # | |
814 # | |
815 # | o 1 br --> substate = 3
815 # | o 1 br --> substate = 3
816 # |/
816 # |/
817 # o 0 default --> substate = 2
817 # o 0 default --> substate = 2
818
818
819 $ cd ..
819 $ cd ..
820 $ echo 's = s' > .hgsub
820 $ echo 's = s' > .hgsub
821 $ hg -R s up 2
821 $ hg -R s up 2
822 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
822 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
823 $ hg ci -Am1
823 $ hg ci -Am1
824 adding .hgsub
824 adding .hgsub
825 $ hg branch br
825 $ hg branch br
826 marked working directory as branch br
826 marked working directory as branch br
827 (branches are permanent and global, did you want a bookmark?)
827 (branches are permanent and global, did you want a bookmark?)
828 $ echo b > b
828 $ echo b > b
829 $ hg -R s up 3
829 $ hg -R s up 3
830 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
830 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
831 $ hg ci -Am1
831 $ hg ci -Am1
832 adding b
832 adding b
833 $ hg up default
833 $ hg up default
834 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
834 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
835 $ echo c > c
835 $ echo c > c
836 $ hg ci -Am1
836 $ hg ci -Am1
837 adding c
837 adding c
838 $ hg up 1
838 $ hg up 1
839 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
839 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
840 $ hg merge 2
840 $ hg merge 2
841 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
841 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
842 (branch merge, don't forget to commit)
842 (branch merge, don't forget to commit)
843 $ hg ci -m1
843 $ hg ci -m1
844 $ hg up 2
844 $ hg up 2
845 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
845 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
846 $ hg -R s up 4
846 $ hg -R s up 4
847 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
847 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
848 $ echo d > d
848 $ echo d > d
849 $ hg ci -Am1
849 $ hg ci -Am1
850 adding d
850 adding d
851 $ hg up 3
851 $ hg up 3
852 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
852 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
853 $ hg -R s up 5
853 $ hg -R s up 5
854 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
854 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
855 $ echo e > e
855 $ echo e > e
856 $ hg ci -Am1
856 $ hg ci -Am1
857 adding e
857 adding e
858
858
859 $ hg up 5
859 $ hg up 5
860 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
860 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
861 $ hg merge 4 # try to merge default into br again
861 $ hg merge 4 # try to merge default into br again
862 subrepository s diverged (local revision: f8f13b33206e, remote revision: a3f9062a4f88)
862 subrepository s diverged (local revision: f8f13b33206e, remote revision: a3f9062a4f88)
863 (M)erge, keep (l)ocal or keep (r)emote? m
863 (M)erge, keep (l)ocal or keep (r)emote? m
864 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
864 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
865 (branch merge, don't forget to commit)
865 (branch merge, don't forget to commit)
866 $ cd ..
866 $ cd ..
867
867
868 test subrepo delete from .hgsubstate
868 test subrepo delete from .hgsubstate
869
869
870 $ hg init testdelete
870 $ hg init testdelete
871 $ mkdir testdelete/nested testdelete/nested2
871 $ mkdir testdelete/nested testdelete/nested2
872 $ hg init testdelete/nested
872 $ hg init testdelete/nested
873 $ hg init testdelete/nested2
873 $ hg init testdelete/nested2
874 $ echo test > testdelete/nested/foo
874 $ echo test > testdelete/nested/foo
875 $ echo test > testdelete/nested2/foo
875 $ echo test > testdelete/nested2/foo
876 $ hg -R testdelete/nested add
876 $ hg -R testdelete/nested add
877 adding testdelete/nested/foo (glob)
877 adding testdelete/nested/foo (glob)
878 $ hg -R testdelete/nested2 add
878 $ hg -R testdelete/nested2 add
879 adding testdelete/nested2/foo (glob)
879 adding testdelete/nested2/foo (glob)
880 $ hg -R testdelete/nested ci -m test
880 $ hg -R testdelete/nested ci -m test
881 $ hg -R testdelete/nested2 ci -m test
881 $ hg -R testdelete/nested2 ci -m test
882 $ echo nested = nested > testdelete/.hgsub
882 $ echo nested = nested > testdelete/.hgsub
883 $ echo nested2 = nested2 >> testdelete/.hgsub
883 $ echo nested2 = nested2 >> testdelete/.hgsub
884 $ hg -R testdelete add
884 $ hg -R testdelete add
885 adding testdelete/.hgsub (glob)
885 adding testdelete/.hgsub (glob)
886 $ hg -R testdelete ci -m "nested 1 & 2 added"
886 $ hg -R testdelete ci -m "nested 1 & 2 added"
887 $ echo nested = nested > testdelete/.hgsub
887 $ echo nested = nested > testdelete/.hgsub
888 $ hg -R testdelete ci -m "nested 2 deleted"
888 $ hg -R testdelete ci -m "nested 2 deleted"
889 $ cat testdelete/.hgsubstate
889 $ cat testdelete/.hgsubstate
890 bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested
890 bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested
891 $ hg -R testdelete remove testdelete/.hgsub
891 $ hg -R testdelete remove testdelete/.hgsub
892 $ hg -R testdelete ci -m ".hgsub deleted"
892 $ hg -R testdelete ci -m ".hgsub deleted"
893 $ cat testdelete/.hgsubstate
893 $ cat testdelete/.hgsubstate
894 bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested
894 bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested
895
895
896 test repository cloning
896 test repository cloning
897
897
898 $ mkdir mercurial mercurial2
898 $ mkdir mercurial mercurial2
899 $ hg init nested_absolute
899 $ hg init nested_absolute
900 $ echo test > nested_absolute/foo
900 $ echo test > nested_absolute/foo
901 $ hg -R nested_absolute add
901 $ hg -R nested_absolute add
902 adding nested_absolute/foo (glob)
902 adding nested_absolute/foo (glob)
903 $ hg -R nested_absolute ci -mtest
903 $ hg -R nested_absolute ci -mtest
904 $ cd mercurial
904 $ cd mercurial
905 $ hg init nested_relative
905 $ hg init nested_relative
906 $ echo test2 > nested_relative/foo2
906 $ echo test2 > nested_relative/foo2
907 $ hg -R nested_relative add
907 $ hg -R nested_relative add
908 adding nested_relative/foo2 (glob)
908 adding nested_relative/foo2 (glob)
909 $ hg -R nested_relative ci -mtest2
909 $ hg -R nested_relative ci -mtest2
910 $ hg init main
910 $ hg init main
911 $ echo "nested_relative = ../nested_relative" > main/.hgsub
911 $ echo "nested_relative = ../nested_relative" > main/.hgsub
912 $ echo "nested_absolute = `pwd`/nested_absolute" >> main/.hgsub
912 $ echo "nested_absolute = `pwd`/nested_absolute" >> main/.hgsub
913 $ hg -R main add
913 $ hg -R main add
914 adding main/.hgsub (glob)
914 adding main/.hgsub (glob)
915 $ hg -R main ci -m "add subrepos"
915 $ hg -R main ci -m "add subrepos"
916 $ cd ..
916 $ cd ..
917 $ hg clone mercurial/main mercurial2/main
917 $ hg clone mercurial/main mercurial2/main
918 updating to branch default
918 updating to branch default
919 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
919 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
920 $ cat mercurial2/main/nested_absolute/.hg/hgrc \
920 $ cat mercurial2/main/nested_absolute/.hg/hgrc \
921 > mercurial2/main/nested_relative/.hg/hgrc
921 > mercurial2/main/nested_relative/.hg/hgrc
922 [paths]
922 [paths]
923 default = $TESTTMP/mercurial/nested_absolute
923 default = $TESTTMP/mercurial/nested_absolute
924 [paths]
924 [paths]
925 default = $TESTTMP/mercurial/nested_relative
925 default = $TESTTMP/mercurial/nested_relative
926 $ rm -rf mercurial mercurial2
926 $ rm -rf mercurial mercurial2
927
927
928 Issue1977: multirepo push should fail if subrepo push fails
928 Issue1977: multirepo push should fail if subrepo push fails
929
929
930 $ hg init repo
930 $ hg init repo
931 $ hg init repo/s
931 $ hg init repo/s
932 $ echo a > repo/s/a
932 $ echo a > repo/s/a
933 $ hg -R repo/s ci -Am0
933 $ hg -R repo/s ci -Am0
934 adding a
934 adding a
935 $ echo s = s > repo/.hgsub
935 $ echo s = s > repo/.hgsub
936 $ hg -R repo ci -Am1
936 $ hg -R repo ci -Am1
937 adding .hgsub
937 adding .hgsub
938 $ hg clone repo repo2
938 $ hg clone repo repo2
939 updating to branch default
939 updating to branch default
940 cloning subrepo s from $TESTTMP/repo/s
940 cloning subrepo s from $TESTTMP/repo/s
941 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
941 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
942 $ hg -q -R repo2 pull -u
942 $ hg -q -R repo2 pull -u
943 $ echo 1 > repo2/s/a
943 $ echo 1 > repo2/s/a
944 $ hg -R repo2/s ci -m2
944 $ hg -R repo2/s ci -m2
945 $ hg -q -R repo2/s push
945 $ hg -q -R repo2/s push
946 $ hg -R repo2/s up -C 0
946 $ hg -R repo2/s up -C 0
947 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
947 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
948 $ echo 2 > repo2/s/b
948 $ echo 2 > repo2/s/b
949 $ hg -R repo2/s ci -m3 -A
949 $ hg -R repo2/s ci -m3 -A
950 adding b
950 adding b
951 created new head
951 created new head
952 $ hg -R repo2 ci -m3
952 $ hg -R repo2 ci -m3
953 $ hg -q -R repo2 push
953 $ hg -q -R repo2 push
954 abort: push creates new remote head cc505f09a8b2! (in subrepo s)
954 abort: push creates new remote head cc505f09a8b2! (in subrepo s)
955 (merge or see "hg help push" for details about pushing new heads)
955 (merge or see "hg help push" for details about pushing new heads)
956 [255]
956 [255]
957 $ hg -R repo update
957 $ hg -R repo update
958 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
958 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
959
959
960 test if untracked file is not overwritten
960 test if untracked file is not overwritten
961
961
962 (this also tests that updated .hgsubstate is treated as "modified",
962 (this also tests that updated .hgsubstate is treated as "modified",
963 when 'merge.update()' is aborted before 'merge.recordupdates()', even
963 when 'merge.update()' is aborted before 'merge.recordupdates()', even
964 if none of mode, size and timestamp of it isn't changed on the
964 if none of mode, size and timestamp of it isn't changed on the
965 filesystem (see also issue4583))
965 filesystem (see also issue4583))
966
966
967 $ echo issue3276_ok > repo/s/b
967 $ echo issue3276_ok > repo/s/b
968 $ hg -R repo2 push -f -q
968 $ hg -R repo2 push -f -q
969 $ touch -t 200001010000 repo/.hgsubstate
969 $ touch -t 200001010000 repo/.hgsubstate
970
970
971 $ cat >> repo/.hg/hgrc <<EOF
971 $ cat >> repo/.hg/hgrc <<EOF
972 > [fakedirstatewritetime]
972 > [fakedirstatewritetime]
973 > # emulate invoking dirstate.write() via repo.status()
973 > # emulate invoking dirstate.write() via repo.status()
974 > # at 2000-01-01 00:00
974 > # at 2000-01-01 00:00
975 > fakenow = 200001010000
975 > fakenow = 200001010000
976 >
976 >
977 > [extensions]
977 > [extensions]
978 > fakedirstatewritetime = $TESTDIR/fakedirstatewritetime.py
978 > fakedirstatewritetime = $TESTDIR/fakedirstatewritetime.py
979 > EOF
979 > EOF
980 $ hg -R repo update
980 $ hg -R repo update
981 b: untracked file differs
981 b: untracked file differs
982 abort: untracked files in working directory differ from files in requested revision (in subrepo s)
982 abort: untracked files in working directory differ from files in requested revision (in subrepo s)
983 [255]
983 [255]
984 $ cat >> repo/.hg/hgrc <<EOF
984 $ cat >> repo/.hg/hgrc <<EOF
985 > [extensions]
985 > [extensions]
986 > fakedirstatewritetime = !
986 > fakedirstatewritetime = !
987 > EOF
987 > EOF
988
988
989 $ cat repo/s/b
989 $ cat repo/s/b
990 issue3276_ok
990 issue3276_ok
991 $ rm repo/s/b
991 $ rm repo/s/b
992 $ touch -t 200001010000 repo/.hgsubstate
992 $ touch -t 200001010000 repo/.hgsubstate
993 $ hg -R repo revert --all
993 $ hg -R repo revert --all
994 reverting repo/.hgsubstate (glob)
994 reverting repo/.hgsubstate (glob)
995 reverting subrepo s
995 reverting subrepo s
996 $ hg -R repo update
996 $ hg -R repo update
997 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
997 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
998 $ cat repo/s/b
998 $ cat repo/s/b
999 2
999 2
1000 $ rm -rf repo2 repo
1000 $ rm -rf repo2 repo
1001
1001
1002
1002
1003 Issue1852 subrepos with relative paths always push/pull relative to default
1003 Issue1852 subrepos with relative paths always push/pull relative to default
1004
1004
1005 Prepare a repo with subrepo
1005 Prepare a repo with subrepo
1006
1006
1007 $ hg init issue1852a
1007 $ hg init issue1852a
1008 $ cd issue1852a
1008 $ cd issue1852a
1009 $ hg init sub/repo
1009 $ hg init sub/repo
1010 $ echo test > sub/repo/foo
1010 $ echo test > sub/repo/foo
1011 $ hg -R sub/repo add sub/repo/foo
1011 $ hg -R sub/repo add sub/repo/foo
1012 $ echo sub/repo = sub/repo > .hgsub
1012 $ echo sub/repo = sub/repo > .hgsub
1013 $ hg add .hgsub
1013 $ hg add .hgsub
1014 $ hg ci -mtest
1014 $ hg ci -mtest
1015 committing subrepository sub/repo (glob)
1015 committing subrepository sub/repo (glob)
1016 $ echo test >> sub/repo/foo
1016 $ echo test >> sub/repo/foo
1017 $ hg ci -mtest
1017 $ hg ci -mtest
1018 committing subrepository sub/repo (glob)
1018 committing subrepository sub/repo (glob)
1019 $ hg cat sub/repo/foo
1019 $ hg cat sub/repo/foo
1020 test
1020 test
1021 test
1021 test
1022 $ mkdir -p tmp/sub/repo
1022 $ mkdir -p tmp/sub/repo
1023 $ hg cat -r 0 --output tmp/%p_p sub/repo/foo
1023 $ hg cat -r 0 --output tmp/%p_p sub/repo/foo
1024 $ cat tmp/sub/repo/foo_p
1024 $ cat tmp/sub/repo/foo_p
1025 test
1025 test
1026 $ mv sub/repo sub_
1026 $ mv sub/repo sub_
1027 $ hg cat sub/repo/baz
1027 $ hg cat sub/repo/baz
1028 skipping missing subrepository: sub/repo
1028 skipping missing subrepository: sub/repo
1029 [1]
1029 [1]
1030 $ rm -rf sub/repo
1030 $ rm -rf sub/repo
1031 $ mv sub_ sub/repo
1031 $ mv sub_ sub/repo
1032 $ cd ..
1032 $ cd ..
1033
1033
1034 Create repo without default path, pull top repo, and see what happens on update
1034 Create repo without default path, pull top repo, and see what happens on update
1035
1035
1036 $ hg init issue1852b
1036 $ hg init issue1852b
1037 $ hg -R issue1852b pull issue1852a
1037 $ hg -R issue1852b pull issue1852a
1038 pulling from issue1852a
1038 pulling from issue1852a
1039 requesting all changes
1039 requesting all changes
1040 adding changesets
1040 adding changesets
1041 adding manifests
1041 adding manifests
1042 adding file changes
1042 adding file changes
1043 added 2 changesets with 3 changes to 2 files
1043 added 2 changesets with 3 changes to 2 files
1044 (run 'hg update' to get a working copy)
1044 (run 'hg update' to get a working copy)
1045 $ hg -R issue1852b update
1045 $ hg -R issue1852b update
1046 abort: default path for subrepository not found (in subrepo sub/repo) (glob)
1046 abort: default path for subrepository not found (in subrepo sub/repo) (glob)
1047 [255]
1047 [255]
1048
1048
1049 Ensure a full traceback, not just the SubrepoAbort part
1049 Ensure a full traceback, not just the SubrepoAbort part
1050
1050
1051 $ hg -R issue1852b update --traceback 2>&1 | grep 'raise error\.Abort'
1051 $ hg -R issue1852b update --traceback 2>&1 | grep 'raise error\.Abort'
1052 raise error.Abort(_("default path for subrepository not found"))
1052 raise error.Abort(_("default path for subrepository not found"))
1053
1053
1054 Pull -u now doesn't help
1054 Pull -u now doesn't help
1055
1055
1056 $ hg -R issue1852b pull -u issue1852a
1056 $ hg -R issue1852b pull -u issue1852a
1057 pulling from issue1852a
1057 pulling from issue1852a
1058 searching for changes
1058 searching for changes
1059 no changes found
1059 no changes found
1060
1060
1061 Try the same, but with pull -u
1061 Try the same, but with pull -u
1062
1062
1063 $ hg init issue1852c
1063 $ hg init issue1852c
1064 $ hg -R issue1852c pull -r0 -u issue1852a
1064 $ hg -R issue1852c pull -r0 -u issue1852a
1065 pulling from issue1852a
1065 pulling from issue1852a
1066 adding changesets
1066 adding changesets
1067 adding manifests
1067 adding manifests
1068 adding file changes
1068 adding file changes
1069 added 1 changesets with 2 changes to 2 files
1069 added 1 changesets with 2 changes to 2 files
1070 cloning subrepo sub/repo from issue1852a/sub/repo (glob)
1070 cloning subrepo sub/repo from issue1852a/sub/repo (glob)
1071 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1071 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1072
1072
1073 Try to push from the other side
1073 Try to push from the other side
1074
1074
1075 $ hg -R issue1852a push `pwd`/issue1852c
1075 $ hg -R issue1852a push `pwd`/issue1852c
1076 pushing to $TESTTMP/issue1852c (glob)
1076 pushing to $TESTTMP/issue1852c (glob)
1077 pushing subrepo sub/repo to $TESTTMP/issue1852c/sub/repo (glob)
1077 pushing subrepo sub/repo to $TESTTMP/issue1852c/sub/repo (glob)
1078 searching for changes
1078 searching for changes
1079 no changes found
1079 no changes found
1080 searching for changes
1080 searching for changes
1081 adding changesets
1081 adding changesets
1082 adding manifests
1082 adding manifests
1083 adding file changes
1083 adding file changes
1084 added 1 changesets with 1 changes to 1 files
1084 added 1 changesets with 1 changes to 1 files
1085
1085
1086 Incoming and outgoing should not use the default path:
1086 Incoming and outgoing should not use the default path:
1087
1087
1088 $ hg clone -q issue1852a issue1852d
1088 $ hg clone -q issue1852a issue1852d
1089 $ hg -R issue1852d outgoing --subrepos issue1852c
1089 $ hg -R issue1852d outgoing --subrepos issue1852c
1090 comparing with issue1852c
1090 comparing with issue1852c
1091 searching for changes
1091 searching for changes
1092 no changes found
1092 no changes found
1093 comparing with issue1852c/sub/repo
1093 comparing with issue1852c/sub/repo
1094 searching for changes
1094 searching for changes
1095 no changes found
1095 no changes found
1096 [1]
1096 [1]
1097 $ hg -R issue1852d incoming --subrepos issue1852c
1097 $ hg -R issue1852d incoming --subrepos issue1852c
1098 comparing with issue1852c
1098 comparing with issue1852c
1099 searching for changes
1099 searching for changes
1100 no changes found
1100 no changes found
1101 comparing with issue1852c/sub/repo
1101 comparing with issue1852c/sub/repo
1102 searching for changes
1102 searching for changes
1103 no changes found
1103 no changes found
1104 [1]
1104 [1]
1105
1105
1106 Check that merge of a new subrepo doesn't write the uncommitted state to
1106 Check that merge of a new subrepo doesn't write the uncommitted state to
1107 .hgsubstate (issue4622)
1107 .hgsubstate (issue4622)
1108
1108
1109 $ hg init issue1852a/addedsub
1109 $ hg init issue1852a/addedsub
1110 $ echo zzz > issue1852a/addedsub/zz.txt
1110 $ echo zzz > issue1852a/addedsub/zz.txt
1111 $ hg -R issue1852a/addedsub ci -Aqm "initial ZZ"
1111 $ hg -R issue1852a/addedsub ci -Aqm "initial ZZ"
1112
1112
1113 $ hg clone issue1852a/addedsub issue1852d/addedsub
1113 $ hg clone issue1852a/addedsub issue1852d/addedsub
1114 updating to branch default
1114 updating to branch default
1115 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1115 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1116
1116
1117 $ echo def > issue1852a/sub/repo/foo
1117 $ echo def > issue1852a/sub/repo/foo
1118 $ hg -R issue1852a ci -SAm 'tweaked subrepo'
1118 $ hg -R issue1852a ci -SAm 'tweaked subrepo'
1119 adding tmp/sub/repo/foo_p
1119 adding tmp/sub/repo/foo_p
1120 committing subrepository sub/repo (glob)
1120 committing subrepository sub/repo (glob)
1121
1121
1122 $ echo 'addedsub = addedsub' >> issue1852d/.hgsub
1122 $ echo 'addedsub = addedsub' >> issue1852d/.hgsub
1123 $ echo xyz > issue1852d/sub/repo/foo
1123 $ echo xyz > issue1852d/sub/repo/foo
1124 $ hg -R issue1852d pull -u
1124 $ hg -R issue1852d pull -u
1125 pulling from $TESTTMP/issue1852a (glob)
1125 pulling from $TESTTMP/issue1852a (glob)
1126 searching for changes
1126 searching for changes
1127 adding changesets
1127 adding changesets
1128 adding manifests
1128 adding manifests
1129 adding file changes
1129 adding file changes
1130 added 1 changesets with 2 changes to 2 files
1130 added 1 changesets with 2 changes to 2 files
1131 subrepository sub/repo diverged (local revision: f42d5c7504a8, remote revision: 46cd4aac504c)
1131 subrepository sub/repo diverged (local revision: f42d5c7504a8, remote revision: 46cd4aac504c)
1132 (M)erge, keep (l)ocal or keep (r)emote? m
1132 (M)erge, keep (l)ocal or keep (r)emote? m
1133 pulling subrepo sub/repo from $TESTTMP/issue1852a/sub/repo (glob)
1133 pulling subrepo sub/repo from $TESTTMP/issue1852a/sub/repo (glob)
1134 searching for changes
1134 searching for changes
1135 adding changesets
1135 adding changesets
1136 adding manifests
1136 adding manifests
1137 adding file changes
1137 adding file changes
1138 added 1 changesets with 1 changes to 1 files
1138 added 1 changesets with 1 changes to 1 files
1139 subrepository sources for sub/repo differ (glob)
1139 subrepository sources for sub/repo differ (glob)
1140 use (l)ocal source (f42d5c7504a8) or (r)emote source (46cd4aac504c)? l
1140 use (l)ocal source (f42d5c7504a8) or (r)emote source (46cd4aac504c)? l
1141 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1141 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1142 $ cat issue1852d/.hgsubstate
1142 $ cat issue1852d/.hgsubstate
1143 f42d5c7504a811dda50f5cf3e5e16c3330b87172 sub/repo
1143 f42d5c7504a811dda50f5cf3e5e16c3330b87172 sub/repo
1144
1144
1145 Check status of files when none of them belong to the first
1145 Check status of files when none of them belong to the first
1146 subrepository:
1146 subrepository:
1147
1147
1148 $ hg init subrepo-status
1148 $ hg init subrepo-status
1149 $ cd subrepo-status
1149 $ cd subrepo-status
1150 $ hg init subrepo-1
1150 $ hg init subrepo-1
1151 $ hg init subrepo-2
1151 $ hg init subrepo-2
1152 $ cd subrepo-2
1152 $ cd subrepo-2
1153 $ touch file
1153 $ touch file
1154 $ hg add file
1154 $ hg add file
1155 $ cd ..
1155 $ cd ..
1156 $ echo subrepo-1 = subrepo-1 > .hgsub
1156 $ echo subrepo-1 = subrepo-1 > .hgsub
1157 $ echo subrepo-2 = subrepo-2 >> .hgsub
1157 $ echo subrepo-2 = subrepo-2 >> .hgsub
1158 $ hg add .hgsub
1158 $ hg add .hgsub
1159 $ hg ci -m 'Added subrepos'
1159 $ hg ci -m 'Added subrepos'
1160 committing subrepository subrepo-2
1160 committing subrepository subrepo-2
1161 $ hg st subrepo-2/file
1161 $ hg st subrepo-2/file
1162
1162
1163 Check that share works with subrepo
1163 Check that share works with subrepo
1164 $ hg --config extensions.share= share . ../shared
1164 $ hg --config extensions.share= share . ../shared
1165 updating working directory
1165 updating working directory
1166 cloning subrepo subrepo-2 from $TESTTMP/subrepo-status/subrepo-2
1166 cloning subrepo subrepo-2 from $TESTTMP/subrepo-status/subrepo-2
1167 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1167 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1168 $ test -f ../shared/subrepo-1/.hg/sharedpath
1168 $ test -f ../shared/subrepo-1/.hg/sharedpath
1169 [1]
1169 [1]
1170 $ hg -R ../shared in
1170 $ hg -R ../shared in
1171 abort: repository default not found!
1171 abort: repository default not found!
1172 [255]
1172 [255]
1173 $ hg -R ../shared/subrepo-2 showconfig paths
1173 $ hg -R ../shared/subrepo-2 showconfig paths
1174 paths.default=$TESTTMP/subrepo-status/subrepo-2
1174 paths.default=$TESTTMP/subrepo-status/subrepo-2
1175 $ hg -R ../shared/subrepo-1 sum --remote
1175 $ hg -R ../shared/subrepo-1 sum --remote
1176 parent: -1:000000000000 tip (empty repository)
1176 parent: -1:000000000000 tip (empty repository)
1177 branch: default
1177 branch: default
1178 commit: (clean)
1178 commit: (clean)
1179 update: (current)
1179 update: (current)
1180 remote: (synced)
1180 remote: (synced)
1181
1181
1182 Check hg update --clean
1182 Check hg update --clean
1183 $ cd $TESTTMP/t
1183 $ cd $TESTTMP/t
1184 $ rm -r t/t.orig
1184 $ rm -r t/t.orig
1185 $ hg status -S --all
1185 $ hg status -S --all
1186 C .hgsub
1186 C .hgsub
1187 C .hgsubstate
1187 C .hgsubstate
1188 C a
1188 C a
1189 C s/.hgsub
1189 C s/.hgsub
1190 C s/.hgsubstate
1190 C s/.hgsubstate
1191 C s/a
1191 C s/a
1192 C s/ss/a
1192 C s/ss/a
1193 C t/t
1193 C t/t
1194 $ echo c1 > s/a
1194 $ echo c1 > s/a
1195 $ cd s
1195 $ cd s
1196 $ echo c1 > b
1196 $ echo c1 > b
1197 $ echo c1 > c
1197 $ echo c1 > c
1198 $ hg add b
1198 $ hg add b
1199 $ cd ..
1199 $ cd ..
1200 $ hg status -S
1200 $ hg status -S
1201 M s/a
1201 M s/a
1202 A s/b
1202 A s/b
1203 ? s/c
1203 ? s/c
1204 $ hg update -C
1204 $ hg update -C
1205 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1205 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1206 2 other heads for branch "default"
1206 2 other heads for branch "default"
1207 $ hg status -S
1207 $ hg status -S
1208 ? s/b
1208 ? s/b
1209 ? s/c
1209 ? s/c
1210
1210
1211 Sticky subrepositories, no changes
1211 Sticky subrepositories, no changes
1212 $ cd $TESTTMP/t
1212 $ cd $TESTTMP/t
1213 $ hg id
1213 $ hg id
1214 925c17564ef8 tip
1214 925c17564ef8 tip
1215 $ hg -R s id
1215 $ hg -R s id
1216 12a213df6fa9 tip
1216 12a213df6fa9 tip
1217 $ hg -R t id
1217 $ hg -R t id
1218 52c0adc0515a tip
1218 52c0adc0515a tip
1219 $ hg update 11
1219 $ hg update 11
1220 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1220 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1221 $ hg id
1221 $ hg id
1222 365661e5936a
1222 365661e5936a
1223 $ hg -R s id
1223 $ hg -R s id
1224 fc627a69481f
1224 fc627a69481f
1225 $ hg -R t id
1225 $ hg -R t id
1226 e95bcfa18a35
1226 e95bcfa18a35
1227
1227
1228 Sticky subrepositories, file changes
1228 Sticky subrepositories, file changes
1229 $ touch s/f1
1229 $ touch s/f1
1230 $ touch t/f1
1230 $ touch t/f1
1231 $ hg add -S s/f1
1231 $ hg add -S s/f1
1232 $ hg add -S t/f1
1232 $ hg add -S t/f1
1233 $ hg id
1233 $ hg id
1234 365661e5936a+
1234 365661e5936a+
1235 $ hg -R s id
1235 $ hg -R s id
1236 fc627a69481f+
1236 fc627a69481f+
1237 $ hg -R t id
1237 $ hg -R t id
1238 e95bcfa18a35+
1238 e95bcfa18a35+
1239 $ hg update tip
1239 $ hg update tip
1240 subrepository s diverged (local revision: fc627a69481f, remote revision: 12a213df6fa9)
1240 subrepository s diverged (local revision: fc627a69481f, remote revision: 12a213df6fa9)
1241 (M)erge, keep (l)ocal or keep (r)emote? m
1241 (M)erge, keep (l)ocal or keep (r)emote? m
1242 subrepository sources for s differ
1242 subrepository sources for s differ
1243 use (l)ocal source (fc627a69481f) or (r)emote source (12a213df6fa9)? l
1243 use (l)ocal source (fc627a69481f) or (r)emote source (12a213df6fa9)? l
1244 subrepository t diverged (local revision: e95bcfa18a35, remote revision: 52c0adc0515a)
1244 subrepository t diverged (local revision: e95bcfa18a35, remote revision: 52c0adc0515a)
1245 (M)erge, keep (l)ocal or keep (r)emote? m
1245 (M)erge, keep (l)ocal or keep (r)emote? m
1246 subrepository sources for t differ
1246 subrepository sources for t differ
1247 use (l)ocal source (e95bcfa18a35) or (r)emote source (52c0adc0515a)? l
1247 use (l)ocal source (e95bcfa18a35) or (r)emote source (52c0adc0515a)? l
1248 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1248 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1249 $ hg id
1249 $ hg id
1250 925c17564ef8+ tip
1250 925c17564ef8+ tip
1251 $ hg -R s id
1251 $ hg -R s id
1252 fc627a69481f+
1252 fc627a69481f+
1253 $ hg -R t id
1253 $ hg -R t id
1254 e95bcfa18a35+
1254 e95bcfa18a35+
1255 $ hg update --clean tip
1255 $ hg update --clean tip
1256 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1256 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1257
1257
1258 Sticky subrepository, revision updates
1258 Sticky subrepository, revision updates
1259 $ hg id
1259 $ hg id
1260 925c17564ef8 tip
1260 925c17564ef8 tip
1261 $ hg -R s id
1261 $ hg -R s id
1262 12a213df6fa9 tip
1262 12a213df6fa9 tip
1263 $ hg -R t id
1263 $ hg -R t id
1264 52c0adc0515a tip
1264 52c0adc0515a tip
1265 $ cd s
1265 $ cd s
1266 $ hg update -r -2
1266 $ hg update -r -2
1267 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1267 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1268 $ cd ../t
1268 $ cd ../t
1269 $ hg update -r 2
1269 $ hg update -r 2
1270 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1270 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1271 $ cd ..
1271 $ cd ..
1272 $ hg update 10
1272 $ hg update 10
1273 subrepository s diverged (local revision: 12a213df6fa9, remote revision: fc627a69481f)
1273 subrepository s diverged (local revision: 12a213df6fa9, remote revision: fc627a69481f)
1274 (M)erge, keep (l)ocal or keep (r)emote? m
1274 (M)erge, keep (l)ocal or keep (r)emote? m
1275 subrepository t diverged (local revision: 52c0adc0515a, remote revision: 20a0db6fbf6c)
1275 subrepository t diverged (local revision: 52c0adc0515a, remote revision: 20a0db6fbf6c)
1276 (M)erge, keep (l)ocal or keep (r)emote? m
1276 (M)erge, keep (l)ocal or keep (r)emote? m
1277 subrepository sources for t differ (in checked out version)
1277 subrepository sources for t differ (in checked out version)
1278 use (l)ocal source (7af322bc1198) or (r)emote source (20a0db6fbf6c)? l
1278 use (l)ocal source (7af322bc1198) or (r)emote source (20a0db6fbf6c)? l
1279 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1279 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1280 $ hg id
1280 $ hg id
1281 e45c8b14af55+
1281 e45c8b14af55+
1282 $ hg -R s id
1282 $ hg -R s id
1283 02dcf1d70411
1283 02dcf1d70411
1284 $ hg -R t id
1284 $ hg -R t id
1285 7af322bc1198
1285 7af322bc1198
1286
1286
1287 Sticky subrepository, file changes and revision updates
1287 Sticky subrepository, file changes and revision updates
1288 $ touch s/f1
1288 $ touch s/f1
1289 $ touch t/f1
1289 $ touch t/f1
1290 $ hg add -S s/f1
1290 $ hg add -S s/f1
1291 $ hg add -S t/f1
1291 $ hg add -S t/f1
1292 $ hg id
1292 $ hg id
1293 e45c8b14af55+
1293 e45c8b14af55+
1294 $ hg -R s id
1294 $ hg -R s id
1295 02dcf1d70411+
1295 02dcf1d70411+
1296 $ hg -R t id
1296 $ hg -R t id
1297 7af322bc1198+
1297 7af322bc1198+
1298 $ hg update tip
1298 $ hg update tip
1299 subrepository s diverged (local revision: 12a213df6fa9, remote revision: 12a213df6fa9)
1299 subrepository s diverged (local revision: 12a213df6fa9, remote revision: 12a213df6fa9)
1300 (M)erge, keep (l)ocal or keep (r)emote? m
1300 (M)erge, keep (l)ocal or keep (r)emote? m
1301 subrepository sources for s differ
1301 subrepository sources for s differ
1302 use (l)ocal source (02dcf1d70411) or (r)emote source (12a213df6fa9)? l
1302 use (l)ocal source (02dcf1d70411) or (r)emote source (12a213df6fa9)? l
1303 subrepository t diverged (local revision: 52c0adc0515a, remote revision: 52c0adc0515a)
1303 subrepository t diverged (local revision: 52c0adc0515a, remote revision: 52c0adc0515a)
1304 (M)erge, keep (l)ocal or keep (r)emote? m
1304 (M)erge, keep (l)ocal or keep (r)emote? m
1305 subrepository sources for t differ
1305 subrepository sources for t differ
1306 use (l)ocal source (7af322bc1198) or (r)emote source (52c0adc0515a)? l
1306 use (l)ocal source (7af322bc1198) or (r)emote source (52c0adc0515a)? l
1307 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1307 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1308 $ hg id
1308 $ hg id
1309 925c17564ef8+ tip
1309 925c17564ef8+ tip
1310 $ hg -R s id
1310 $ hg -R s id
1311 02dcf1d70411+
1311 02dcf1d70411+
1312 $ hg -R t id
1312 $ hg -R t id
1313 7af322bc1198+
1313 7af322bc1198+
1314
1314
1315 Sticky repository, update --clean
1315 Sticky repository, update --clean
1316 $ hg update --clean tip
1316 $ hg update --clean tip
1317 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1317 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1318 $ hg id
1318 $ hg id
1319 925c17564ef8 tip
1319 925c17564ef8 tip
1320 $ hg -R s id
1320 $ hg -R s id
1321 12a213df6fa9 tip
1321 12a213df6fa9 tip
1322 $ hg -R t id
1322 $ hg -R t id
1323 52c0adc0515a tip
1323 52c0adc0515a tip
1324
1324
1325 Test subrepo already at intended revision:
1325 Test subrepo already at intended revision:
1326 $ cd s
1326 $ cd s
1327 $ hg update fc627a69481f
1327 $ hg update fc627a69481f
1328 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1328 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1329 $ cd ..
1329 $ cd ..
1330 $ hg update 11
1330 $ hg update 11
1331 subrepository s diverged (local revision: 12a213df6fa9, remote revision: fc627a69481f)
1331 subrepository s diverged (local revision: 12a213df6fa9, remote revision: fc627a69481f)
1332 (M)erge, keep (l)ocal or keep (r)emote? m
1332 (M)erge, keep (l)ocal or keep (r)emote? m
1333 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1333 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1334 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1334 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1335 $ hg id -n
1335 $ hg id -n
1336 11+
1336 11+
1337 $ hg -R s id
1337 $ hg -R s id
1338 fc627a69481f
1338 fc627a69481f
1339 $ hg -R t id
1339 $ hg -R t id
1340 e95bcfa18a35
1340 e95bcfa18a35
1341
1341
1342 Test that removing .hgsubstate doesn't break anything:
1342 Test that removing .hgsubstate doesn't break anything:
1343
1343
1344 $ hg rm -f .hgsubstate
1344 $ hg rm -f .hgsubstate
1345 $ hg ci -mrm
1345 $ hg ci -mrm
1346 nothing changed
1346 nothing changed
1347 [1]
1347 [1]
1348 $ hg log -vr tip
1348 $ hg log -vr tip
1349 changeset: 13:925c17564ef8
1349 changeset: 13:925c17564ef8
1350 tag: tip
1350 tag: tip
1351 user: test
1351 user: test
1352 date: Thu Jan 01 00:00:00 1970 +0000
1352 date: Thu Jan 01 00:00:00 1970 +0000
1353 files: .hgsubstate
1353 files: .hgsubstate
1354 description:
1354 description:
1355 13
1355 13
1356
1356
1357
1357
1358
1358
1359 Test that removing .hgsub removes .hgsubstate:
1359 Test that removing .hgsub removes .hgsubstate:
1360
1360
1361 $ hg rm .hgsub
1361 $ hg rm .hgsub
1362 $ hg ci -mrm2
1362 $ hg ci -mrm2
1363 created new head
1363 created new head
1364 $ hg log -vr tip
1364 $ hg log -vr tip
1365 changeset: 14:2400bccd50af
1365 changeset: 14:2400bccd50af
1366 tag: tip
1366 tag: tip
1367 parent: 11:365661e5936a
1367 parent: 11:365661e5936a
1368 user: test
1368 user: test
1369 date: Thu Jan 01 00:00:00 1970 +0000
1369 date: Thu Jan 01 00:00:00 1970 +0000
1370 files: .hgsub .hgsubstate
1370 files: .hgsub .hgsubstate
1371 description:
1371 description:
1372 rm2
1372 rm2
1373
1373
1374
1374
1375 Test issue3153: diff -S with deleted subrepos
1375 Test issue3153: diff -S with deleted subrepos
1376
1376
1377 $ hg diff --nodates -S -c .
1377 $ hg diff --nodates -S -c .
1378 diff -r 365661e5936a -r 2400bccd50af .hgsub
1378 diff -r 365661e5936a -r 2400bccd50af .hgsub
1379 --- a/.hgsub
1379 --- a/.hgsub
1380 +++ /dev/null
1380 +++ /dev/null
1381 @@ -1,2 +0,0 @@
1381 @@ -1,2 +0,0 @@
1382 -s = s
1382 -s = s
1383 -t = t
1383 -t = t
1384 diff -r 365661e5936a -r 2400bccd50af .hgsubstate
1384 diff -r 365661e5936a -r 2400bccd50af .hgsubstate
1385 --- a/.hgsubstate
1385 --- a/.hgsubstate
1386 +++ /dev/null
1386 +++ /dev/null
1387 @@ -1,2 +0,0 @@
1387 @@ -1,2 +0,0 @@
1388 -fc627a69481fcbe5f1135069e8a3881c023e4cf5 s
1388 -fc627a69481fcbe5f1135069e8a3881c023e4cf5 s
1389 -e95bcfa18a358dc4936da981ebf4147b4cad1362 t
1389 -e95bcfa18a358dc4936da981ebf4147b4cad1362 t
1390
1390
1391 Test behavior of add for explicit path in subrepo:
1391 Test behavior of add for explicit path in subrepo:
1392 $ cd ..
1392 $ cd ..
1393 $ hg init explicit
1393 $ hg init explicit
1394 $ cd explicit
1394 $ cd explicit
1395 $ echo s = s > .hgsub
1395 $ echo s = s > .hgsub
1396 $ hg add .hgsub
1396 $ hg add .hgsub
1397 $ hg init s
1397 $ hg init s
1398 $ hg ci -m0
1398 $ hg ci -m0
1399 Adding with an explicit path in a subrepo adds the file
1399 Adding with an explicit path in a subrepo adds the file
1400 $ echo c1 > f1
1400 $ echo c1 > f1
1401 $ echo c2 > s/f2
1401 $ echo c2 > s/f2
1402 $ hg st -S
1402 $ hg st -S
1403 ? f1
1403 ? f1
1404 ? s/f2
1404 ? s/f2
1405 $ hg add s/f2
1405 $ hg add s/f2
1406 $ hg st -S
1406 $ hg st -S
1407 A s/f2
1407 A s/f2
1408 ? f1
1408 ? f1
1409 $ hg ci -R s -m0
1409 $ hg ci -R s -m0
1410 $ hg ci -Am1
1410 $ hg ci -Am1
1411 adding f1
1411 adding f1
1412 Adding with an explicit path in a subrepo with -S has the same behavior
1412 Adding with an explicit path in a subrepo with -S has the same behavior
1413 $ echo c3 > f3
1413 $ echo c3 > f3
1414 $ echo c4 > s/f4
1414 $ echo c4 > s/f4
1415 $ hg st -S
1415 $ hg st -S
1416 ? f3
1416 ? f3
1417 ? s/f4
1417 ? s/f4
1418 $ hg add -S s/f4
1418 $ hg add -S s/f4
1419 $ hg st -S
1419 $ hg st -S
1420 A s/f4
1420 A s/f4
1421 ? f3
1421 ? f3
1422 $ hg ci -R s -m1
1422 $ hg ci -R s -m1
1423 $ hg ci -Ama2
1423 $ hg ci -Ama2
1424 adding f3
1424 adding f3
1425 Adding without a path or pattern silently ignores subrepos
1425 Adding without a path or pattern silently ignores subrepos
1426 $ echo c5 > f5
1426 $ echo c5 > f5
1427 $ echo c6 > s/f6
1427 $ echo c6 > s/f6
1428 $ echo c7 > s/f7
1428 $ echo c7 > s/f7
1429 $ hg st -S
1429 $ hg st -S
1430 ? f5
1430 ? f5
1431 ? s/f6
1431 ? s/f6
1432 ? s/f7
1432 ? s/f7
1433 $ hg add
1433 $ hg add
1434 adding f5
1434 adding f5
1435 $ hg st -S
1435 $ hg st -S
1436 A f5
1436 A f5
1437 ? s/f6
1437 ? s/f6
1438 ? s/f7
1438 ? s/f7
1439 $ hg ci -R s -Am2
1439 $ hg ci -R s -Am2
1440 adding f6
1440 adding f6
1441 adding f7
1441 adding f7
1442 $ hg ci -m3
1442 $ hg ci -m3
1443 Adding without a path or pattern with -S also adds files in subrepos
1443 Adding without a path or pattern with -S also adds files in subrepos
1444 $ echo c8 > f8
1444 $ echo c8 > f8
1445 $ echo c9 > s/f9
1445 $ echo c9 > s/f9
1446 $ echo c10 > s/f10
1446 $ echo c10 > s/f10
1447 $ hg st -S
1447 $ hg st -S
1448 ? f8
1448 ? f8
1449 ? s/f10
1449 ? s/f10
1450 ? s/f9
1450 ? s/f9
1451 $ hg add -S
1451 $ hg add -S
1452 adding f8
1452 adding f8
1453 adding s/f10 (glob)
1453 adding s/f10 (glob)
1454 adding s/f9 (glob)
1454 adding s/f9 (glob)
1455 $ hg st -S
1455 $ hg st -S
1456 A f8
1456 A f8
1457 A s/f10
1457 A s/f10
1458 A s/f9
1458 A s/f9
1459 $ hg ci -R s -m3
1459 $ hg ci -R s -m3
1460 $ hg ci -m4
1460 $ hg ci -m4
1461 Adding with a pattern silently ignores subrepos
1461 Adding with a pattern silently ignores subrepos
1462 $ echo c11 > fm11
1462 $ echo c11 > fm11
1463 $ echo c12 > fn12
1463 $ echo c12 > fn12
1464 $ echo c13 > s/fm13
1464 $ echo c13 > s/fm13
1465 $ echo c14 > s/fn14
1465 $ echo c14 > s/fn14
1466 $ hg st -S
1466 $ hg st -S
1467 ? fm11
1467 ? fm11
1468 ? fn12
1468 ? fn12
1469 ? s/fm13
1469 ? s/fm13
1470 ? s/fn14
1470 ? s/fn14
1471 $ hg add 'glob:**fm*'
1471 $ hg add 'glob:**fm*'
1472 adding fm11
1472 adding fm11
1473 $ hg st -S
1473 $ hg st -S
1474 A fm11
1474 A fm11
1475 ? fn12
1475 ? fn12
1476 ? s/fm13
1476 ? s/fm13
1477 ? s/fn14
1477 ? s/fn14
1478 $ hg ci -R s -Am4
1478 $ hg ci -R s -Am4
1479 adding fm13
1479 adding fm13
1480 adding fn14
1480 adding fn14
1481 $ hg ci -Am5
1481 $ hg ci -Am5
1482 adding fn12
1482 adding fn12
1483 Adding with a pattern with -S also adds matches in subrepos
1483 Adding with a pattern with -S also adds matches in subrepos
1484 $ echo c15 > fm15
1484 $ echo c15 > fm15
1485 $ echo c16 > fn16
1485 $ echo c16 > fn16
1486 $ echo c17 > s/fm17
1486 $ echo c17 > s/fm17
1487 $ echo c18 > s/fn18
1487 $ echo c18 > s/fn18
1488 $ hg st -S
1488 $ hg st -S
1489 ? fm15
1489 ? fm15
1490 ? fn16
1490 ? fn16
1491 ? s/fm17
1491 ? s/fm17
1492 ? s/fn18
1492 ? s/fn18
1493 $ hg add -S 'glob:**fm*'
1493 $ hg add -S 'glob:**fm*'
1494 adding fm15
1494 adding fm15
1495 adding s/fm17 (glob)
1495 adding s/fm17 (glob)
1496 $ hg st -S
1496 $ hg st -S
1497 A fm15
1497 A fm15
1498 A s/fm17
1498 A s/fm17
1499 ? fn16
1499 ? fn16
1500 ? s/fn18
1500 ? s/fn18
1501 $ hg ci -R s -Am5
1501 $ hg ci -R s -Am5
1502 adding fn18
1502 adding fn18
1503 $ hg ci -Am6
1503 $ hg ci -Am6
1504 adding fn16
1504 adding fn16
1505
1505
1506 Test behavior of forget for explicit path in subrepo:
1506 Test behavior of forget for explicit path in subrepo:
1507 Forgetting an explicit path in a subrepo untracks the file
1507 Forgetting an explicit path in a subrepo untracks the file
1508 $ echo c19 > s/f19
1508 $ echo c19 > s/f19
1509 $ hg add s/f19
1509 $ hg add s/f19
1510 $ hg st -S
1510 $ hg st -S
1511 A s/f19
1511 A s/f19
1512 $ hg forget s/f19
1512 $ hg forget s/f19
1513 $ hg st -S
1513 $ hg st -S
1514 ? s/f19
1514 ? s/f19
1515 $ rm s/f19
1515 $ rm s/f19
1516 $ cd ..
1516 $ cd ..
1517
1517
1518 Courtesy phases synchronisation to publishing server does not block the push
1518 Courtesy phases synchronisation to publishing server does not block the push
1519 (issue3781)
1519 (issue3781)
1520
1520
1521 $ cp -r main issue3781
1521 $ cp -r main issue3781
1522 $ cp -r main issue3781-dest
1522 $ cp -r main issue3781-dest
1523 $ cd issue3781-dest/s
1523 $ cd issue3781-dest/s
1524 $ hg phase tip # show we have draft changeset
1524 $ hg phase tip # show we have draft changeset
1525 5: draft
1525 5: draft
1526 $ chmod a-w .hg/store/phaseroots # prevent phase push
1526 $ chmod a-w .hg/store/phaseroots # prevent phase push
1527 $ cd ../../issue3781
1527 $ cd ../../issue3781
1528 $ cat >> .hg/hgrc << EOF
1528 $ cat >> .hg/hgrc << EOF
1529 > [paths]
1529 > [paths]
1530 > default=../issue3781-dest/
1530 > default=../issue3781-dest/
1531 > EOF
1531 > EOF
1532 $ hg push --config experimental.bundle2-exp=False
1532 $ hg push --config devel.legacy.exchange=bundle1
1533 pushing to $TESTTMP/issue3781-dest (glob)
1533 pushing to $TESTTMP/issue3781-dest (glob)
1534 pushing subrepo s to $TESTTMP/issue3781-dest/s
1534 pushing subrepo s to $TESTTMP/issue3781-dest/s
1535 searching for changes
1535 searching for changes
1536 no changes found
1536 no changes found
1537 searching for changes
1537 searching for changes
1538 no changes found
1538 no changes found
1539 [1]
1539 [1]
1540 # clean the push cache
1540 # clean the push cache
1541 $ rm s/.hg/cache/storehash/*
1541 $ rm s/.hg/cache/storehash/*
1542 $ hg push --config experimental.bundle2-exp=True
1542 $ hg push --config experimental.bundle2-exp=True
1543 pushing to $TESTTMP/issue3781-dest (glob)
1543 pushing to $TESTTMP/issue3781-dest (glob)
1544 pushing subrepo s to $TESTTMP/issue3781-dest/s
1544 pushing subrepo s to $TESTTMP/issue3781-dest/s
1545 searching for changes
1545 searching for changes
1546 no changes found
1546 no changes found
1547 searching for changes
1547 searching for changes
1548 no changes found
1548 no changes found
1549 [1]
1549 [1]
1550 $ cd ..
1550 $ cd ..
1551
1551
1552 Test phase choice for newly created commit with "phases.subrepochecks"
1552 Test phase choice for newly created commit with "phases.subrepochecks"
1553 configuration
1553 configuration
1554
1554
1555 $ cd t
1555 $ cd t
1556 $ hg update -q -r 12
1556 $ hg update -q -r 12
1557
1557
1558 $ cat >> s/ss/.hg/hgrc <<EOF
1558 $ cat >> s/ss/.hg/hgrc <<EOF
1559 > [phases]
1559 > [phases]
1560 > new-commit = secret
1560 > new-commit = secret
1561 > EOF
1561 > EOF
1562 $ cat >> s/.hg/hgrc <<EOF
1562 $ cat >> s/.hg/hgrc <<EOF
1563 > [phases]
1563 > [phases]
1564 > new-commit = draft
1564 > new-commit = draft
1565 > EOF
1565 > EOF
1566 $ echo phasecheck1 >> s/ss/a
1566 $ echo phasecheck1 >> s/ss/a
1567 $ hg -R s commit -S --config phases.checksubrepos=abort -m phasecheck1
1567 $ hg -R s commit -S --config phases.checksubrepos=abort -m phasecheck1
1568 committing subrepository ss
1568 committing subrepository ss
1569 transaction abort!
1569 transaction abort!
1570 rollback completed
1570 rollback completed
1571 abort: can't commit in draft phase conflicting secret from subrepository ss
1571 abort: can't commit in draft phase conflicting secret from subrepository ss
1572 [255]
1572 [255]
1573 $ echo phasecheck2 >> s/ss/a
1573 $ echo phasecheck2 >> s/ss/a
1574 $ hg -R s commit -S --config phases.checksubrepos=ignore -m phasecheck2
1574 $ hg -R s commit -S --config phases.checksubrepos=ignore -m phasecheck2
1575 committing subrepository ss
1575 committing subrepository ss
1576 $ hg -R s/ss phase tip
1576 $ hg -R s/ss phase tip
1577 3: secret
1577 3: secret
1578 $ hg -R s phase tip
1578 $ hg -R s phase tip
1579 6: draft
1579 6: draft
1580 $ echo phasecheck3 >> s/ss/a
1580 $ echo phasecheck3 >> s/ss/a
1581 $ hg -R s commit -S -m phasecheck3
1581 $ hg -R s commit -S -m phasecheck3
1582 committing subrepository ss
1582 committing subrepository ss
1583 warning: changes are committed in secret phase from subrepository ss
1583 warning: changes are committed in secret phase from subrepository ss
1584 $ hg -R s/ss phase tip
1584 $ hg -R s/ss phase tip
1585 4: secret
1585 4: secret
1586 $ hg -R s phase tip
1586 $ hg -R s phase tip
1587 7: secret
1587 7: secret
1588
1588
1589 $ cat >> t/.hg/hgrc <<EOF
1589 $ cat >> t/.hg/hgrc <<EOF
1590 > [phases]
1590 > [phases]
1591 > new-commit = draft
1591 > new-commit = draft
1592 > EOF
1592 > EOF
1593 $ cat >> .hg/hgrc <<EOF
1593 $ cat >> .hg/hgrc <<EOF
1594 > [phases]
1594 > [phases]
1595 > new-commit = public
1595 > new-commit = public
1596 > EOF
1596 > EOF
1597 $ echo phasecheck4 >> s/ss/a
1597 $ echo phasecheck4 >> s/ss/a
1598 $ echo phasecheck4 >> t/t
1598 $ echo phasecheck4 >> t/t
1599 $ hg commit -S -m phasecheck4
1599 $ hg commit -S -m phasecheck4
1600 committing subrepository s
1600 committing subrepository s
1601 committing subrepository s/ss (glob)
1601 committing subrepository s/ss (glob)
1602 warning: changes are committed in secret phase from subrepository ss
1602 warning: changes are committed in secret phase from subrepository ss
1603 committing subrepository t
1603 committing subrepository t
1604 warning: changes are committed in secret phase from subrepository s
1604 warning: changes are committed in secret phase from subrepository s
1605 created new head
1605 created new head
1606 $ hg -R s/ss phase tip
1606 $ hg -R s/ss phase tip
1607 5: secret
1607 5: secret
1608 $ hg -R s phase tip
1608 $ hg -R s phase tip
1609 8: secret
1609 8: secret
1610 $ hg -R t phase tip
1610 $ hg -R t phase tip
1611 6: draft
1611 6: draft
1612 $ hg phase tip
1612 $ hg phase tip
1613 15: secret
1613 15: secret
1614
1614
1615 $ cd ..
1615 $ cd ..
1616
1616
1617
1617
1618 Test that commit --secret works on both repo and subrepo (issue4182)
1618 Test that commit --secret works on both repo and subrepo (issue4182)
1619
1619
1620 $ cd main
1620 $ cd main
1621 $ echo secret >> b
1621 $ echo secret >> b
1622 $ echo secret >> s/b
1622 $ echo secret >> s/b
1623 $ hg commit --secret --subrepo -m "secret"
1623 $ hg commit --secret --subrepo -m "secret"
1624 committing subrepository s
1624 committing subrepository s
1625 $ hg phase -r .
1625 $ hg phase -r .
1626 6: secret
1626 6: secret
1627 $ cd s
1627 $ cd s
1628 $ hg phase -r .
1628 $ hg phase -r .
1629 6: secret
1629 6: secret
1630 $ cd ../../
1630 $ cd ../../
1631
1631
1632 Test "subrepos" template keyword
1632 Test "subrepos" template keyword
1633
1633
1634 $ cd t
1634 $ cd t
1635 $ hg update -q 15
1635 $ hg update -q 15
1636 $ cat > .hgsub <<EOF
1636 $ cat > .hgsub <<EOF
1637 > s = s
1637 > s = s
1638 > EOF
1638 > EOF
1639 $ hg commit -m "16"
1639 $ hg commit -m "16"
1640 warning: changes are committed in secret phase from subrepository s
1640 warning: changes are committed in secret phase from subrepository s
1641
1641
1642 (addition of ".hgsub" itself)
1642 (addition of ".hgsub" itself)
1643
1643
1644 $ hg diff --nodates -c 1 .hgsubstate
1644 $ hg diff --nodates -c 1 .hgsubstate
1645 diff -r f7b1eb17ad24 -r 7cf8cfea66e4 .hgsubstate
1645 diff -r f7b1eb17ad24 -r 7cf8cfea66e4 .hgsubstate
1646 --- /dev/null
1646 --- /dev/null
1647 +++ b/.hgsubstate
1647 +++ b/.hgsubstate
1648 @@ -0,0 +1,1 @@
1648 @@ -0,0 +1,1 @@
1649 +e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
1649 +e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
1650 $ hg log -r 1 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}"
1650 $ hg log -r 1 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}"
1651 f7b1eb17ad24 000000000000
1651 f7b1eb17ad24 000000000000
1652 s
1652 s
1653
1653
1654 (modification of existing entry)
1654 (modification of existing entry)
1655
1655
1656 $ hg diff --nodates -c 2 .hgsubstate
1656 $ hg diff --nodates -c 2 .hgsubstate
1657 diff -r 7cf8cfea66e4 -r df30734270ae .hgsubstate
1657 diff -r 7cf8cfea66e4 -r df30734270ae .hgsubstate
1658 --- a/.hgsubstate
1658 --- a/.hgsubstate
1659 +++ b/.hgsubstate
1659 +++ b/.hgsubstate
1660 @@ -1,1 +1,1 @@
1660 @@ -1,1 +1,1 @@
1661 -e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
1661 -e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
1662 +dc73e2e6d2675eb2e41e33c205f4bdab4ea5111d s
1662 +dc73e2e6d2675eb2e41e33c205f4bdab4ea5111d s
1663 $ hg log -r 2 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}"
1663 $ hg log -r 2 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}"
1664 7cf8cfea66e4 000000000000
1664 7cf8cfea66e4 000000000000
1665 s
1665 s
1666
1666
1667 (addition of entry)
1667 (addition of entry)
1668
1668
1669 $ hg diff --nodates -c 5 .hgsubstate
1669 $ hg diff --nodates -c 5 .hgsubstate
1670 diff -r 7cf8cfea66e4 -r 1f14a2e2d3ec .hgsubstate
1670 diff -r 7cf8cfea66e4 -r 1f14a2e2d3ec .hgsubstate
1671 --- a/.hgsubstate
1671 --- a/.hgsubstate
1672 +++ b/.hgsubstate
1672 +++ b/.hgsubstate
1673 @@ -1,1 +1,2 @@
1673 @@ -1,1 +1,2 @@
1674 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
1674 e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
1675 +60ca1237c19474e7a3978b0dc1ca4e6f36d51382 t
1675 +60ca1237c19474e7a3978b0dc1ca4e6f36d51382 t
1676 $ hg log -r 5 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}"
1676 $ hg log -r 5 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}"
1677 7cf8cfea66e4 000000000000
1677 7cf8cfea66e4 000000000000
1678 t
1678 t
1679
1679
1680 (removal of existing entry)
1680 (removal of existing entry)
1681
1681
1682 $ hg diff --nodates -c 16 .hgsubstate
1682 $ hg diff --nodates -c 16 .hgsubstate
1683 diff -r 8bec38d2bd0b -r f2f70bc3d3c9 .hgsubstate
1683 diff -r 8bec38d2bd0b -r f2f70bc3d3c9 .hgsubstate
1684 --- a/.hgsubstate
1684 --- a/.hgsubstate
1685 +++ b/.hgsubstate
1685 +++ b/.hgsubstate
1686 @@ -1,2 +1,1 @@
1686 @@ -1,2 +1,1 @@
1687 0731af8ca9423976d3743119d0865097c07bdc1b s
1687 0731af8ca9423976d3743119d0865097c07bdc1b s
1688 -e202dc79b04c88a636ea8913d9182a1346d9b3dc t
1688 -e202dc79b04c88a636ea8913d9182a1346d9b3dc t
1689 $ hg log -r 16 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}"
1689 $ hg log -r 16 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}"
1690 8bec38d2bd0b 000000000000
1690 8bec38d2bd0b 000000000000
1691 t
1691 t
1692
1692
1693 (merging)
1693 (merging)
1694
1694
1695 $ hg diff --nodates -c 9 .hgsubstate
1695 $ hg diff --nodates -c 9 .hgsubstate
1696 diff -r f6affe3fbfaa -r f0d2028bf86d .hgsubstate
1696 diff -r f6affe3fbfaa -r f0d2028bf86d .hgsubstate
1697 --- a/.hgsubstate
1697 --- a/.hgsubstate
1698 +++ b/.hgsubstate
1698 +++ b/.hgsubstate
1699 @@ -1,1 +1,2 @@
1699 @@ -1,1 +1,2 @@
1700 fc627a69481fcbe5f1135069e8a3881c023e4cf5 s
1700 fc627a69481fcbe5f1135069e8a3881c023e4cf5 s
1701 +60ca1237c19474e7a3978b0dc1ca4e6f36d51382 t
1701 +60ca1237c19474e7a3978b0dc1ca4e6f36d51382 t
1702 $ hg log -r 9 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}"
1702 $ hg log -r 9 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}"
1703 f6affe3fbfaa 1f14a2e2d3ec
1703 f6affe3fbfaa 1f14a2e2d3ec
1704 t
1704 t
1705
1705
1706 (removal of ".hgsub" itself)
1706 (removal of ".hgsub" itself)
1707
1707
1708 $ hg diff --nodates -c 8 .hgsubstate
1708 $ hg diff --nodates -c 8 .hgsubstate
1709 diff -r f94576341bcf -r 96615c1dad2d .hgsubstate
1709 diff -r f94576341bcf -r 96615c1dad2d .hgsubstate
1710 --- a/.hgsubstate
1710 --- a/.hgsubstate
1711 +++ /dev/null
1711 +++ /dev/null
1712 @@ -1,2 +0,0 @@
1712 @@ -1,2 +0,0 @@
1713 -e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
1713 -e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s
1714 -7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4 t
1714 -7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4 t
1715 $ hg log -r 8 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}"
1715 $ hg log -r 8 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}"
1716 f94576341bcf 000000000000
1716 f94576341bcf 000000000000
1717
1717
1718 Test that '[paths]' is configured correctly at subrepo creation
1718 Test that '[paths]' is configured correctly at subrepo creation
1719
1719
1720 $ cd $TESTTMP/tc
1720 $ cd $TESTTMP/tc
1721 $ cat > .hgsub <<EOF
1721 $ cat > .hgsub <<EOF
1722 > # to clear bogus subrepo path 'bogus=[boguspath'
1722 > # to clear bogus subrepo path 'bogus=[boguspath'
1723 > s = s
1723 > s = s
1724 > t = t
1724 > t = t
1725 > EOF
1725 > EOF
1726 $ hg update -q --clean null
1726 $ hg update -q --clean null
1727 $ rm -rf s t
1727 $ rm -rf s t
1728 $ cat >> .hg/hgrc <<EOF
1728 $ cat >> .hg/hgrc <<EOF
1729 > [paths]
1729 > [paths]
1730 > default-push = /foo/bar
1730 > default-push = /foo/bar
1731 > EOF
1731 > EOF
1732 $ hg update -q
1732 $ hg update -q
1733 $ cat s/.hg/hgrc
1733 $ cat s/.hg/hgrc
1734 [paths]
1734 [paths]
1735 default = $TESTTMP/t/s
1735 default = $TESTTMP/t/s
1736 default-push = /foo/bar/s
1736 default-push = /foo/bar/s
1737 $ cat s/ss/.hg/hgrc
1737 $ cat s/ss/.hg/hgrc
1738 [paths]
1738 [paths]
1739 default = $TESTTMP/t/s/ss
1739 default = $TESTTMP/t/s/ss
1740 default-push = /foo/bar/s/ss
1740 default-push = /foo/bar/s/ss
1741 $ cat t/.hg/hgrc
1741 $ cat t/.hg/hgrc
1742 [paths]
1742 [paths]
1743 default = $TESTTMP/t/t
1743 default = $TESTTMP/t/t
1744 default-push = /foo/bar/t
1744 default-push = /foo/bar/t
1745
1745
1746 $ cd $TESTTMP/t
1746 $ cd $TESTTMP/t
1747 $ hg up -qC 0
1747 $ hg up -qC 0
1748 $ echo 'bar' > bar.txt
1748 $ echo 'bar' > bar.txt
1749 $ hg ci -Am 'branch before subrepo add'
1749 $ hg ci -Am 'branch before subrepo add'
1750 adding bar.txt
1750 adding bar.txt
1751 created new head
1751 created new head
1752 $ hg merge -r "first(subrepo('s'))"
1752 $ hg merge -r "first(subrepo('s'))"
1753 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1753 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1754 (branch merge, don't forget to commit)
1754 (branch merge, don't forget to commit)
1755 $ hg status -S -X '.hgsub*'
1755 $ hg status -S -X '.hgsub*'
1756 A s/a
1756 A s/a
1757 ? s/b
1757 ? s/b
1758 ? s/c
1758 ? s/c
1759 ? s/f1
1759 ? s/f1
1760 $ hg status -S --rev 'p2()'
1760 $ hg status -S --rev 'p2()'
1761 A bar.txt
1761 A bar.txt
1762 ? s/b
1762 ? s/b
1763 ? s/c
1763 ? s/c
1764 ? s/f1
1764 ? s/f1
1765 $ hg diff -S -X '.hgsub*' --nodates
1765 $ hg diff -S -X '.hgsub*' --nodates
1766 diff -r 000000000000 s/a
1766 diff -r 000000000000 s/a
1767 --- /dev/null
1767 --- /dev/null
1768 +++ b/s/a
1768 +++ b/s/a
1769 @@ -0,0 +1,1 @@
1769 @@ -0,0 +1,1 @@
1770 +a
1770 +a
1771 $ hg diff -S --rev 'p2()' --nodates
1771 $ hg diff -S --rev 'p2()' --nodates
1772 diff -r 7cf8cfea66e4 bar.txt
1772 diff -r 7cf8cfea66e4 bar.txt
1773 --- /dev/null
1773 --- /dev/null
1774 +++ b/bar.txt
1774 +++ b/bar.txt
1775 @@ -0,0 +1,1 @@
1775 @@ -0,0 +1,1 @@
1776 +bar
1776 +bar
1777
1777
1778 $ cd ..
1778 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now