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