##// END OF EJS Templates
filemerge: add a 'leave unresolved' option to regular prompts...
Siddharth Agarwal -
r27162:4ab69be0 default
parent child Browse files
Show More
@@ -249,15 +249,18 b' def _iprompt(repo, mynode, orig, fcd, fc'
249 "$$ &Changed $$ &Deleted") % fd, 0)
249 "$$ &Changed $$ &Deleted") % fd, 0)
250 choice = ['other', 'local'][index]
250 choice = ['other', 'local'][index]
251 else:
251 else:
252 index = ui.promptchoice(_("no tool found to merge %s\n"
252 index = ui.promptchoice(
253 "keep (l)ocal or take (o)ther?"
253 _("no tool found to merge %s\n"
254 "$$ &Local $$ &Other") % fd, 0)
254 "keep (l)ocal, take (o)ther, or leave (u)nresolved?"
255 choice = ['local', 'other'][index]
255 "$$ &Local $$ &Other $$ &Unresolved") % fd, 0)
256 choice = ['local', 'other', 'unresolved'][index]
256
257
257 if choice == 'other':
258 if choice == 'other':
258 return _iother(repo, mynode, orig, fcd, fco, fca, toolconf)
259 return _iother(repo, mynode, orig, fcd, fco, fca, toolconf)
259 else:
260 elif choice == 'local':
260 return _ilocal(repo, mynode, orig, fcd, fco, fca, toolconf)
261 return _ilocal(repo, mynode, orig, fcd, fco, fca, toolconf)
262 elif choice == 'unresolved':
263 return _ifail(repo, mynode, orig, fcd, fco, fca, toolconf)
261 except error.ResponseExpected:
264 except error.ResponseExpected:
262 ui.write("\n")
265 ui.write("\n")
263 return _ifail(repo, mynode, orig, fcd, fco, fca, toolconf)
266 return _ifail(repo, mynode, orig, fcd, fco, fca, toolconf)
@@ -422,7 +422,7 b' Force prompts with no input (should be s'
422 remote changed file2 which local deleted
422 remote changed file2 which local deleted
423 use (c)hanged version or leave (d)eleted?
423 use (c)hanged version or leave (d)eleted?
424 no tool found to merge file3
424 no tool found to merge file3
425 keep (l)ocal or take (o)ther?
425 keep (l)ocal, take (o)ther, or leave (u)nresolved?
426 0 files updated, 0 files merged, 0 files removed, 3 files unresolved
426 0 files updated, 0 files merged, 0 files removed, 3 files unresolved
427 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
427 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
428 [1]
428 [1]
@@ -474,7 +474,7 b' Force prompts'
474 remote changed file2 which local deleted
474 remote changed file2 which local deleted
475 use (c)hanged version or leave (d)eleted? c
475 use (c)hanged version or leave (d)eleted? c
476 no tool found to merge file3
476 no tool found to merge file3
477 keep (l)ocal or take (o)ther? l
477 keep (l)ocal, take (o)ther, or leave (u)nresolved? l
478 0 files updated, 3 files merged, 0 files removed, 0 files unresolved
478 0 files updated, 3 files merged, 0 files removed, 0 files unresolved
479 (branch merge, don't forget to commit)
479 (branch merge, don't forget to commit)
480 $ status
480 $ status
@@ -607,7 +607,7 b' invocations.)'
607 remote changed file2 which local deleted
607 remote changed file2 which local deleted
608 use (c)hanged version or leave (d)eleted?
608 use (c)hanged version or leave (d)eleted?
609 no tool found to merge file3
609 no tool found to merge file3
610 keep (l)ocal or take (o)ther?
610 keep (l)ocal, take (o)ther, or leave (u)nresolved?
611 --- diff of status ---
611 --- diff of status ---
612 (status identical)
612 (status identical)
613
613
@@ -636,7 +636,7 b' invocations.)'
636 remote changed file2 which local deleted
636 remote changed file2 which local deleted
637 use (c)hanged version or leave (d)eleted?
637 use (c)hanged version or leave (d)eleted?
638 no tool found to merge file3
638 no tool found to merge file3
639 keep (l)ocal or take (o)ther?
639 keep (l)ocal, take (o)ther, or leave (u)nresolved?
640 --- diff of status ---
640 --- diff of status ---
641 (status identical)
641 (status identical)
642
642
@@ -655,7 +655,7 b' invocations.)'
655 remote changed file2 which local deleted
655 remote changed file2 which local deleted
656 use (c)hanged version or leave (d)eleted?
656 use (c)hanged version or leave (d)eleted?
657 no tool found to merge file3
657 no tool found to merge file3
658 keep (l)ocal or take (o)ther?
658 keep (l)ocal, take (o)ther, or leave (u)nresolved?
659 --- diff of status ---
659 --- diff of status ---
660 (status identical)
660 (status identical)
661
661
@@ -532,7 +532,7 b' ui.merge specifies internal:prompt:'
532 # hg update -C 1
532 # hg update -C 1
533 $ hg merge -r 2 --config ui.merge=internal:prompt
533 $ hg merge -r 2 --config ui.merge=internal:prompt
534 no tool found to merge f
534 no tool found to merge f
535 keep (l)ocal or take (o)ther? l
535 keep (l)ocal, take (o)ther, or leave (u)nresolved? l
536 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
536 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
537 (branch merge, don't forget to commit)
537 (branch merge, don't forget to commit)
538 $ aftermerge
538 $ aftermerge
@@ -544,6 +544,31 b' ui.merge specifies internal:prompt:'
544 # hg resolve --list
544 # hg resolve --list
545 R f
545 R f
546
546
547 ui.merge specifies :prompt, with 'leave unresolved' chosen
548
549 $ beforemerge
550 [merge-tools]
551 false.whatever=
552 true.priority=1
553 true.executable=cat
554 # hg update -C 1
555 $ hg merge -r 2 --config ui.merge=:prompt --config ui.interactive=True << EOF
556 > u
557 > EOF
558 no tool found to merge f
559 keep (l)ocal, take (o)ther, or leave (u)nresolved? u
560 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
561 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
562 [1]
563 $ aftermerge
564 # cat f
565 revision 1
566 space
567 # hg stat
568 M f
569 # hg resolve --list
570 U f
571
547 prompt with EOF
572 prompt with EOF
548
573
549 $ beforemerge
574 $ beforemerge
@@ -554,7 +579,7 b' prompt with EOF'
554 # hg update -C 1
579 # hg update -C 1
555 $ hg merge -r 2 --config ui.merge=internal:prompt --config ui.interactive=true
580 $ hg merge -r 2 --config ui.merge=internal:prompt --config ui.interactive=true
556 no tool found to merge f
581 no tool found to merge f
557 keep (l)ocal or take (o)ther?
582 keep (l)ocal, take (o)ther, or leave (u)nresolved?
558 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
583 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
559 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
584 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
560 [1]
585 [1]
@@ -568,7 +593,7 b' prompt with EOF'
568 U f
593 U f
569 $ hg resolve --all --config ui.merge=internal:prompt --config ui.interactive=true
594 $ hg resolve --all --config ui.merge=internal:prompt --config ui.interactive=true
570 no tool found to merge f
595 no tool found to merge f
571 keep (l)ocal or take (o)ther?
596 keep (l)ocal, take (o)ther, or leave (u)nresolved?
572 [1]
597 [1]
573 $ aftermerge
598 $ aftermerge
574 # cat f
599 # cat f
@@ -582,7 +607,7 b' prompt with EOF'
582 $ rm f
607 $ rm f
583 $ hg resolve --all --config ui.merge=internal:prompt --config ui.interactive=true
608 $ hg resolve --all --config ui.merge=internal:prompt --config ui.interactive=true
584 no tool found to merge f
609 no tool found to merge f
585 keep (l)ocal or take (o)ther?
610 keep (l)ocal, take (o)ther, or leave (u)nresolved?
586 [1]
611 [1]
587 $ aftermerge
612 $ aftermerge
588 # cat f
613 # cat f
@@ -594,7 +619,7 b' prompt with EOF'
594 U f
619 U f
595 $ hg resolve --all --config ui.merge=internal:prompt
620 $ hg resolve --all --config ui.merge=internal:prompt
596 no tool found to merge f
621 no tool found to merge f
597 keep (l)ocal or take (o)ther? l
622 keep (l)ocal, take (o)ther, or leave (u)nresolved? l
598 (no more unresolved files)
623 (no more unresolved files)
599 $ aftermerge
624 $ aftermerge
600 # cat f
625 # cat f
@@ -172,7 +172,7 b' Update to link with local change should '
172 (couldn't find merge tool hgmerge|tool hgmerge can't handle symlinks) (re)
172 (couldn't find merge tool hgmerge|tool hgmerge can't handle symlinks) (re)
173 picked tool ':prompt' for a (binary False symlink True changedelete False)
173 picked tool ':prompt' for a (binary False symlink True changedelete False)
174 no tool found to merge a
174 no tool found to merge a
175 keep (l)ocal or take (o)ther? l
175 keep (l)ocal, take (o)ther, or leave (u)nresolved? l
176 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
176 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
177 $ hg diff --git
177 $ hg diff --git
178 diff --git a/a b/a
178 diff --git a/a b/a
General Comments 0
You need to be logged in to leave comments. Login now