##// END OF EJS Templates
config: move ui.pre-merge-tool-output-template into [command-templates]...
Martin von Zweigbergk -
r46353:5effb199 default
parent child Browse files
Show More
@@ -245,6 +245,12 b' coreconfigitem('
245 245 ),
246 246 alias=[(b'ui', b'mergemarkertemplate')],
247 247 )
248 coreconfigitem(
249 b'command-templates',
250 b'pre-merge-tool-output',
251 default=None,
252 alias=[(b'ui', b'pre-merge-tool-output-template')],
253 )
248 254 _registerdiffopts(section=b'commands', configprefix=b'commit.interactive.')
249 255 coreconfigitem(
250 256 b'commands', b'commit.post-status', default=False,
@@ -1346,9 +1352,6 b' coreconfigitem('
1346 1352 b'ui', b'patch', default=None,
1347 1353 )
1348 1354 coreconfigitem(
1349 b'ui', b'pre-merge-tool-output-template', default=None,
1350 )
1351 coreconfigitem(
1352 1355 b'ui', b'portablefilenames', default=b'warn',
1353 1356 )
1354 1357 coreconfigitem(
@@ -643,7 +643,7 b' def _xmergeimm(repo, mynode, orig, fcd, '
643 643
644 644
645 645 def _describemerge(ui, repo, mynode, fcl, fcb, fco, env, toolpath, args):
646 tmpl = ui.config(b'ui', b'pre-merge-tool-output-template')
646 tmpl = ui.config(b'command-templates', b'pre-merge-tool-output')
647 647 if not tmpl:
648 648 return
649 649
@@ -2440,14 +2440,7 b' User interface controls.'
2440 2440 On Windows, this configuration option is ignored and the command aborted.
2441 2441
2442 2442 ``pre-merge-tool-output-template``
2443 A template that is printed before executing an external merge tool. This can
2444 be used to print out additional context that might be useful to have during
2445 the conflict resolution, such as the description of the various commits
2446 involved or bookmarks/tags.
2447
2448 Additional information is available in the ``local`, ``base``, and ``other``
2449 dicts. For example: ``{local.label}``, ``{base.name}``, or
2450 ``{other.islink}``.
2443 (DEPRECATED) Use ``command-template.pre-merge-tool-output`` instead.
2451 2444
2452 2445 ``quiet``
2453 2446 Reduce the amount of output printed.
@@ -2575,6 +2568,16 b' Templates used for customizing the outpu'
2575 2568
2576 2569 Can be overridden per-merge-tool, see the ``[merge-tools]`` section.
2577 2570
2571 ``pre-merge-tool-output``
2572 A template that is printed before executing an external merge tool. This can
2573 be used to print out additional context that might be useful to have during
2574 the conflict resolution, such as the description of the various commits
2575 involved or bookmarks/tags.
2576
2577 Additional information is available in the ``local`, ``base``, and ``other``
2578 dicts. For example: ``{local.label}``, ``{base.name}``, or
2579 ``{other.islink}``.
2580
2578 2581
2579 2582 ``web``
2580 2583 -------
@@ -12,8 +12,6 b' Initialization'
12 12 > [extensions]
13 13 > histedit=
14 14 > mockmakedate = $TESTDIR/mockmakedate.py
15 > [ui]
16 > pre-merge-tool-output-template='pre-merge message for {node}\n'
17 15 > EOF
18 16
19 17 Merge conflict
@@ -21,6 +19,11 b' Merge conflict'
21 19
22 20 $ hg init r
23 21 $ cd r
22 $ cat >> .hg/hgrc <<EOF
23 > [command-templates]
24 > pre-merge-tool-output='pre-merge message for {node}\n'
25 > EOF
26
24 27 $ echo foo > file
25 28 $ hg add file
26 29 $ hg ci -m "First" -d "1 0"
@@ -55,3 +58,26 b' Invert the order of the commits, and pre'
55 58 merging file
56 59 pre-merge message for b90fa2e91a6d11013945a5f684be45b84a8ca6ec
57 60 7181f42b8fca: skipping changeset (no changes)
61 $ hg histedit --abort
62 abort: no histedit in progress
63 [255]
64 $ cd ..
65
66 Test legacy config name
67
68 $ hg init r2
69 $ cd r2
70 $ echo foo > file
71 $ hg add file
72 $ hg ci -m "First"
73 $ echo bar > file
74 $ hg ci -m "Second"
75 $ echo conflict > file
76 $ hg co -m 0 --config ui.merge=false \
77 > --config ui.pre-merge-tool-output-template='legacy config: {node}\n'
78 merging file
79 legacy config: 889c9c4d58bd4ce74815efd04a01e0f2bf6765a7
80 merging file failed!
81 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
82 use 'hg resolve' to retry unresolved file merges
83 [1]
General Comments 0
You need to be logged in to leave comments. Login now