merge: warn when internal:merge cannot merge symlinks
A follow-up to d084df89d948.
internal:merge should never be picked for merging symlinks ... but in the test
suite we have HGMERGE="internal:merge" which bypasses all the usual merge-tool
cleverness. Without any output it can be hard to figure out what happened and
where the problem is.
--- a/mercurial/filemerge.py Mon Jan 14 10:17:06 2013 -0600
+++ b/mercurial/filemerge.py Tue Jan 15 01:05:11 2013 +0100
@@ -208,6 +208,8 @@
the partially merged file."""
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)
--- a/tests/test-merge-tools.t Mon Jan 14 10:17:06 2013 -0600
+++ b/tests/test-merge-tools.t Tue Jan 15 01:05:11 2013 +0100
@@ -843,6 +843,7 @@
$ hg commit -qm 'f is symlink'
$ hg merge -r 2 --tool internal:merge
merging f
+ warning: internal:merge cannot merge symlinks for f
merging f 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