filemerge: run symlink check for :merge3
Just like :merge, :merge3 doesn't support merging symlinks.
--- a/mercurial/filemerge.py Wed Oct 07 00:24:44 2015 -0700
+++ b/mercurial/filemerge.py Wed Oct 07 00:27:23 2015 -0700
@@ -279,7 +279,8 @@
@internaltool('merge3', True,
_("merging %s incomplete! "
- "(edit conflicts, then use 'hg resolve --mark')\n"))
+ "(edit conflicts, then use 'hg resolve --mark')\n"),
+ precheck=_symlinkcheck)
def _imerge3(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None):
"""
Uses the internal non-interactive simple merge algorithm for merging
--- a/tests/test-merge-types.t Wed Oct 07 00:24:44 2015 -0700
+++ b/tests/test-merge-types.t Wed Oct 07 00:27:23 2015 -0700
@@ -82,6 +82,29 @@
a is an executable file with content:
a
+ $ hg update -C 1
+ 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+ $ hg merge --debug --tool :merge3
+ searching for copies back to rev 1
+ resolving manifests
+ branchmerge: True, force: False, partial: False
+ ancestor: c334dc3be0da, local: 3574f3e69b1c+, remote: 521a1e40188f
+ preserving a for resolve of a
+ a: versions differ -> m
+ picked tool ':merge3' for a (binary False symlink True)
+ merging a
+ my a@3574f3e69b1c+ other a@521a1e40188f ancestor a@c334dc3be0da
+ warning: internal :merge3 cannot merge symlinks for a
+ merging a incomplete! (edit conflicts, 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 update -C .' to abandon
+ [1]
+
+ $ tellmeabout a
+ a is an executable file with content:
+ a
+
Update to link without local change should get us a symlink (issue3316):
$ hg up -C 0