Mercurial > public > mercurial-scm > hg-stable
diff tests/test-merge-internal-tools-pattern.t @ 26071:ff12a6c63c3d
filemerge: add 'union' merge to internal merge tool
'union merge' is a merge strategy which adds both left and right hand side
of a conflict region. Git implements this merge strategy which is very
practical to have for merging e.g. the Changelog file.
author | Erik Huelsmann <ehuels@gmail.com> |
---|---|
date | Sun, 16 Aug 2015 10:19:00 +0200 |
parents | b63f6422d2a7 |
children | 41ef02ba329b |
line wrap: on
line diff
--- a/tests/test-merge-internal-tools-pattern.t Sun Aug 16 00:24:29 2015 +0200 +++ b/tests/test-merge-internal-tools-pattern.t Sun Aug 16 10:19:00 2015 +0200 @@ -1,5 +1,6 @@ -Make sure that the internal merge tools (internal:fail, internal:local, and -internal:other) are used when matched by a merge-pattern in hgrc +Make sure that the internal merge tools (internal:fail, internal:local, +internal:union and internal:other) are used when matched by a +merge-pattern in hgrc Make sure HGMERGE doesn't interfere with the test: @@ -110,3 +111,31 @@ $ hg stat M f +Merge using internal:union tool: + + $ hg update -C 2 + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + + $ echo "line 4a" >>f + $ hg ci -Am "Adding fourth line (commit 4)" + $ hg update 2 + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + + $ echo "line 4b" >>f + $ hg ci -Am "Adding fourth line v2 (commit 5)" + created new head + + $ echo "[merge-patterns]" > .hg/hgrc + $ echo "* = internal:union" >> .hg/hgrc + + $ hg merge 3 + merging f + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + (branch merge, don't forget to commit) + + $ cat f + line 1 + line 2 + third line + line 4b + line 4a