# HG changeset patch # User Siddharth Agarwal # Date 1444197441 25200 # Node ID eb9876aa8770d5cf5ec9f17dc4326ff3d5656dd9 # Parent 0ffa7fe1076be4cbbbfe2a44610f3d560e9911b6 filemerge: use symlinkcheck for :merge and :union This exposes a couple of bugs, both of which will be fixed in upcoming patches. diff -r 0ffa7fe1076b -r eb9876aa8770 mercurial/filemerge.py --- a/mercurial/filemerge.py Tue Oct 06 22:56:33 2015 -0700 +++ b/mercurial/filemerge.py Tue Oct 06 22:57:21 2015 -0700 @@ -242,11 +242,6 @@ files. It will fail if there are any conflicts and leave markers in the partially merged file. Markers will have two sections, one for each side of merge, unless mode equals 'union' which suppresses the markers.""" - tool, toolpath, binary, symlink = toolconf - if symlink: - repo.ui.warn(_('warning: internal :merge cannot merge symlinks ' - 'for %s\n') % fcd.path()) - return False, 1 r = _premerge(repo, toolconf, files, labels=labels) if r: a, b, c, back = files @@ -259,7 +254,8 @@ @internaltool('union', True, _("merging %s incomplete! " - "(edit conflicts, then use 'hg resolve --mark')\n")) + "(edit conflicts, then use 'hg resolve --mark')\n"), + precheck=_symlinkcheck) def _iunion(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): """ Uses the internal non-interactive simple merge algorithm for merging @@ -270,7 +266,8 @@ @internaltool('merge', True, _("merging %s incomplete! " - "(edit conflicts, then use 'hg resolve --mark')\n")) + "(edit conflicts, then use 'hg resolve --mark')\n"), + precheck=_symlinkcheck) def _imerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): """ Uses the internal non-interactive simple merge algorithm for merging