##// END OF EJS Templates
subrepo: move prompts out of the if (issue5505)...
Simon Farnsworth -
r31516:2915cc1d stable
parent child Browse files
Show More
@@ -194,7 +194,9 b' def submerge(repo, wctx, mctx, actx, ove'
194 194 r = "%s:%s:%s" % r
195 195 repo.ui.debug(" subrepo %s: %s %s\n" % (s, msg, r))
196 196
197 promptssrc = filemerge.partextras(labels)
197 198 for s, l in sorted(s1.iteritems()):
199 prompts = None
198 200 a = sa.get(s, nullstate)
199 201 ld = l # local state with possible dirty flag for compares
200 202 if wctx.sub(s).dirty():
@@ -202,9 +204,9 b' def submerge(repo, wctx, mctx, actx, ove'
202 204 if wctx == actx: # overwrite
203 205 a = ld
204 206
207 prompts = promptssrc.copy()
208 prompts['s'] = s
205 209 if s in s2:
206 prompts = filemerge.partextras(labels)
207 prompts['s'] = s
208 210 r = s2[s]
209 211 if ld == r or r == a: # no change or local is newer
210 212 sm[s] = l
@@ -267,6 +269,7 b' def submerge(repo, wctx, mctx, actx, ove'
267 269 wctx.sub(s).remove()
268 270
269 271 for s, r in sorted(s2.items()):
272 prompts = None
270 273 if s in s1:
271 274 continue
272 275 elif s not in sa:
@@ -274,6 +277,8 b' def submerge(repo, wctx, mctx, actx, ove'
274 277 mctx.sub(s).get(r)
275 278 sm[s] = r
276 279 elif r != sa[s]:
280 prompts = promptssrc.copy()
281 prompts['s'] = s
277 282 if repo.ui.promptchoice(
278 283 _(' remote%(o)s changed subrepository %(s)s'
279 284 ' which local%(l)s removed\n'
@@ -349,7 +349,7 b' 11: remove subrepo t'
349 349 local removed, remote changed, keep changed
350 350
351 351 $ hg merge 6
352 remote [merge rev] changed subrepository s which local [working copy] removed
352 remote [merge rev] changed subrepository t which local [working copy] removed
353 353 use (c)hanged version or (d)elete? c
354 354 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
355 355 (branch merge, don't forget to commit)
@@ -380,7 +380,7 b' local removed, remote changed, keep remo'
380 380 $ hg merge --config ui.interactive=true 6 <<EOF
381 381 > d
382 382 > EOF
383 remote [merge rev] changed subrepository s which local [working copy] removed
383 remote [merge rev] changed subrepository t which local [working copy] removed
384 384 use (c)hanged version or (d)elete? d
385 385 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
386 386 (branch merge, don't forget to commit)
@@ -404,7 +404,7 b' local changed, remote removed, keep chan'
404 404 $ hg co -C 6
405 405 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
406 406 $ hg merge 11
407 local [working copy] changed subrepository s which remote [merge rev] removed
407 local [working copy] changed subrepository t which remote [merge rev] removed
408 408 use (c)hanged version or (d)elete? c
409 409 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
410 410 (branch merge, don't forget to commit)
@@ -436,7 +436,7 b' local changed, remote removed, keep remo'
436 436 $ hg merge --config ui.interactive=true 11 <<EOF
437 437 > d
438 438 > EOF
439 local [working copy] changed subrepository s which remote [merge rev] removed
439 local [working copy] changed subrepository t which remote [merge rev] removed
440 440 use (c)hanged version or (d)elete? d
441 441 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
442 442 (branch merge, don't forget to commit)
General Comments 0
You need to be logged in to leave comments. Login now