Mercurial > public > mercurial-scm > hg-stable
diff mercurial/filemerge.py @ 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 | e15966216aec |
children | a4da463df6cf |
line wrap: on
line diff
--- a/mercurial/filemerge.py Sun Aug 16 00:24:29 2015 +0200 +++ b/mercurial/filemerge.py Sun Aug 16 10:19:00 2015 +0200 @@ -248,6 +248,17 @@ return True, r return False, 0 +@internaltool('union', True, + _("merging %s incomplete! " + "(edit conflicts, then use 'hg resolve --mark')\n")) +def _iunion(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): + """ + Uses the internal non-interactive simple merge algorithm for merging + files. It will use both left and right sides for conflict regions. + No markers are inserted.""" + return _merge(repo, mynode, orig, fcd, fco, fca, toolconf, + files, labels, 'union') + @internaltool('merge', True, _("merging %s incomplete! " "(edit conflicts, then use 'hg resolve --mark')\n"))