merge: warn when internal:merge cannot merge symlinks
authorMads Kiilerich <mads@kiilerich.com>
Tue, 15 Jan 2013 01:05:11 +0100
changeset 18325 297bf69966a0
parent 18324 2eae2f9e85ef
child 18326 614f769e6aa7
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.
mercurial/filemerge.py
tests/test-merge-tools.t
--- 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