Show More
@@ -202,9 +202,24 b' def submerge(repo, wctx, mctx, actx, ove' | |||
|
202 | 202 | wctx.sub(s).get(r, overwrite) |
|
203 | 203 | sm[s] = r |
|
204 | 204 | else: |
|
205 |
debug(s, "both sides changed |
|
|
206 | wctx.sub(s).merge(r) | |
|
207 | sm[s] = l | |
|
205 | debug(s, "both sides changed") | |
|
206 | option = repo.ui.promptchoice( | |
|
207 | _(' subrepository %s diverged (local revision: %s, ' | |
|
208 | 'remote revision: %s)\n' | |
|
209 | '(M)erge, keep (l)ocal or keep (r)emote?' | |
|
210 | '$$ &Merge $$ &Local $$ &Remote') | |
|
211 | % (s, l[1][:12], r[1][:12]), 0) | |
|
212 | if option == 0: | |
|
213 | wctx.sub(s).merge(r) | |
|
214 | sm[s] = l | |
|
215 | debug(s, "merge with", r) | |
|
216 | elif option == 1: | |
|
217 | sm[s] = l | |
|
218 | debug(s, "keep local subrepo revision", l) | |
|
219 | else: | |
|
220 | wctx.sub(s).get(r, overwrite) | |
|
221 | sm[s] = r | |
|
222 | debug(s, "get remote subrepo revision", r) | |
|
208 | 223 | elif ld == a: # remote removed, local unchanged |
|
209 | 224 | debug(s, "remote removed, remove") |
|
210 | 225 | wctx.sub(s).remove() |
@@ -263,6 +263,8 b' qpush' | |||
|
263 | 263 | adding sub/a |
|
264 | 264 | $ hg qpush |
|
265 | 265 | applying 1.diff |
|
266 | subrepository sub diverged (local revision: b2fdb12cd82b, remote revision: aa037b301eba) | |
|
267 | (M)erge, keep (l)ocal or keep (r)emote? m | |
|
266 | 268 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
267 | 269 | now at: 1.diff |
|
268 | 270 | $ hg status -AS |
@@ -155,6 +155,8 b' user a pulls, merges, commits' | |||
|
155 | 155 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
156 | 156 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
157 | 157 | $ hg merge 2>/dev/null |
|
158 | subrepository s diverged (local revision: 796959400868, remote revision: aa84837ccfbd) | |
|
159 | (M)erge, keep (l)ocal or keep (r)emote? m | |
|
158 | 160 | pulling subrepo s from $TESTTMP/gitroot |
|
159 | 161 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
160 | 162 | (branch merge, don't forget to commit) |
@@ -462,6 +464,8 b' Sticky subrepositorys, file changes' | |||
|
462 | 464 | da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7 |
|
463 | 465 | $ cd .. |
|
464 | 466 | $ hg update 4 |
|
467 | subrepository s diverged (local revision: da5f5b1d8ffc, remote revision: aa84837ccfbd) | |
|
468 | (M)erge, keep (l)ocal or keep (r)emote? m | |
|
465 | 469 | subrepository sources for s differ |
|
466 | 470 | use (l)ocal source (da5f5b1) or (r)emote source (aa84837)? |
|
467 | 471 | l |
@@ -487,6 +491,8 b' Sticky subrepository, revision updates' | |||
|
487 | 491 | HEAD is now at aa84837... f |
|
488 | 492 | $ cd .. |
|
489 | 493 | $ hg update 1 |
|
494 | subrepository s diverged (local revision: 32a343883b74, remote revision: da5f5b1d8ffc) | |
|
495 | (M)erge, keep (l)ocal or keep (r)emote? m | |
|
490 | 496 | subrepository sources for s differ (in checked out version) |
|
491 | 497 | use (l)ocal source (32a3438) or (r)emote source (da5f5b1)? |
|
492 | 498 | l |
@@ -508,6 +514,8 b' Sticky subrepository, file changes and r' | |||
|
508 | 514 | $ hg id -n |
|
509 | 515 | 1+ |
|
510 | 516 | $ hg update 7 |
|
517 | subrepository s diverged (local revision: 32a343883b74, remote revision: 32a343883b74) | |
|
518 | (M)erge, keep (l)ocal or keep (r)emote? m | |
|
511 | 519 | subrepository sources for s differ |
|
512 | 520 | use (l)ocal source (32a3438) or (r)emote source (32a3438)? |
|
513 | 521 | l |
@@ -319,6 +319,8 b' Sticky subrepositorys, file changes' | |||
|
319 | 319 | 2M |
|
320 | 320 | $ cd .. |
|
321 | 321 | $ hg update tip |
|
322 | subrepository s diverged (local revision: 2, remote revision: 3) | |
|
323 | (M)erge, keep (l)ocal or keep (r)emote? m | |
|
322 | 324 | subrepository sources for s differ |
|
323 | 325 | use (l)ocal source (2) or (r)emote source (3)? |
|
324 | 326 | l |
@@ -349,6 +351,8 b' Sticky subrepository, revision updates' | |||
|
349 | 351 | $ svn update -qr 1 |
|
350 | 352 | $ cd .. |
|
351 | 353 | $ hg update 1 |
|
354 | subrepository s diverged (local revision: 3, remote revision: 2) | |
|
355 | (M)erge, keep (l)ocal or keep (r)emote? m | |
|
352 | 356 | subrepository sources for s differ (in checked out version) |
|
353 | 357 | use (l)ocal source (1) or (r)emote source (2)? |
|
354 | 358 | l |
@@ -371,6 +375,8 b' Sticky subrepository, file changes and r' | |||
|
371 | 375 | $ hg id -n |
|
372 | 376 | 1+ |
|
373 | 377 | $ hg update tip |
|
378 | subrepository s diverged (local revision: 3, remote revision: 3) | |
|
379 | (M)erge, keep (l)ocal or keep (r)emote? m | |
|
374 | 380 | subrepository sources for s differ |
|
375 | 381 | use (l)ocal source (1) or (r)emote source (3)? |
|
376 | 382 | l |
@@ -404,6 +410,8 b' Test subrepo already at intended revisio' | |||
|
404 | 410 | $ svn update -qr 2 |
|
405 | 411 | $ cd .. |
|
406 | 412 | $ hg update 1 |
|
413 | subrepository s diverged (local revision: 3, remote revision: 2) | |
|
414 | (M)erge, keep (l)ocal or keep (r)emote? m | |
|
407 | 415 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
408 | 416 | $ hg id -n |
|
409 | 417 | 1+ |
@@ -236,7 +236,9 b' merge tests' | |||
|
236 | 236 | .hgsubstate: versions differ -> m |
|
237 | 237 | updating: .hgsubstate 1/1 files (100.00%) |
|
238 | 238 | subrepo merge e45c8b14af55+ f94576341bcf 1831e14459c4 |
|
239 | subrepo t: both sides changed, merge with t:7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4:hg | |
|
239 | subrepo t: both sides changed | |
|
240 | subrepository t diverged (local revision: 20a0db6fbf6c, remote revision: 7af322bc1198) | |
|
241 | (M)erge, keep (l)ocal or keep (r)emote? m | |
|
240 | 242 | merging subrepo t |
|
241 | 243 | searching for copies back to rev 2 |
|
242 | 244 | resolving manifests |
@@ -252,6 +254,7 b' merge tests' | |||
|
252 | 254 | merging t incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
253 | 255 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
254 | 256 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
257 | subrepo t: merge with t:7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4:hg | |
|
255 | 258 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
256 | 259 | (branch merge, don't forget to commit) |
|
257 | 260 | |
@@ -620,6 +623,8 b" shouldn't need merging" | |||
|
620 | 623 | $ hg up 5 |
|
621 | 624 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
622 | 625 | $ hg merge 4 # try to merge default into br again |
|
626 | subrepository s diverged (local revision: f8f13b33206e, remote revision: a3f9062a4f88) | |
|
627 | (M)erge, keep (l)ocal or keep (r)emote? m | |
|
623 | 628 |
|
|
624 | 629 | (branch merge, don't forget to commit) |
|
625 | 630 | $ cd .. |
@@ -922,9 +927,13 b' Sticky subrepositorys, file changes' | |||
|
922 | 927 | $ hg -R t id |
|
923 | 928 | e95bcfa18a35+ |
|
924 | 929 | $ hg update tip |
|
930 | subrepository s diverged (local revision: fc627a69481f, remote revision: 12a213df6fa9) | |
|
931 | (M)erge, keep (l)ocal or keep (r)emote? m | |
|
925 | 932 |
|
|
926 | 933 | use (l)ocal source (fc627a69481f) or (r)emote source (12a213df6fa9)? |
|
927 | 934 | l |
|
935 | subrepository t diverged (local revision: e95bcfa18a35, remote revision: 52c0adc0515a) | |
|
936 | (M)erge, keep (l)ocal or keep (r)emote? m | |
|
928 | 937 | subrepository sources for t differ |
|
929 | 938 | use (l)ocal source (e95bcfa18a35) or (r)emote source (52c0adc0515a)? |
|
930 | 939 | l |
@@ -953,6 +962,10 b' Sticky subrepository, revision updates' | |||
|
953 | 962 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
954 | 963 | $ cd .. |
|
955 | 964 | $ hg update 10 |
|
965 | subrepository s diverged (local revision: 12a213df6fa9, remote revision: fc627a69481f) | |
|
966 | (M)erge, keep (l)ocal or keep (r)emote? m | |
|
967 | subrepository t diverged (local revision: 52c0adc0515a, remote revision: 20a0db6fbf6c) | |
|
968 | (M)erge, keep (l)ocal or keep (r)emote? m | |
|
956 | 969 |
|
|
957 | 970 | use (l)ocal source (7af322bc1198) or (r)emote source (20a0db6fbf6c)? |
|
958 | 971 | l |
@@ -976,9 +989,13 b' Sticky subrepository, file changes and r' | |||
|
976 | 989 | $ hg -R t id |
|
977 | 990 | 7af322bc1198+ |
|
978 | 991 | $ hg update tip |
|
992 | subrepository s diverged (local revision: 12a213df6fa9, remote revision: 12a213df6fa9) | |
|
993 | (M)erge, keep (l)ocal or keep (r)emote? m | |
|
979 | 994 |
|
|
980 | 995 | use (l)ocal source (02dcf1d70411) or (r)emote source (12a213df6fa9)? |
|
981 | 996 | l |
|
997 | subrepository t diverged (local revision: 52c0adc0515a, remote revision: 52c0adc0515a) | |
|
998 | (M)erge, keep (l)ocal or keep (r)emote? m | |
|
982 | 999 | subrepository sources for t differ |
|
983 | 1000 | use (l)ocal source (7af322bc1198) or (r)emote source (52c0adc0515a)? |
|
984 | 1001 | l |
@@ -1006,6 +1023,8 b' Test subrepo already at intended revisio' | |||
|
1006 | 1023 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1007 | 1024 | $ cd .. |
|
1008 | 1025 | $ hg update 11 |
|
1026 | subrepository s diverged (local revision: 12a213df6fa9, remote revision: fc627a69481f) | |
|
1027 | (M)erge, keep (l)ocal or keep (r)emote? m | |
|
1009 | 1028 |
|
|
1010 | 1029 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1011 | 1030 | $ hg id -n |
General Comments 0
You need to be logged in to leave comments.
Login now