Mercurial > public > mercurial-scm > hg
diff tests/test-merge-tools.t @ 40478:86dfae98a3a2
merge-tools: when calling external merge tool, describe the resolve inputs
It is a common complaint that a user will be running some operation (histedit,
rebase, evolve, etc.), get into a merge-conflict situation, and not understand
what they are seeing - it is possible that the merge tool is configured to
display the hash, but it's difficult for most merge tools to display a good
snippet of the description.
In the worst case, configuring this template will lead to output that is
immediately covered by a terminal application, maybe the user can hit ctrl-z to
see it. In the common case, the output will be in a terminal window and a GUI
program will start, and it should be possible to view both the terminal and the
GUI program at the same time.
Differential Revision: https://phab.mercurial-scm.org/D5094
author | Kyle Lippincott <spectral@google.com> |
---|---|
date | Sat, 13 Oct 2018 07:49:20 -0700 |
parents | 1736450cd1df |
children | ff37b1712fa5 |
line wrap: on
line diff
--- a/tests/test-merge-tools.t Fri Oct 26 21:46:37 2018 +0900 +++ b/tests/test-merge-tools.t Sat Oct 13 07:49:20 2018 -0700 @@ -1946,6 +1946,25 @@ 0000: 00 01 02 03 |....| $ hg merge --abort -q +Check that the extra information is printed correctly + + $ hg merge 9 \ + > --config merge-tools.testecho.executable='echo' \ + > --config merge-tools.testecho.args='merge runs here ...' \ + > --config merge-tools.testecho.binary=True \ + > --config ui.merge=testecho \ + > --config ui.pre-merge-tool-output-template='\n{label("extmerge.running_merge_tool", "Running merge tool for {path} ({toolpath}):")}\n{separate("\n", extmerge_section(local), extmerge_section(base), extmerge_section(other))}\n' \ + > --config 'templatealias.extmerge_section(sect)="- {pad("{sect.name} ({sect.label})", 20, left=True)}: {revset(sect.node)%"{rev}:{shortest(node,8)} {desc|firstline} {separate(" ", tags, bookmarks, branch)}"}"' + merging b + + Running merge tool for b (*/bin/echo): (glob) + - local (working copy): 10:2d1f533d add binary file (#2) tip default + - base (base): -1:00000000 default + - other (merge rev): 9:1e7ad7d7 add binary file (#1) default + merge runs here ... + 0 files updated, 1 files merged, 0 files removed, 0 files unresolved + (branch merge, don't forget to commit) + Check that debugpicktool examines which merge tool is chosen for specified file as expected