##// END OF EJS Templates
tests: fix another Windows path issue
Matt Mackall -
r19165:98406218 stable
parent child Browse files
Show More
@@ -1,1216 +1,1216
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 ci -Ams0
28 $ hg -R s ci -Ams0
29 adding a
29 adding a
30 $ hg sum
30 $ hg sum
31 parent: 0:f7b1eb17ad24 tip
31 parent: 0:f7b1eb17ad24 tip
32 0
32 0
33 branch: default
33 branch: default
34 commit: 1 added, 1 subrepos
34 commit: 1 added, 1 subrepos
35 update: (current)
35 update: (current)
36 $ hg ci -m1
36 $ hg ci -m1
37
37
38 Revert subrepo and test subrepo fileset keyword:
38 Revert subrepo and test subrepo fileset keyword:
39
39
40 $ echo b > s/a
40 $ echo b > s/a
41 $ hg revert "set:subrepo('glob:s*')"
41 $ hg revert "set:subrepo('glob:s*')"
42 reverting subrepo s
42 reverting subrepo s
43 reverting s/a (glob)
43 reverting s/a (glob)
44 $ rm s/a.orig
44 $ rm s/a.orig
45
45
46 Revert subrepo with no backup. The "reverting s/a" line is gone since
46 Revert subrepo with no backup. The "reverting s/a" line is gone since
47 we're really running 'hg update' in the subrepo:
47 we're really running 'hg update' in the subrepo:
48
48
49 $ echo b > s/a
49 $ echo b > s/a
50 $ hg revert --no-backup s
50 $ hg revert --no-backup s
51 reverting subrepo s
51 reverting subrepo s
52
52
53 Issue2022: update -C
53 Issue2022: update -C
54
54
55 $ echo b > s/a
55 $ echo b > s/a
56 $ hg sum
56 $ hg sum
57 parent: 1:7cf8cfea66e4 tip
57 parent: 1:7cf8cfea66e4 tip
58 1
58 1
59 branch: default
59 branch: default
60 commit: 1 subrepos
60 commit: 1 subrepos
61 update: (current)
61 update: (current)
62 $ hg co -C 1
62 $ hg co -C 1
63 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
63 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
64 $ hg sum
64 $ hg sum
65 parent: 1:7cf8cfea66e4 tip
65 parent: 1:7cf8cfea66e4 tip
66 1
66 1
67 branch: default
67 branch: default
68 commit: (clean)
68 commit: (clean)
69 update: (current)
69 update: (current)
70
70
71 commands that require a clean repo should respect subrepos
71 commands that require a clean repo should respect subrepos
72
72
73 $ echo b >> s/a
73 $ echo b >> s/a
74 $ hg backout tip
74 $ hg backout tip
75 abort: uncommitted changes in subrepo s
75 abort: uncommitted changes in subrepo s
76 [255]
76 [255]
77 $ hg revert -C -R s s/a
77 $ hg revert -C -R s s/a
78
78
79 add sub sub
79 add sub sub
80
80
81 $ echo ss = ss > s/.hgsub
81 $ echo ss = ss > s/.hgsub
82 $ hg init s/ss
82 $ hg init s/ss
83 $ echo a > s/ss/a
83 $ echo a > s/ss/a
84 $ hg -R s add s/.hgsub
84 $ hg -R s add s/.hgsub
85 $ hg -R s/ss add s/ss/a
85 $ hg -R s/ss add s/ss/a
86 $ hg sum
86 $ hg sum
87 parent: 1:7cf8cfea66e4 tip
87 parent: 1:7cf8cfea66e4 tip
88 1
88 1
89 branch: default
89 branch: default
90 commit: 1 subrepos
90 commit: 1 subrepos
91 update: (current)
91 update: (current)
92 $ hg ci -m2
92 $ hg ci -m2
93 committing subrepository s
93 committing subrepository s
94 committing subrepository s/ss (glob)
94 committing subrepository s/ss (glob)
95 $ hg sum
95 $ hg sum
96 parent: 2:df30734270ae tip
96 parent: 2:df30734270ae tip
97 2
97 2
98 branch: default
98 branch: default
99 commit: (clean)
99 commit: (clean)
100 update: (current)
100 update: (current)
101
101
102 bump sub rev (and check it is ignored by ui.commitsubrepos)
102 bump sub rev (and check it is ignored by ui.commitsubrepos)
103
103
104 $ echo b > s/a
104 $ echo b > s/a
105 $ hg -R s ci -ms1
105 $ hg -R s ci -ms1
106 $ hg --config ui.commitsubrepos=no ci -m3
106 $ hg --config ui.commitsubrepos=no ci -m3
107
107
108 leave sub dirty (and check ui.commitsubrepos=no aborts the commit)
108 leave sub dirty (and check ui.commitsubrepos=no aborts the commit)
109
109
110 $ echo c > s/a
110 $ echo c > s/a
111 $ hg --config ui.commitsubrepos=no ci -m4
111 $ hg --config ui.commitsubrepos=no ci -m4
112 abort: uncommitted changes in subrepo s
112 abort: uncommitted changes in subrepo s
113 (use --subrepos for recursive commit)
113 (use --subrepos for recursive commit)
114 [255]
114 [255]
115 $ hg id
115 $ hg id
116 f6affe3fbfaa+ tip
116 f6affe3fbfaa+ tip
117 $ hg -R s ci -mc
117 $ hg -R s ci -mc
118 $ hg id
118 $ hg id
119 f6affe3fbfaa+ tip
119 f6affe3fbfaa+ tip
120 $ echo d > s/a
120 $ echo d > s/a
121 $ hg ci -m4
121 $ hg ci -m4
122 committing subrepository s
122 committing subrepository s
123 $ hg tip -R s
123 $ hg tip -R s
124 changeset: 4:02dcf1d70411
124 changeset: 4:02dcf1d70411
125 tag: tip
125 tag: tip
126 user: test
126 user: test
127 date: Thu Jan 01 00:00:00 1970 +0000
127 date: Thu Jan 01 00:00:00 1970 +0000
128 summary: 4
128 summary: 4
129
129
130
130
131 check caching
131 check caching
132
132
133 $ hg co 0
133 $ hg co 0
134 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
134 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
135 $ hg debugsub
135 $ hg debugsub
136
136
137 restore
137 restore
138
138
139 $ hg co
139 $ hg co
140 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
140 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
141 $ hg debugsub
141 $ hg debugsub
142 path s
142 path s
143 source s
143 source s
144 revision 02dcf1d704118aee3ee306ccfa1910850d5b05ef
144 revision 02dcf1d704118aee3ee306ccfa1910850d5b05ef
145
145
146 new branch for merge tests
146 new branch for merge tests
147
147
148 $ hg co 1
148 $ hg co 1
149 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
149 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
150 $ echo t = t >> .hgsub
150 $ echo t = t >> .hgsub
151 $ hg init t
151 $ hg init t
152 $ echo t > t/t
152 $ echo t > t/t
153 $ hg -R t add t
153 $ hg -R t add t
154 adding t/t (glob)
154 adding t/t (glob)
155
155
156 5
156 5
157
157
158 $ hg ci -m5 # add sub
158 $ hg ci -m5 # add sub
159 committing subrepository t
159 committing subrepository t
160 created new head
160 created new head
161 $ echo t2 > t/t
161 $ echo t2 > t/t
162
162
163 6
163 6
164
164
165 $ hg st -R s
165 $ hg st -R s
166 $ hg ci -m6 # change sub
166 $ hg ci -m6 # change sub
167 committing subrepository t
167 committing subrepository t
168 $ hg debugsub
168 $ hg debugsub
169 path s
169 path s
170 source s
170 source s
171 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
171 revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4
172 path t
172 path t
173 source t
173 source t
174 revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad
174 revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad
175 $ echo t3 > t/t
175 $ echo t3 > t/t
176
176
177 7
177 7
178
178
179 $ hg ci -m7 # change sub again for conflict test
179 $ hg ci -m7 # change sub again for conflict test
180 committing subrepository t
180 committing subrepository t
181 $ hg rm .hgsub
181 $ hg rm .hgsub
182
182
183 8
183 8
184
184
185 $ hg ci -m8 # remove sub
185 $ hg ci -m8 # remove sub
186
186
187 merge tests
187 merge tests
188
188
189 $ hg co -C 3
189 $ hg co -C 3
190 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
190 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
191 $ hg merge 5 # test adding
191 $ hg merge 5 # test adding
192 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
192 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
193 (branch merge, don't forget to commit)
193 (branch merge, don't forget to commit)
194 $ hg debugsub
194 $ hg debugsub
195 path s
195 path s
196 source s
196 source s
197 revision fc627a69481fcbe5f1135069e8a3881c023e4cf5
197 revision fc627a69481fcbe5f1135069e8a3881c023e4cf5
198 path t
198 path t
199 source t
199 source t
200 revision 60ca1237c19474e7a3978b0dc1ca4e6f36d51382
200 revision 60ca1237c19474e7a3978b0dc1ca4e6f36d51382
201 $ hg ci -m9
201 $ hg ci -m9
202 created new head
202 created new head
203 $ hg merge 6 --debug # test change
203 $ hg merge 6 --debug # test change
204 searching for copies back to rev 2
204 searching for copies back to rev 2
205 resolving manifests
205 resolving manifests
206 branchmerge: True, force: False, partial: False
206 branchmerge: True, force: False, partial: False
207 ancestor: 1f14a2e2d3ec, local: f0d2028bf86d+, remote: 1831e14459c4
207 ancestor: 1f14a2e2d3ec, local: f0d2028bf86d+, remote: 1831e14459c4
208 .hgsubstate: versions differ -> m
208 .hgsubstate: versions differ -> m
209 updating: .hgsubstate 1/1 files (100.00%)
209 updating: .hgsubstate 1/1 files (100.00%)
210 subrepo merge f0d2028bf86d+ 1831e14459c4 1f14a2e2d3ec
210 subrepo merge f0d2028bf86d+ 1831e14459c4 1f14a2e2d3ec
211 subrepo t: other changed, get t:6747d179aa9a688023c4b0cad32e4c92bb7f34ad:hg
211 subrepo t: other changed, get t:6747d179aa9a688023c4b0cad32e4c92bb7f34ad:hg
212 getting subrepo t
212 getting subrepo t
213 resolving manifests
213 resolving manifests
214 branchmerge: False, force: False, partial: False
214 branchmerge: False, force: False, partial: False
215 ancestor: 60ca1237c194, local: 60ca1237c194+, remote: 6747d179aa9a
215 ancestor: 60ca1237c194, local: 60ca1237c194+, remote: 6747d179aa9a
216 t: remote is newer -> g
216 t: remote is newer -> g
217 getting t
217 getting t
218 updating: t 1/1 files (100.00%)
218 updating: t 1/1 files (100.00%)
219 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
219 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
220 (branch merge, don't forget to commit)
220 (branch merge, don't forget to commit)
221 $ hg debugsub
221 $ hg debugsub
222 path s
222 path s
223 source s
223 source s
224 revision fc627a69481fcbe5f1135069e8a3881c023e4cf5
224 revision fc627a69481fcbe5f1135069e8a3881c023e4cf5
225 path t
225 path t
226 source t
226 source t
227 revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad
227 revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad
228 $ echo conflict > t/t
228 $ echo conflict > t/t
229 $ hg ci -m10
229 $ hg ci -m10
230 committing subrepository t
230 committing subrepository t
231 $ HGMERGE=internal:merge hg merge --debug 7 # test conflict
231 $ HGMERGE=internal:merge hg merge --debug 7 # test conflict
232 searching for copies back to rev 2
232 searching for copies back to rev 2
233 resolving manifests
233 resolving manifests
234 branchmerge: True, force: False, partial: False
234 branchmerge: True, force: False, partial: False
235 ancestor: 1831e14459c4, local: e45c8b14af55+, remote: f94576341bcf
235 ancestor: 1831e14459c4, local: e45c8b14af55+, remote: f94576341bcf
236 .hgsubstate: versions differ -> m
236 .hgsubstate: versions differ -> m
237 updating: .hgsubstate 1/1 files (100.00%)
237 updating: .hgsubstate 1/1 files (100.00%)
238 subrepo merge e45c8b14af55+ f94576341bcf 1831e14459c4
238 subrepo merge e45c8b14af55+ f94576341bcf 1831e14459c4
239 subrepo t: both sides changed, merge with t:7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4:hg
239 subrepo t: both sides changed, merge with t:7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4:hg
240 merging subrepo t
240 merging subrepo t
241 searching for copies back to rev 2
241 searching for copies back to rev 2
242 resolving manifests
242 resolving manifests
243 branchmerge: True, force: False, partial: False
243 branchmerge: True, force: False, partial: False
244 ancestor: 6747d179aa9a, local: 20a0db6fbf6c+, remote: 7af322bc1198
244 ancestor: 6747d179aa9a, local: 20a0db6fbf6c+, remote: 7af322bc1198
245 t: versions differ -> m
245 t: versions differ -> m
246 preserving t for resolve of t
246 preserving t for resolve of t
247 updating: t 1/1 files (100.00%)
247 updating: t 1/1 files (100.00%)
248 picked tool 'internal:merge' for t (binary False symlink False)
248 picked tool 'internal:merge' for t (binary False symlink False)
249 merging t
249 merging t
250 my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a
250 my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a
251 warning: conflicts during merge.
251 warning: conflicts during merge.
252 merging t incomplete! (edit conflicts, then use 'hg resolve --mark')
252 merging t incomplete! (edit conflicts, then use 'hg resolve --mark')
253 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
253 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
254 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
254 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
255 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
255 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
256 (branch merge, don't forget to commit)
256 (branch merge, don't forget to commit)
257
257
258 should conflict
258 should conflict
259
259
260 $ cat t/t
260 $ cat t/t
261 <<<<<<< local
261 <<<<<<< local
262 conflict
262 conflict
263 =======
263 =======
264 t3
264 t3
265 >>>>>>> other
265 >>>>>>> other
266
266
267 clone
267 clone
268
268
269 $ cd ..
269 $ cd ..
270 $ hg clone t tc
270 $ hg clone t tc
271 updating to branch default
271 updating to branch default
272 cloning subrepo s from $TESTTMP/t/s
272 cloning subrepo s from $TESTTMP/t/s
273 cloning subrepo s/ss from $TESTTMP/t/s/ss (glob)
273 cloning subrepo s/ss from $TESTTMP/t/s/ss (glob)
274 cloning subrepo t from $TESTTMP/t/t
274 cloning subrepo t from $TESTTMP/t/t
275 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
275 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
276 $ cd tc
276 $ cd tc
277 $ hg debugsub
277 $ hg debugsub
278 path s
278 path s
279 source s
279 source s
280 revision fc627a69481fcbe5f1135069e8a3881c023e4cf5
280 revision fc627a69481fcbe5f1135069e8a3881c023e4cf5
281 path t
281 path t
282 source t
282 source t
283 revision 20a0db6fbf6c3d2836e6519a642ae929bfc67c0e
283 revision 20a0db6fbf6c3d2836e6519a642ae929bfc67c0e
284
284
285 push
285 push
286
286
287 $ echo bah > t/t
287 $ echo bah > t/t
288 $ hg ci -m11
288 $ hg ci -m11
289 committing subrepository t
289 committing subrepository t
290 $ hg push
290 $ hg push
291 pushing to $TESTTMP/t (glob)
291 pushing to $TESTTMP/t (glob)
292 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
292 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
293 no changes made to subrepo s since last push to $TESTTMP/t/s
293 no changes made to subrepo s since last push to $TESTTMP/t/s
294 pushing subrepo t to $TESTTMP/t/t
294 pushing subrepo t to $TESTTMP/t/t
295 searching for changes
295 searching for changes
296 adding changesets
296 adding changesets
297 adding manifests
297 adding manifests
298 adding file changes
298 adding file changes
299 added 1 changesets with 1 changes to 1 files
299 added 1 changesets with 1 changes to 1 files
300 searching for changes
300 searching for changes
301 adding changesets
301 adding changesets
302 adding manifests
302 adding manifests
303 adding file changes
303 adding file changes
304 added 1 changesets with 1 changes to 1 files
304 added 1 changesets with 1 changes to 1 files
305
305
306 push -f
306 push -f
307
307
308 $ echo bah > s/a
308 $ echo bah > s/a
309 $ hg ci -m12
309 $ hg ci -m12
310 committing subrepository s
310 committing subrepository s
311 $ hg push
311 $ hg push
312 pushing to $TESTTMP/t (glob)
312 pushing to $TESTTMP/t (glob)
313 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
313 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
314 pushing subrepo s to $TESTTMP/t/s
314 pushing subrepo s to $TESTTMP/t/s
315 searching for changes
315 searching for changes
316 abort: push creates new remote head 12a213df6fa9! (in subrepo s)
316 abort: push creates new remote head 12a213df6fa9! (in subrepo s)
317 (did you forget to merge? use push -f to force)
317 (did you forget to merge? use push -f to force)
318 [255]
318 [255]
319 $ hg push -f
319 $ hg push -f
320 pushing to $TESTTMP/t (glob)
320 pushing to $TESTTMP/t (glob)
321 pushing subrepo s/ss to $TESTTMP/t/s/ss (glob)
321 pushing subrepo s/ss to $TESTTMP/t/s/ss (glob)
322 searching for changes
322 searching for changes
323 no changes found
323 no changes found
324 pushing subrepo s to $TESTTMP/t/s
324 pushing subrepo s to $TESTTMP/t/s
325 searching for changes
325 searching for changes
326 adding changesets
326 adding changesets
327 adding manifests
327 adding manifests
328 adding file changes
328 adding file changes
329 added 1 changesets with 1 changes to 1 files (+1 heads)
329 added 1 changesets with 1 changes to 1 files (+1 heads)
330 pushing subrepo t to $TESTTMP/t/t
330 pushing subrepo t to $TESTTMP/t/t
331 searching for changes
331 searching for changes
332 no changes found
332 no changes found
333 searching for changes
333 searching for changes
334 adding changesets
334 adding changesets
335 adding manifests
335 adding manifests
336 adding file changes
336 adding file changes
337 added 1 changesets with 1 changes to 1 files
337 added 1 changesets with 1 changes to 1 files
338
338
339 check that unmodified subrepos are not pushed
339 check that unmodified subrepos are not pushed
340
340
341 $ hg clone . ../tcc
341 $ hg clone . ../tcc
342 updating to branch default
342 updating to branch default
343 cloning subrepo s from $TESTTMP/tc/s
343 cloning subrepo s from $TESTTMP/tc/s
344 cloning subrepo s/ss from $TESTTMP/tc/s/ss (glob)
344 cloning subrepo s/ss from $TESTTMP/tc/s/ss (glob)
345 cloning subrepo t from $TESTTMP/tc/t
345 cloning subrepo t from $TESTTMP/tc/t
346 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
346 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
347
347
348 the subrepos on the new clone have nothing to push to its source
348 the subrepos on the new clone have nothing to push to its source
349
349
350 $ hg push -R ../tcc .
350 $ hg push -R ../tcc .
351 pushing to .
351 pushing to .
352 no changes made to subrepo s/ss since last push to s/ss (glob)
352 no changes made to subrepo s/ss since last push to s/ss (glob)
353 no changes made to subrepo s since last push to s
353 no changes made to subrepo s since last push to s
354 no changes made to subrepo t since last push to t
354 no changes made to subrepo t since last push to t
355 searching for changes
355 searching for changes
356 no changes found
356 no changes found
357 [1]
357 [1]
358
358
359 the subrepos on the source do not have a clean store versus the clone target
359 the subrepos on the source do not have a clean store versus the clone target
360 because they were never explicitly pushed to the source
360 because they were never explicitly pushed to the source
361
361
362 $ hg push ../tcc
362 $ hg push ../tcc
363 pushing to ../tcc
363 pushing to ../tcc
364 pushing subrepo s/ss to ../tcc/s/ss (glob)
364 pushing subrepo s/ss to ../tcc/s/ss (glob)
365 searching for changes
365 searching for changes
366 no changes found
366 no changes found
367 pushing subrepo s to ../tcc/s
367 pushing subrepo s to ../tcc/s
368 searching for changes
368 searching for changes
369 no changes found
369 no changes found
370 pushing subrepo t to ../tcc/t
370 pushing subrepo t to ../tcc/t
371 searching for changes
371 searching for changes
372 no changes found
372 no changes found
373 searching for changes
373 searching for changes
374 no changes found
374 no changes found
375 [1]
375 [1]
376
376
377 after push their stores become clean
377 after push their stores become clean
378
378
379 $ hg push ../tcc
379 $ hg push ../tcc
380 pushing to ../tcc
380 pushing to ../tcc
381 no changes made to subrepo s/ss since last push to ../tcc/s/ss (glob)
381 no changes made to subrepo s/ss since last push to ../tcc/s/ss (glob)
382 no changes made to subrepo s since last push to ../tcc/s
382 no changes made to subrepo s since last push to ../tcc/s
383 no changes made to subrepo t since last push to ../tcc/t
383 no changes made to subrepo t since last push to ../tcc/t
384 searching for changes
384 searching for changes
385 no changes found
385 no changes found
386 [1]
386 [1]
387
387
388 updating a subrepo to a different revision or changing
388 updating a subrepo to a different revision or changing
389 its working directory does not make its store dirty
389 its working directory does not make its store dirty
390
390
391 $ hg -R s update '.^'
391 $ hg -R s update '.^'
392 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
392 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
393 $ hg push
393 $ hg push
394 pushing to $TESTTMP/t
394 pushing to $TESTTMP/t
395 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
395 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
396 no changes made to subrepo s since last push to $TESTTMP/t/s
396 no changes made to subrepo s since last push to $TESTTMP/t/s
397 no changes made to subrepo t since last push to $TESTTMP/t/t
397 no changes made to subrepo t since last push to $TESTTMP/t/t
398 searching for changes
398 searching for changes
399 no changes found
399 no changes found
400 [1]
400 [1]
401 $ echo foo >> s/a
401 $ echo foo >> s/a
402 $ hg push
402 $ hg push
403 pushing to $TESTTMP/t
403 pushing to $TESTTMP/t
404 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
404 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
405 no changes made to subrepo s since last push to $TESTTMP/t/s
405 no changes made to subrepo s since last push to $TESTTMP/t/s
406 no changes made to subrepo t since last push to $TESTTMP/t/t
406 no changes made to subrepo t since last push to $TESTTMP/t/t
407 searching for changes
407 searching for changes
408 no changes found
408 no changes found
409 [1]
409 [1]
410 $ hg -R s update -C tip
410 $ hg -R s update -C tip
411 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
411 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
412
412
413 committing into a subrepo makes its store (but not its parent's store) dirty
413 committing into a subrepo makes its store (but not its parent's store) dirty
414
414
415 $ echo foo >> s/ss/a
415 $ echo foo >> s/ss/a
416 $ hg -R s/ss commit -m 'test dirty store detection'
416 $ hg -R s/ss commit -m 'test dirty store detection'
417 $ hg push
417 $ hg push
418 pushing to $TESTTMP/t
418 pushing to $TESTTMP/t
419 pushing subrepo s/ss to $TESTTMP/t/s/ss (glob)
419 pushing subrepo s/ss to $TESTTMP/t/s/ss (glob)
420 searching for changes
420 searching for changes
421 adding changesets
421 adding changesets
422 adding manifests
422 adding manifests
423 adding file changes
423 adding file changes
424 added 1 changesets with 1 changes to 1 files
424 added 1 changesets with 1 changes to 1 files
425 no changes made to subrepo s since last push to $TESTTMP/t/s
425 no changes made to subrepo s since last push to $TESTTMP/t/s
426 no changes made to subrepo t since last push to $TESTTMP/t/t
426 no changes made to subrepo t since last push to $TESTTMP/t/t
427 searching for changes
427 searching for changes
428 no changes found
428 no changes found
429 [1]
429 [1]
430
430
431 a subrepo store may be clean versus one repo but not versus another
431 a subrepo store may be clean versus one repo but not versus another
432
432
433 $ hg push
433 $ hg push
434 pushing to $TESTTMP/t
434 pushing to $TESTTMP/t
435 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
435 no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob)
436 no changes made to subrepo s since last push to $TESTTMP/t/s
436 no changes made to subrepo s since last push to $TESTTMP/t/s
437 no changes made to subrepo t since last push to $TESTTMP/t/t
437 no changes made to subrepo t since last push to $TESTTMP/t/t
438 searching for changes
438 searching for changes
439 no changes found
439 no changes found
440 [1]
440 [1]
441 $ hg push ../tcc
441 $ hg push ../tcc
442 pushing to ../tcc
442 pushing to ../tcc
443 pushing subrepo s/ss to ../tcc/s/ss
443 pushing subrepo s/ss to ../tcc/s/ss (glob)
444 searching for changes
444 searching for changes
445 adding changesets
445 adding changesets
446 adding manifests
446 adding manifests
447 adding file changes
447 adding file changes
448 added 1 changesets with 1 changes to 1 files
448 added 1 changesets with 1 changes to 1 files
449 no changes made to subrepo s since last push to ../tcc/s
449 no changes made to subrepo s since last push to ../tcc/s
450 no changes made to subrepo t since last push to ../tcc/t
450 no changes made to subrepo t since last push to ../tcc/t
451 searching for changes
451 searching for changes
452 no changes found
452 no changes found
453 [1]
453 [1]
454
454
455 update
455 update
456
456
457 $ cd ../t
457 $ cd ../t
458 $ hg up -C # discard our earlier merge
458 $ hg up -C # discard our earlier merge
459 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
459 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
460 $ echo blah > t/t
460 $ echo blah > t/t
461 $ hg ci -m13
461 $ hg ci -m13
462 committing subrepository t
462 committing subrepository t
463
463
464 backout calls revert internally with minimal opts, which should not raise
464 backout calls revert internally with minimal opts, which should not raise
465 KeyError
465 KeyError
466
466
467 $ hg backout ".^"
467 $ hg backout ".^"
468 reverting .hgsubstate
468 reverting .hgsubstate
469 reverting subrepo s
469 reverting subrepo s
470 reverting s/a (glob)
470 reverting s/a (glob)
471 reverting subrepo ss
471 reverting subrepo ss
472 reverting subrepo t
472 reverting subrepo t
473 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
473 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
474
474
475 $ hg up -C # discard changes
475 $ hg up -C # discard changes
476 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
476 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
477
477
478 pull
478 pull
479
479
480 $ cd ../tc
480 $ cd ../tc
481 $ hg pull
481 $ hg pull
482 pulling from $TESTTMP/t (glob)
482 pulling from $TESTTMP/t (glob)
483 searching for changes
483 searching for changes
484 adding changesets
484 adding changesets
485 adding manifests
485 adding manifests
486 adding file changes
486 adding file changes
487 added 1 changesets with 1 changes to 1 files
487 added 1 changesets with 1 changes to 1 files
488 (run 'hg update' to get a working copy)
488 (run 'hg update' to get a working copy)
489
489
490 should pull t
490 should pull t
491
491
492 $ hg up
492 $ hg up
493 pulling subrepo t from $TESTTMP/t/t
493 pulling subrepo t from $TESTTMP/t/t
494 searching for changes
494 searching for changes
495 adding changesets
495 adding changesets
496 adding manifests
496 adding manifests
497 adding file changes
497 adding file changes
498 added 1 changesets with 1 changes to 1 files
498 added 1 changesets with 1 changes to 1 files
499 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
499 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
500 $ cat t/t
500 $ cat t/t
501 blah
501 blah
502
502
503 bogus subrepo path aborts
503 bogus subrepo path aborts
504
504
505 $ echo 'bogus=[boguspath' >> .hgsub
505 $ echo 'bogus=[boguspath' >> .hgsub
506 $ hg ci -m 'bogus subrepo path'
506 $ hg ci -m 'bogus subrepo path'
507 abort: missing ] in subrepo source
507 abort: missing ] in subrepo source
508 [255]
508 [255]
509
509
510 Issue1986: merge aborts when trying to merge a subrepo that
510 Issue1986: merge aborts when trying to merge a subrepo that
511 shouldn't need merging
511 shouldn't need merging
512
512
513 # subrepo layout
513 # subrepo layout
514 #
514 #
515 # o 5 br
515 # o 5 br
516 # /|
516 # /|
517 # o | 4 default
517 # o | 4 default
518 # | |
518 # | |
519 # | o 3 br
519 # | o 3 br
520 # |/|
520 # |/|
521 # o | 2 default
521 # o | 2 default
522 # | |
522 # | |
523 # | o 1 br
523 # | o 1 br
524 # |/
524 # |/
525 # o 0 default
525 # o 0 default
526
526
527 $ cd ..
527 $ cd ..
528 $ rm -rf sub
528 $ rm -rf sub
529 $ hg init main
529 $ hg init main
530 $ cd main
530 $ cd main
531 $ hg init s
531 $ hg init s
532 $ cd s
532 $ cd s
533 $ echo a > a
533 $ echo a > a
534 $ hg ci -Am1
534 $ hg ci -Am1
535 adding a
535 adding a
536 $ hg branch br
536 $ hg branch br
537 marked working directory as branch br
537 marked working directory as branch br
538 (branches are permanent and global, did you want a bookmark?)
538 (branches are permanent and global, did you want a bookmark?)
539 $ echo a >> a
539 $ echo a >> a
540 $ hg ci -m1
540 $ hg ci -m1
541 $ hg up default
541 $ hg up default
542 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
542 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
543 $ echo b > b
543 $ echo b > b
544 $ hg ci -Am1
544 $ hg ci -Am1
545 adding b
545 adding b
546 $ hg up br
546 $ hg up br
547 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
547 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
548 $ hg merge tip
548 $ hg merge tip
549 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
549 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
550 (branch merge, don't forget to commit)
550 (branch merge, don't forget to commit)
551 $ hg ci -m1
551 $ hg ci -m1
552 $ hg up 2
552 $ hg up 2
553 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
553 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
554 $ echo c > c
554 $ echo c > c
555 $ hg ci -Am1
555 $ hg ci -Am1
556 adding c
556 adding c
557 $ hg up 3
557 $ hg up 3
558 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
558 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
559 $ hg merge 4
559 $ hg merge 4
560 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
560 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
561 (branch merge, don't forget to commit)
561 (branch merge, don't forget to commit)
562 $ hg ci -m1
562 $ hg ci -m1
563
563
564 # main repo layout:
564 # main repo layout:
565 #
565 #
566 # * <-- try to merge default into br again
566 # * <-- try to merge default into br again
567 # .`|
567 # .`|
568 # . o 5 br --> substate = 5
568 # . o 5 br --> substate = 5
569 # . |
569 # . |
570 # o | 4 default --> substate = 4
570 # o | 4 default --> substate = 4
571 # | |
571 # | |
572 # | o 3 br --> substate = 2
572 # | o 3 br --> substate = 2
573 # |/|
573 # |/|
574 # o | 2 default --> substate = 2
574 # o | 2 default --> substate = 2
575 # | |
575 # | |
576 # | o 1 br --> substate = 3
576 # | o 1 br --> substate = 3
577 # |/
577 # |/
578 # o 0 default --> substate = 2
578 # o 0 default --> substate = 2
579
579
580 $ cd ..
580 $ cd ..
581 $ echo 's = s' > .hgsub
581 $ echo 's = s' > .hgsub
582 $ hg -R s up 2
582 $ hg -R s up 2
583 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
583 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
584 $ hg ci -Am1
584 $ hg ci -Am1
585 adding .hgsub
585 adding .hgsub
586 $ hg branch br
586 $ hg branch br
587 marked working directory as branch br
587 marked working directory as branch br
588 (branches are permanent and global, did you want a bookmark?)
588 (branches are permanent and global, did you want a bookmark?)
589 $ echo b > b
589 $ echo b > b
590 $ hg -R s up 3
590 $ hg -R s up 3
591 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
591 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
592 $ hg ci -Am1
592 $ hg ci -Am1
593 adding b
593 adding b
594 $ hg up default
594 $ hg up default
595 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
595 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
596 $ echo c > c
596 $ echo c > c
597 $ hg ci -Am1
597 $ hg ci -Am1
598 adding c
598 adding c
599 $ hg up 1
599 $ hg up 1
600 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
600 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
601 $ hg merge 2
601 $ hg merge 2
602 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
602 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
603 (branch merge, don't forget to commit)
603 (branch merge, don't forget to commit)
604 $ hg ci -m1
604 $ hg ci -m1
605 $ hg up 2
605 $ hg up 2
606 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
606 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
607 $ hg -R s up 4
607 $ hg -R s up 4
608 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
608 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
609 $ echo d > d
609 $ echo d > d
610 $ hg ci -Am1
610 $ hg ci -Am1
611 adding d
611 adding d
612 $ hg up 3
612 $ hg up 3
613 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
613 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
614 $ hg -R s up 5
614 $ hg -R s up 5
615 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
615 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
616 $ echo e > e
616 $ echo e > e
617 $ hg ci -Am1
617 $ hg ci -Am1
618 adding e
618 adding e
619
619
620 $ hg up 5
620 $ hg up 5
621 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
621 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
622 $ hg merge 4 # try to merge default into br again
622 $ hg merge 4 # try to merge default into br again
623 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
623 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
624 (branch merge, don't forget to commit)
624 (branch merge, don't forget to commit)
625 $ cd ..
625 $ cd ..
626
626
627 test subrepo delete from .hgsubstate
627 test subrepo delete from .hgsubstate
628
628
629 $ hg init testdelete
629 $ hg init testdelete
630 $ mkdir testdelete/nested testdelete/nested2
630 $ mkdir testdelete/nested testdelete/nested2
631 $ hg init testdelete/nested
631 $ hg init testdelete/nested
632 $ hg init testdelete/nested2
632 $ hg init testdelete/nested2
633 $ echo test > testdelete/nested/foo
633 $ echo test > testdelete/nested/foo
634 $ echo test > testdelete/nested2/foo
634 $ echo test > testdelete/nested2/foo
635 $ hg -R testdelete/nested add
635 $ hg -R testdelete/nested add
636 adding testdelete/nested/foo (glob)
636 adding testdelete/nested/foo (glob)
637 $ hg -R testdelete/nested2 add
637 $ hg -R testdelete/nested2 add
638 adding testdelete/nested2/foo (glob)
638 adding testdelete/nested2/foo (glob)
639 $ hg -R testdelete/nested ci -m test
639 $ hg -R testdelete/nested ci -m test
640 $ hg -R testdelete/nested2 ci -m test
640 $ hg -R testdelete/nested2 ci -m test
641 $ echo nested = nested > testdelete/.hgsub
641 $ echo nested = nested > testdelete/.hgsub
642 $ echo nested2 = nested2 >> testdelete/.hgsub
642 $ echo nested2 = nested2 >> testdelete/.hgsub
643 $ hg -R testdelete add
643 $ hg -R testdelete add
644 adding testdelete/.hgsub (glob)
644 adding testdelete/.hgsub (glob)
645 $ hg -R testdelete ci -m "nested 1 & 2 added"
645 $ hg -R testdelete ci -m "nested 1 & 2 added"
646 $ echo nested = nested > testdelete/.hgsub
646 $ echo nested = nested > testdelete/.hgsub
647 $ hg -R testdelete ci -m "nested 2 deleted"
647 $ hg -R testdelete ci -m "nested 2 deleted"
648 $ cat testdelete/.hgsubstate
648 $ cat testdelete/.hgsubstate
649 bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested
649 bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested
650 $ hg -R testdelete remove testdelete/.hgsub
650 $ hg -R testdelete remove testdelete/.hgsub
651 $ hg -R testdelete ci -m ".hgsub deleted"
651 $ hg -R testdelete ci -m ".hgsub deleted"
652 $ cat testdelete/.hgsubstate
652 $ cat testdelete/.hgsubstate
653 bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested
653 bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested
654
654
655 test repository cloning
655 test repository cloning
656
656
657 $ mkdir mercurial mercurial2
657 $ mkdir mercurial mercurial2
658 $ hg init nested_absolute
658 $ hg init nested_absolute
659 $ echo test > nested_absolute/foo
659 $ echo test > nested_absolute/foo
660 $ hg -R nested_absolute add
660 $ hg -R nested_absolute add
661 adding nested_absolute/foo (glob)
661 adding nested_absolute/foo (glob)
662 $ hg -R nested_absolute ci -mtest
662 $ hg -R nested_absolute ci -mtest
663 $ cd mercurial
663 $ cd mercurial
664 $ hg init nested_relative
664 $ hg init nested_relative
665 $ echo test2 > nested_relative/foo2
665 $ echo test2 > nested_relative/foo2
666 $ hg -R nested_relative add
666 $ hg -R nested_relative add
667 adding nested_relative/foo2 (glob)
667 adding nested_relative/foo2 (glob)
668 $ hg -R nested_relative ci -mtest2
668 $ hg -R nested_relative ci -mtest2
669 $ hg init main
669 $ hg init main
670 $ echo "nested_relative = ../nested_relative" > main/.hgsub
670 $ echo "nested_relative = ../nested_relative" > main/.hgsub
671 $ echo "nested_absolute = `pwd`/nested_absolute" >> main/.hgsub
671 $ echo "nested_absolute = `pwd`/nested_absolute" >> main/.hgsub
672 $ hg -R main add
672 $ hg -R main add
673 adding main/.hgsub (glob)
673 adding main/.hgsub (glob)
674 $ hg -R main ci -m "add subrepos"
674 $ hg -R main ci -m "add subrepos"
675 $ cd ..
675 $ cd ..
676 $ hg clone mercurial/main mercurial2/main
676 $ hg clone mercurial/main mercurial2/main
677 updating to branch default
677 updating to branch default
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 $ cat mercurial2/main/nested_absolute/.hg/hgrc \
679 $ cat mercurial2/main/nested_absolute/.hg/hgrc \
680 > mercurial2/main/nested_relative/.hg/hgrc
680 > mercurial2/main/nested_relative/.hg/hgrc
681 [paths]
681 [paths]
682 default = $TESTTMP/mercurial/nested_absolute
682 default = $TESTTMP/mercurial/nested_absolute
683 [paths]
683 [paths]
684 default = $TESTTMP/mercurial/nested_relative
684 default = $TESTTMP/mercurial/nested_relative
685 $ rm -rf mercurial mercurial2
685 $ rm -rf mercurial mercurial2
686
686
687 Issue1977: multirepo push should fail if subrepo push fails
687 Issue1977: multirepo push should fail if subrepo push fails
688
688
689 $ hg init repo
689 $ hg init repo
690 $ hg init repo/s
690 $ hg init repo/s
691 $ echo a > repo/s/a
691 $ echo a > repo/s/a
692 $ hg -R repo/s ci -Am0
692 $ hg -R repo/s ci -Am0
693 adding a
693 adding a
694 $ echo s = s > repo/.hgsub
694 $ echo s = s > repo/.hgsub
695 $ hg -R repo ci -Am1
695 $ hg -R repo ci -Am1
696 adding .hgsub
696 adding .hgsub
697 $ hg clone repo repo2
697 $ hg clone repo repo2
698 updating to branch default
698 updating to branch default
699 cloning subrepo s from $TESTTMP/repo/s
699 cloning subrepo s from $TESTTMP/repo/s
700 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
700 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
701 $ hg -q -R repo2 pull -u
701 $ hg -q -R repo2 pull -u
702 $ echo 1 > repo2/s/a
702 $ echo 1 > repo2/s/a
703 $ hg -R repo2/s ci -m2
703 $ hg -R repo2/s ci -m2
704 $ hg -q -R repo2/s push
704 $ hg -q -R repo2/s push
705 $ hg -R repo2/s up -C 0
705 $ hg -R repo2/s up -C 0
706 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
706 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
707 $ echo 2 > repo2/s/b
707 $ echo 2 > repo2/s/b
708 $ hg -R repo2/s ci -m3 -A
708 $ hg -R repo2/s ci -m3 -A
709 adding b
709 adding b
710 created new head
710 created new head
711 $ hg -R repo2 ci -m3
711 $ hg -R repo2 ci -m3
712 $ hg -q -R repo2 push
712 $ hg -q -R repo2 push
713 abort: push creates new remote head cc505f09a8b2! (in subrepo s)
713 abort: push creates new remote head cc505f09a8b2! (in subrepo s)
714 (did you forget to merge? use push -f to force)
714 (did you forget to merge? use push -f to force)
715 [255]
715 [255]
716 $ hg -R repo update
716 $ hg -R repo update
717 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
717 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
718
718
719 test if untracked file is not overwritten
719 test if untracked file is not overwritten
720
720
721 $ echo issue3276_ok > repo/s/b
721 $ echo issue3276_ok > repo/s/b
722 $ hg -R repo2 push -f -q
722 $ hg -R repo2 push -f -q
723 $ hg -R repo update
723 $ hg -R repo update
724 b: untracked file differs
724 b: untracked file differs
725 abort: untracked files in working directory differ from files in requested revision (in subrepo s)
725 abort: untracked files in working directory differ from files in requested revision (in subrepo s)
726 [255]
726 [255]
727
727
728 $ cat repo/s/b
728 $ cat repo/s/b
729 issue3276_ok
729 issue3276_ok
730 $ rm repo/s/b
730 $ rm repo/s/b
731 $ hg -R repo revert --all
731 $ hg -R repo revert --all
732 reverting repo/.hgsubstate (glob)
732 reverting repo/.hgsubstate (glob)
733 reverting subrepo s
733 reverting subrepo s
734 $ hg -R repo update
734 $ hg -R repo update
735 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
735 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
736 $ cat repo/s/b
736 $ cat repo/s/b
737 2
737 2
738 $ rm -rf repo2 repo
738 $ rm -rf repo2 repo
739
739
740
740
741 Issue1852 subrepos with relative paths always push/pull relative to default
741 Issue1852 subrepos with relative paths always push/pull relative to default
742
742
743 Prepare a repo with subrepo
743 Prepare a repo with subrepo
744
744
745 $ hg init issue1852a
745 $ hg init issue1852a
746 $ cd issue1852a
746 $ cd issue1852a
747 $ hg init sub/repo
747 $ hg init sub/repo
748 $ echo test > sub/repo/foo
748 $ echo test > sub/repo/foo
749 $ hg -R sub/repo add sub/repo/foo
749 $ hg -R sub/repo add sub/repo/foo
750 $ echo sub/repo = sub/repo > .hgsub
750 $ echo sub/repo = sub/repo > .hgsub
751 $ hg add .hgsub
751 $ hg add .hgsub
752 $ hg ci -mtest
752 $ hg ci -mtest
753 committing subrepository sub/repo (glob)
753 committing subrepository sub/repo (glob)
754 $ echo test >> sub/repo/foo
754 $ echo test >> sub/repo/foo
755 $ hg ci -mtest
755 $ hg ci -mtest
756 committing subrepository sub/repo (glob)
756 committing subrepository sub/repo (glob)
757 $ cd ..
757 $ cd ..
758
758
759 Create repo without default path, pull top repo, and see what happens on update
759 Create repo without default path, pull top repo, and see what happens on update
760
760
761 $ hg init issue1852b
761 $ hg init issue1852b
762 $ hg -R issue1852b pull issue1852a
762 $ hg -R issue1852b pull issue1852a
763 pulling from issue1852a
763 pulling from issue1852a
764 requesting all changes
764 requesting all changes
765 adding changesets
765 adding changesets
766 adding manifests
766 adding manifests
767 adding file changes
767 adding file changes
768 added 2 changesets with 3 changes to 2 files
768 added 2 changesets with 3 changes to 2 files
769 (run 'hg update' to get a working copy)
769 (run 'hg update' to get a working copy)
770 $ hg -R issue1852b update
770 $ hg -R issue1852b update
771 abort: default path for subrepository not found (in subrepo sub/repo) (glob)
771 abort: default path for subrepository not found (in subrepo sub/repo) (glob)
772 [255]
772 [255]
773
773
774 Ensure a full traceback, not just the SubrepoAbort part
774 Ensure a full traceback, not just the SubrepoAbort part
775
775
776 $ hg -R issue1852b update --traceback 2>&1 | grep 'raise util\.Abort'
776 $ hg -R issue1852b update --traceback 2>&1 | grep 'raise util\.Abort'
777 raise util.Abort(_("default path for subrepository not found"))
777 raise util.Abort(_("default path for subrepository not found"))
778
778
779 Pull -u now doesn't help
779 Pull -u now doesn't help
780
780
781 $ hg -R issue1852b pull -u issue1852a
781 $ hg -R issue1852b pull -u issue1852a
782 pulling from issue1852a
782 pulling from issue1852a
783 searching for changes
783 searching for changes
784 no changes found
784 no changes found
785
785
786 Try the same, but with pull -u
786 Try the same, but with pull -u
787
787
788 $ hg init issue1852c
788 $ hg init issue1852c
789 $ hg -R issue1852c pull -r0 -u issue1852a
789 $ hg -R issue1852c pull -r0 -u issue1852a
790 pulling from issue1852a
790 pulling from issue1852a
791 adding changesets
791 adding changesets
792 adding manifests
792 adding manifests
793 adding file changes
793 adding file changes
794 added 1 changesets with 2 changes to 2 files
794 added 1 changesets with 2 changes to 2 files
795 cloning subrepo sub/repo from issue1852a/sub/repo (glob)
795 cloning subrepo sub/repo from issue1852a/sub/repo (glob)
796 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
796 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
797
797
798 Try to push from the other side
798 Try to push from the other side
799
799
800 $ hg -R issue1852a push `pwd`/issue1852c
800 $ hg -R issue1852a push `pwd`/issue1852c
801 pushing to $TESTTMP/issue1852c
801 pushing to $TESTTMP/issue1852c
802 pushing subrepo sub/repo to $TESTTMP/issue1852c/sub/repo (glob)
802 pushing subrepo sub/repo to $TESTTMP/issue1852c/sub/repo (glob)
803 searching for changes
803 searching for changes
804 no changes found
804 no changes found
805 searching for changes
805 searching for changes
806 adding changesets
806 adding changesets
807 adding manifests
807 adding manifests
808 adding file changes
808 adding file changes
809 added 1 changesets with 1 changes to 1 files
809 added 1 changesets with 1 changes to 1 files
810
810
811 Incoming and outgoing should not use the default path:
811 Incoming and outgoing should not use the default path:
812
812
813 $ hg clone -q issue1852a issue1852d
813 $ hg clone -q issue1852a issue1852d
814 $ hg -R issue1852d outgoing --subrepos issue1852c
814 $ hg -R issue1852d outgoing --subrepos issue1852c
815 comparing with issue1852c
815 comparing with issue1852c
816 searching for changes
816 searching for changes
817 no changes found
817 no changes found
818 comparing with issue1852c/sub/repo
818 comparing with issue1852c/sub/repo
819 searching for changes
819 searching for changes
820 no changes found
820 no changes found
821 [1]
821 [1]
822 $ hg -R issue1852d incoming --subrepos issue1852c
822 $ hg -R issue1852d incoming --subrepos issue1852c
823 comparing with issue1852c
823 comparing with issue1852c
824 searching for changes
824 searching for changes
825 no changes found
825 no changes found
826 comparing with issue1852c/sub/repo
826 comparing with issue1852c/sub/repo
827 searching for changes
827 searching for changes
828 no changes found
828 no changes found
829 [1]
829 [1]
830
830
831 Check status of files when none of them belong to the first
831 Check status of files when none of them belong to the first
832 subrepository:
832 subrepository:
833
833
834 $ hg init subrepo-status
834 $ hg init subrepo-status
835 $ cd subrepo-status
835 $ cd subrepo-status
836 $ hg init subrepo-1
836 $ hg init subrepo-1
837 $ hg init subrepo-2
837 $ hg init subrepo-2
838 $ cd subrepo-2
838 $ cd subrepo-2
839 $ touch file
839 $ touch file
840 $ hg add file
840 $ hg add file
841 $ cd ..
841 $ cd ..
842 $ echo subrepo-1 = subrepo-1 > .hgsub
842 $ echo subrepo-1 = subrepo-1 > .hgsub
843 $ echo subrepo-2 = subrepo-2 >> .hgsub
843 $ echo subrepo-2 = subrepo-2 >> .hgsub
844 $ hg add .hgsub
844 $ hg add .hgsub
845 $ hg ci -m 'Added subrepos'
845 $ hg ci -m 'Added subrepos'
846 committing subrepository subrepo-2
846 committing subrepository subrepo-2
847 $ hg st subrepo-2/file
847 $ hg st subrepo-2/file
848
848
849 Check that share works with subrepo
849 Check that share works with subrepo
850 $ hg --config extensions.share= share . ../shared
850 $ hg --config extensions.share= share . ../shared
851 updating working directory
851 updating working directory
852 cloning subrepo subrepo-2 from $TESTTMP/subrepo-status/subrepo-2
852 cloning subrepo subrepo-2 from $TESTTMP/subrepo-status/subrepo-2
853 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
853 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
854 $ test -f ../shared/subrepo-1/.hg/sharedpath
854 $ test -f ../shared/subrepo-1/.hg/sharedpath
855 [1]
855 [1]
856 $ hg -R ../shared in
856 $ hg -R ../shared in
857 abort: repository default not found!
857 abort: repository default not found!
858 [255]
858 [255]
859 $ hg -R ../shared/subrepo-2 showconfig paths
859 $ hg -R ../shared/subrepo-2 showconfig paths
860 paths.default=$TESTTMP/subrepo-status/subrepo-2
860 paths.default=$TESTTMP/subrepo-status/subrepo-2
861 $ hg -R ../shared/subrepo-1 sum --remote
861 $ hg -R ../shared/subrepo-1 sum --remote
862 parent: -1:000000000000 tip (empty repository)
862 parent: -1:000000000000 tip (empty repository)
863 branch: default
863 branch: default
864 commit: (clean)
864 commit: (clean)
865 update: (current)
865 update: (current)
866 remote: (synced)
866 remote: (synced)
867
867
868 Check hg update --clean
868 Check hg update --clean
869 $ cd $TESTTMP/t
869 $ cd $TESTTMP/t
870 $ rm -r t/t.orig
870 $ rm -r t/t.orig
871 $ hg status -S --all
871 $ hg status -S --all
872 C .hgsub
872 C .hgsub
873 C .hgsubstate
873 C .hgsubstate
874 C a
874 C a
875 C s/.hgsub
875 C s/.hgsub
876 C s/.hgsubstate
876 C s/.hgsubstate
877 C s/a
877 C s/a
878 C s/ss/a
878 C s/ss/a
879 C t/t
879 C t/t
880 $ echo c1 > s/a
880 $ echo c1 > s/a
881 $ cd s
881 $ cd s
882 $ echo c1 > b
882 $ echo c1 > b
883 $ echo c1 > c
883 $ echo c1 > c
884 $ hg add b
884 $ hg add b
885 $ cd ..
885 $ cd ..
886 $ hg status -S
886 $ hg status -S
887 M s/a
887 M s/a
888 A s/b
888 A s/b
889 ? s/c
889 ? s/c
890 $ hg update -C
890 $ hg update -C
891 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
891 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
892 $ hg status -S
892 $ hg status -S
893 ? s/b
893 ? s/b
894 ? s/c
894 ? s/c
895
895
896 Sticky subrepositories, no changes
896 Sticky subrepositories, no changes
897 $ cd $TESTTMP/t
897 $ cd $TESTTMP/t
898 $ hg id
898 $ hg id
899 925c17564ef8 tip
899 925c17564ef8 tip
900 $ hg -R s id
900 $ hg -R s id
901 12a213df6fa9 tip
901 12a213df6fa9 tip
902 $ hg -R t id
902 $ hg -R t id
903 52c0adc0515a tip
903 52c0adc0515a tip
904 $ hg update 11
904 $ hg update 11
905 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
905 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
906 $ hg id
906 $ hg id
907 365661e5936a
907 365661e5936a
908 $ hg -R s id
908 $ hg -R s id
909 fc627a69481f
909 fc627a69481f
910 $ hg -R t id
910 $ hg -R t id
911 e95bcfa18a35
911 e95bcfa18a35
912
912
913 Sticky subrepositorys, file changes
913 Sticky subrepositorys, file changes
914 $ touch s/f1
914 $ touch s/f1
915 $ touch t/f1
915 $ touch t/f1
916 $ hg add -S s/f1
916 $ hg add -S s/f1
917 $ hg add -S t/f1
917 $ hg add -S t/f1
918 $ hg id
918 $ hg id
919 365661e5936a+
919 365661e5936a+
920 $ hg -R s id
920 $ hg -R s id
921 fc627a69481f+
921 fc627a69481f+
922 $ hg -R t id
922 $ hg -R t id
923 e95bcfa18a35+
923 e95bcfa18a35+
924 $ hg update tip
924 $ hg update tip
925 subrepository sources for s differ
925 subrepository sources for s differ
926 use (l)ocal source (fc627a69481f) or (r)emote source (12a213df6fa9)?
926 use (l)ocal source (fc627a69481f) or (r)emote source (12a213df6fa9)?
927 l
927 l
928 subrepository sources for t differ
928 subrepository sources for t differ
929 use (l)ocal source (e95bcfa18a35) or (r)emote source (52c0adc0515a)?
929 use (l)ocal source (e95bcfa18a35) or (r)emote source (52c0adc0515a)?
930 l
930 l
931 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
931 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
932 $ hg id
932 $ hg id
933 925c17564ef8+ tip
933 925c17564ef8+ tip
934 $ hg -R s id
934 $ hg -R s id
935 fc627a69481f+
935 fc627a69481f+
936 $ hg -R t id
936 $ hg -R t id
937 e95bcfa18a35+
937 e95bcfa18a35+
938 $ hg update --clean tip
938 $ hg update --clean tip
939 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
939 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
940
940
941 Sticky subrepository, revision updates
941 Sticky subrepository, revision updates
942 $ hg id
942 $ hg id
943 925c17564ef8 tip
943 925c17564ef8 tip
944 $ hg -R s id
944 $ hg -R s id
945 12a213df6fa9 tip
945 12a213df6fa9 tip
946 $ hg -R t id
946 $ hg -R t id
947 52c0adc0515a tip
947 52c0adc0515a tip
948 $ cd s
948 $ cd s
949 $ hg update -r -2
949 $ hg update -r -2
950 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
950 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
951 $ cd ../t
951 $ cd ../t
952 $ hg update -r 2
952 $ hg update -r 2
953 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
953 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
954 $ cd ..
954 $ cd ..
955 $ hg update 10
955 $ hg update 10
956 subrepository sources for t differ (in checked out version)
956 subrepository sources for t differ (in checked out version)
957 use (l)ocal source (7af322bc1198) or (r)emote source (20a0db6fbf6c)?
957 use (l)ocal source (7af322bc1198) or (r)emote source (20a0db6fbf6c)?
958 l
958 l
959 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
959 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
960 $ hg id
960 $ hg id
961 e45c8b14af55+
961 e45c8b14af55+
962 $ hg -R s id
962 $ hg -R s id
963 02dcf1d70411
963 02dcf1d70411
964 $ hg -R t id
964 $ hg -R t id
965 7af322bc1198
965 7af322bc1198
966
966
967 Sticky subrepository, file changes and revision updates
967 Sticky subrepository, file changes and revision updates
968 $ touch s/f1
968 $ touch s/f1
969 $ touch t/f1
969 $ touch t/f1
970 $ hg add -S s/f1
970 $ hg add -S s/f1
971 $ hg add -S t/f1
971 $ hg add -S t/f1
972 $ hg id
972 $ hg id
973 e45c8b14af55+
973 e45c8b14af55+
974 $ hg -R s id
974 $ hg -R s id
975 02dcf1d70411+
975 02dcf1d70411+
976 $ hg -R t id
976 $ hg -R t id
977 7af322bc1198+
977 7af322bc1198+
978 $ hg update tip
978 $ hg update tip
979 subrepository sources for s differ
979 subrepository sources for s differ
980 use (l)ocal source (02dcf1d70411) or (r)emote source (12a213df6fa9)?
980 use (l)ocal source (02dcf1d70411) or (r)emote source (12a213df6fa9)?
981 l
981 l
982 subrepository sources for t differ
982 subrepository sources for t differ
983 use (l)ocal source (7af322bc1198) or (r)emote source (52c0adc0515a)?
983 use (l)ocal source (7af322bc1198) or (r)emote source (52c0adc0515a)?
984 l
984 l
985 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
985 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
986 $ hg id
986 $ hg id
987 925c17564ef8+ tip
987 925c17564ef8+ tip
988 $ hg -R s id
988 $ hg -R s id
989 02dcf1d70411+
989 02dcf1d70411+
990 $ hg -R t id
990 $ hg -R t id
991 7af322bc1198+
991 7af322bc1198+
992
992
993 Sticky repository, update --clean
993 Sticky repository, update --clean
994 $ hg update --clean tip
994 $ hg update --clean tip
995 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
995 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
996 $ hg id
996 $ hg id
997 925c17564ef8 tip
997 925c17564ef8 tip
998 $ hg -R s id
998 $ hg -R s id
999 12a213df6fa9 tip
999 12a213df6fa9 tip
1000 $ hg -R t id
1000 $ hg -R t id
1001 52c0adc0515a tip
1001 52c0adc0515a tip
1002
1002
1003 Test subrepo already at intended revision:
1003 Test subrepo already at intended revision:
1004 $ cd s
1004 $ cd s
1005 $ hg update fc627a69481f
1005 $ hg update fc627a69481f
1006 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1006 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1007 $ cd ..
1007 $ cd ..
1008 $ hg update 11
1008 $ hg update 11
1009 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1009 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1010 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1010 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1011 $ hg id -n
1011 $ hg id -n
1012 11+
1012 11+
1013 $ hg -R s id
1013 $ hg -R s id
1014 fc627a69481f
1014 fc627a69481f
1015 $ hg -R t id
1015 $ hg -R t id
1016 e95bcfa18a35
1016 e95bcfa18a35
1017
1017
1018 Test that removing .hgsubstate doesn't break anything:
1018 Test that removing .hgsubstate doesn't break anything:
1019
1019
1020 $ hg rm -f .hgsubstate
1020 $ hg rm -f .hgsubstate
1021 $ hg ci -mrm
1021 $ hg ci -mrm
1022 nothing changed
1022 nothing changed
1023 [1]
1023 [1]
1024 $ hg log -vr tip
1024 $ hg log -vr tip
1025 changeset: 13:925c17564ef8
1025 changeset: 13:925c17564ef8
1026 tag: tip
1026 tag: tip
1027 user: test
1027 user: test
1028 date: Thu Jan 01 00:00:00 1970 +0000
1028 date: Thu Jan 01 00:00:00 1970 +0000
1029 files: .hgsubstate
1029 files: .hgsubstate
1030 description:
1030 description:
1031 13
1031 13
1032
1032
1033
1033
1034
1034
1035 Test that removing .hgsub removes .hgsubstate:
1035 Test that removing .hgsub removes .hgsubstate:
1036
1036
1037 $ hg rm .hgsub
1037 $ hg rm .hgsub
1038 $ hg ci -mrm2
1038 $ hg ci -mrm2
1039 created new head
1039 created new head
1040 $ hg log -vr tip
1040 $ hg log -vr tip
1041 changeset: 14:2400bccd50af
1041 changeset: 14:2400bccd50af
1042 tag: tip
1042 tag: tip
1043 parent: 11:365661e5936a
1043 parent: 11:365661e5936a
1044 user: test
1044 user: test
1045 date: Thu Jan 01 00:00:00 1970 +0000
1045 date: Thu Jan 01 00:00:00 1970 +0000
1046 files: .hgsub .hgsubstate
1046 files: .hgsub .hgsubstate
1047 description:
1047 description:
1048 rm2
1048 rm2
1049
1049
1050
1050
1051 Test issue3153: diff -S with deleted subrepos
1051 Test issue3153: diff -S with deleted subrepos
1052
1052
1053 $ hg diff --nodates -S -c .
1053 $ hg diff --nodates -S -c .
1054 diff -r 365661e5936a -r 2400bccd50af .hgsub
1054 diff -r 365661e5936a -r 2400bccd50af .hgsub
1055 --- a/.hgsub
1055 --- a/.hgsub
1056 +++ /dev/null
1056 +++ /dev/null
1057 @@ -1,2 +0,0 @@
1057 @@ -1,2 +0,0 @@
1058 -s = s
1058 -s = s
1059 -t = t
1059 -t = t
1060 diff -r 365661e5936a -r 2400bccd50af .hgsubstate
1060 diff -r 365661e5936a -r 2400bccd50af .hgsubstate
1061 --- a/.hgsubstate
1061 --- a/.hgsubstate
1062 +++ /dev/null
1062 +++ /dev/null
1063 @@ -1,2 +0,0 @@
1063 @@ -1,2 +0,0 @@
1064 -fc627a69481fcbe5f1135069e8a3881c023e4cf5 s
1064 -fc627a69481fcbe5f1135069e8a3881c023e4cf5 s
1065 -e95bcfa18a358dc4936da981ebf4147b4cad1362 t
1065 -e95bcfa18a358dc4936da981ebf4147b4cad1362 t
1066
1066
1067 Test behavior of add for explicit path in subrepo:
1067 Test behavior of add for explicit path in subrepo:
1068 $ cd ..
1068 $ cd ..
1069 $ hg init explicit
1069 $ hg init explicit
1070 $ cd explicit
1070 $ cd explicit
1071 $ echo s = s > .hgsub
1071 $ echo s = s > .hgsub
1072 $ hg add .hgsub
1072 $ hg add .hgsub
1073 $ hg init s
1073 $ hg init s
1074 $ hg ci -m0
1074 $ hg ci -m0
1075 Adding with an explicit path in a subrepo adds the file
1075 Adding with an explicit path in a subrepo adds the file
1076 $ echo c1 > f1
1076 $ echo c1 > f1
1077 $ echo c2 > s/f2
1077 $ echo c2 > s/f2
1078 $ hg st -S
1078 $ hg st -S
1079 ? f1
1079 ? f1
1080 ? s/f2
1080 ? s/f2
1081 $ hg add s/f2
1081 $ hg add s/f2
1082 $ hg st -S
1082 $ hg st -S
1083 A s/f2
1083 A s/f2
1084 ? f1
1084 ? f1
1085 $ hg ci -R s -m0
1085 $ hg ci -R s -m0
1086 $ hg ci -Am1
1086 $ hg ci -Am1
1087 adding f1
1087 adding f1
1088 Adding with an explicit path in a subrepo with -S has the same behavior
1088 Adding with an explicit path in a subrepo with -S has the same behavior
1089 $ echo c3 > f3
1089 $ echo c3 > f3
1090 $ echo c4 > s/f4
1090 $ echo c4 > s/f4
1091 $ hg st -S
1091 $ hg st -S
1092 ? f3
1092 ? f3
1093 ? s/f4
1093 ? s/f4
1094 $ hg add -S s/f4
1094 $ hg add -S s/f4
1095 $ hg st -S
1095 $ hg st -S
1096 A s/f4
1096 A s/f4
1097 ? f3
1097 ? f3
1098 $ hg ci -R s -m1
1098 $ hg ci -R s -m1
1099 $ hg ci -Ama2
1099 $ hg ci -Ama2
1100 adding f3
1100 adding f3
1101 Adding without a path or pattern silently ignores subrepos
1101 Adding without a path or pattern silently ignores subrepos
1102 $ echo c5 > f5
1102 $ echo c5 > f5
1103 $ echo c6 > s/f6
1103 $ echo c6 > s/f6
1104 $ echo c7 > s/f7
1104 $ echo c7 > s/f7
1105 $ hg st -S
1105 $ hg st -S
1106 ? f5
1106 ? f5
1107 ? s/f6
1107 ? s/f6
1108 ? s/f7
1108 ? s/f7
1109 $ hg add
1109 $ hg add
1110 adding f5
1110 adding f5
1111 $ hg st -S
1111 $ hg st -S
1112 A f5
1112 A f5
1113 ? s/f6
1113 ? s/f6
1114 ? s/f7
1114 ? s/f7
1115 $ hg ci -R s -Am2
1115 $ hg ci -R s -Am2
1116 adding f6
1116 adding f6
1117 adding f7
1117 adding f7
1118 $ hg ci -m3
1118 $ hg ci -m3
1119 Adding without a path or pattern with -S also adds files in subrepos
1119 Adding without a path or pattern with -S also adds files in subrepos
1120 $ echo c8 > f8
1120 $ echo c8 > f8
1121 $ echo c9 > s/f9
1121 $ echo c9 > s/f9
1122 $ echo c10 > s/f10
1122 $ echo c10 > s/f10
1123 $ hg st -S
1123 $ hg st -S
1124 ? f8
1124 ? f8
1125 ? s/f10
1125 ? s/f10
1126 ? s/f9
1126 ? s/f9
1127 $ hg add -S
1127 $ hg add -S
1128 adding f8
1128 adding f8
1129 adding s/f10 (glob)
1129 adding s/f10 (glob)
1130 adding s/f9 (glob)
1130 adding s/f9 (glob)
1131 $ hg st -S
1131 $ hg st -S
1132 A f8
1132 A f8
1133 A s/f10
1133 A s/f10
1134 A s/f9
1134 A s/f9
1135 $ hg ci -R s -m3
1135 $ hg ci -R s -m3
1136 $ hg ci -m4
1136 $ hg ci -m4
1137 Adding with a pattern silently ignores subrepos
1137 Adding with a pattern silently ignores subrepos
1138 $ echo c11 > fm11
1138 $ echo c11 > fm11
1139 $ echo c12 > fn12
1139 $ echo c12 > fn12
1140 $ echo c13 > s/fm13
1140 $ echo c13 > s/fm13
1141 $ echo c14 > s/fn14
1141 $ echo c14 > s/fn14
1142 $ hg st -S
1142 $ hg st -S
1143 ? fm11
1143 ? fm11
1144 ? fn12
1144 ? fn12
1145 ? s/fm13
1145 ? s/fm13
1146 ? s/fn14
1146 ? s/fn14
1147 $ hg add 'glob:**fm*'
1147 $ hg add 'glob:**fm*'
1148 adding fm11
1148 adding fm11
1149 $ hg st -S
1149 $ hg st -S
1150 A fm11
1150 A fm11
1151 ? fn12
1151 ? fn12
1152 ? s/fm13
1152 ? s/fm13
1153 ? s/fn14
1153 ? s/fn14
1154 $ hg ci -R s -Am4
1154 $ hg ci -R s -Am4
1155 adding fm13
1155 adding fm13
1156 adding fn14
1156 adding fn14
1157 $ hg ci -Am5
1157 $ hg ci -Am5
1158 adding fn12
1158 adding fn12
1159 Adding with a pattern with -S also adds matches in subrepos
1159 Adding with a pattern with -S also adds matches in subrepos
1160 $ echo c15 > fm15
1160 $ echo c15 > fm15
1161 $ echo c16 > fn16
1161 $ echo c16 > fn16
1162 $ echo c17 > s/fm17
1162 $ echo c17 > s/fm17
1163 $ echo c18 > s/fn18
1163 $ echo c18 > s/fn18
1164 $ hg st -S
1164 $ hg st -S
1165 ? fm15
1165 ? fm15
1166 ? fn16
1166 ? fn16
1167 ? s/fm17
1167 ? s/fm17
1168 ? s/fn18
1168 ? s/fn18
1169 $ hg add -S 'glob:**fm*'
1169 $ hg add -S 'glob:**fm*'
1170 adding fm15
1170 adding fm15
1171 adding s/fm17 (glob)
1171 adding s/fm17 (glob)
1172 $ hg st -S
1172 $ hg st -S
1173 A fm15
1173 A fm15
1174 A s/fm17
1174 A s/fm17
1175 ? fn16
1175 ? fn16
1176 ? s/fn18
1176 ? s/fn18
1177 $ hg ci -R s -Am5
1177 $ hg ci -R s -Am5
1178 adding fn18
1178 adding fn18
1179 $ hg ci -Am6
1179 $ hg ci -Am6
1180 adding fn16
1180 adding fn16
1181
1181
1182 Test behavior of forget for explicit path in subrepo:
1182 Test behavior of forget for explicit path in subrepo:
1183 Forgetting an explicit path in a subrepo untracks the file
1183 Forgetting an explicit path in a subrepo untracks the file
1184 $ echo c19 > s/f19
1184 $ echo c19 > s/f19
1185 $ hg add s/f19
1185 $ hg add s/f19
1186 $ hg st -S
1186 $ hg st -S
1187 A s/f19
1187 A s/f19
1188 $ hg forget s/f19
1188 $ hg forget s/f19
1189 $ hg st -S
1189 $ hg st -S
1190 ? s/f19
1190 ? s/f19
1191 $ rm s/f19
1191 $ rm s/f19
1192 $ cd ..
1192 $ cd ..
1193
1193
1194 Courtesy phases synchronisation to publishing server does not block the push
1194 Courtesy phases synchronisation to publishing server does not block the push
1195 (issue3781)
1195 (issue3781)
1196
1196
1197 $ cp -r main issue3781
1197 $ cp -r main issue3781
1198 $ cp -r main issue3781-dest
1198 $ cp -r main issue3781-dest
1199 $ cd issue3781-dest/s
1199 $ cd issue3781-dest/s
1200 $ hg phase tip # show we have draft changeset
1200 $ hg phase tip # show we have draft changeset
1201 5: draft
1201 5: draft
1202 $ chmod a-w .hg/store/phaseroots # prevent phase push
1202 $ chmod a-w .hg/store/phaseroots # prevent phase push
1203 $ cd ../../issue3781
1203 $ cd ../../issue3781
1204 $ cat >> .hg/hgrc << EOF
1204 $ cat >> .hg/hgrc << EOF
1205 > [paths]
1205 > [paths]
1206 > default=../issue3781-dest/
1206 > default=../issue3781-dest/
1207 > EOF
1207 > EOF
1208 $ hg push
1208 $ hg push
1209 pushing to $TESTTMP/issue3781-dest (glob)
1209 pushing to $TESTTMP/issue3781-dest (glob)
1210 pushing subrepo s to $TESTTMP/issue3781-dest/s
1210 pushing subrepo s to $TESTTMP/issue3781-dest/s
1211 searching for changes
1211 searching for changes
1212 no changes found
1212 no changes found
1213 searching for changes
1213 searching for changes
1214 no changes found
1214 no changes found
1215 [1]
1215 [1]
1216
1216
General Comments 0
You need to be logged in to leave comments. Login now