Mercurial > hg
diff tests/test-merge-partial-tool.t @ 49167:7af798e497f5
filemerge: add configs to disable some or all partial merge tools
When rolling out partial merge tools to users, it's useful to be able
to easily turn one or all of them off if a problem is discovered. This
patch adds support for that. They can of course also be useful for
individual users to be able to temporarily turn off a tool they are
otherwise using.
Differential Revision: https://phab.mercurial-scm.org/D12588
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 26 Apr 2022 09:06:30 -0700 |
parents | 9dfbea54b680 |
children | 59466b13a3ae |
line wrap: on
line diff
--- a/tests/test-merge-partial-tool.t Wed May 04 18:17:44 2022 +0200 +++ b/tests/test-merge-partial-tool.t Tue Apr 26 09:06:30 2022 -0700 @@ -120,6 +120,57 @@ e +Can disable all partial merge tools (the `head` tool would have resolved this +conflict it had been enabled) + + $ hg up -C 4 + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ hg merge 3 -t :merge3 --config merge.disable-partial-tools=yes + merging file + warning: conflicts while merging file! (edit, then use 'hg resolve --mark') + 0 files updated, 0 files merged, 0 files removed, 1 files unresolved + use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon + [1] + $ cat file + a + b + c + d + e + <<<<<<< working copy: d57edaa6e21a - test: a b c d e f3 + f3 + ||||||| common ancestor: 8ae8bb9cc43a - test: a b c d e f + f + ======= + f2 + >>>>>>> merge rev: 8c217da987be - test: a b c d e f2 + + +Can disable one partial merge tool (the `head` tool would have resolved this +conflict it had been enabled) + + $ hg up -C 4 + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ hg merge 3 -t :merge3 --config partial-merge-tools.head.disable=yes + merging file + warning: conflicts while merging file! (edit, then use 'hg resolve --mark') + 0 files updated, 0 files merged, 0 files removed, 1 files unresolved + use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon + [1] + $ cat file + b + c + d + e + <<<<<<< working copy: d57edaa6e21a - test: a b c d e f3 + f3 + ||||||| common ancestor: 8ae8bb9cc43a - test: a b c d e f + f + ======= + f2 + >>>>>>> merge rev: 8c217da987be - test: a b c d e f2 + + Only tools whose patterns match are run. We make `head` not match here, so only `tail` should run