Show More
@@ -175,15 +175,19 b' def _iprompt(repo, mynode, orig, fcd, fc' | |||||
175 | ui = repo.ui |
|
175 | ui = repo.ui | |
176 | fd = fcd.path() |
|
176 | fd = fcd.path() | |
177 |
|
177 | |||
178 | index = ui.promptchoice(_(" no tool found to merge %s\n" |
|
178 | try: | |
179 | "keep (l)ocal or take (o)ther?" |
|
179 | index = ui.promptchoice(_(" no tool found to merge %s\n" | |
180 |
" |
|
180 | "keep (l)ocal or take (o)ther?" | |
181 | choice = ['local', 'other'][index] |
|
181 | "$$ &Local $$ &Other") % fd, 0) | |
|
182 | choice = ['local', 'other'][index] | |||
182 |
|
183 | |||
183 | if choice == 'other': |
|
184 | if choice == 'other': | |
184 | return _iother(repo, mynode, orig, fcd, fco, fca, toolconf) |
|
185 | return _iother(repo, mynode, orig, fcd, fco, fca, toolconf) | |
185 | else: |
|
186 | else: | |
186 | return _ilocal(repo, mynode, orig, fcd, fco, fca, toolconf) |
|
187 | return _ilocal(repo, mynode, orig, fcd, fco, fca, toolconf) | |
|
188 | except error.ResponseExpected: | |||
|
189 | ui.write("\n") | |||
|
190 | return 1 | |||
187 |
|
191 | |||
188 | @internaltool('local', nomerge) |
|
192 | @internaltool('local', nomerge) | |
189 | def _ilocal(repo, mynode, orig, fcd, fco, fca, toolconf): |
|
193 | def _ilocal(repo, mynode, orig, fcd, fco, fca, toolconf): |
@@ -544,6 +544,41 b' ui.merge specifies internal:prompt:' | |||||
544 | # hg resolve --list |
|
544 | # hg resolve --list | |
545 | R f |
|
545 | R f | |
546 |
|
546 | |||
|
547 | prompt with EOF | |||
|
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=internal:prompt --config ui.interactive=true | |||
|
556 | no tool found to merge f | |||
|
557 | keep (l)ocal or take (o)ther? | |||
|
558 | 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 | |||
|
560 | [1] | |||
|
561 | $ aftermerge | |||
|
562 | # cat f | |||
|
563 | revision 1 | |||
|
564 | space | |||
|
565 | # hg stat | |||
|
566 | M f | |||
|
567 | # hg resolve --list | |||
|
568 | U f | |||
|
569 | $ hg resolve --all --config ui.merge=internal:prompt --config ui.interactive=true | |||
|
570 | no tool found to merge f | |||
|
571 | keep (l)ocal or take (o)ther? | |||
|
572 | [1] | |||
|
573 | $ aftermerge | |||
|
574 | # cat f | |||
|
575 | revision 1 | |||
|
576 | space | |||
|
577 | # hg stat | |||
|
578 | M f | |||
|
579 | ? f.orig | |||
|
580 | # hg resolve --list | |||
|
581 | U f | |||
547 | ui.merge specifies internal:dump: |
|
582 | ui.merge specifies internal:dump: | |
548 |
|
583 | |||
549 | $ beforemerge |
|
584 | $ beforemerge |
General Comments 0
You need to be logged in to leave comments.
Login now