changeset 30162:5cb830801855

merge: clarify warning for (not) merging flags without ancestor Give hints why it can't merge and what it will do instead.
author Mads Kiilerich <madski@unity3d.com>
date Wed, 12 Oct 2016 12:22:18 +0200
parents 339f9d93daa6
children f5607b6253da
files mercurial/merge.py tests/test-merge-types.t
diffstat 2 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/merge.py	Wed Oct 12 12:22:18 2016 +0200
+++ b/mercurial/merge.py	Wed Oct 12 12:22:18 2016 +0200
@@ -478,7 +478,9 @@
             if fca.node() == nullid and flags != flo:
                 if preresolve:
                     self._repo.ui.warn(
-                        _('warning: cannot merge flags for %s\n') % afile)
+                        _('warning: cannot merge flags for %s '
+                          'without common ancestor - keeping local flags\n')
+                        % afile)
             elif flags == fla:
                 flags = flo
         if preresolve:
--- a/tests/test-merge-types.t	Wed Oct 12 12:22:18 2016 +0200
+++ b/tests/test-merge-types.t	Wed Oct 12 12:22:18 2016 +0200
@@ -335,10 +335,10 @@
 
   $ hg merge
   merging a
-  warning: cannot merge flags for b
+  warning: cannot merge flags for b without common ancestor - keeping local flags
   merging b
   merging bx
-  warning: cannot merge flags for c
+  warning: cannot merge flags for c without common ancestor - keeping local flags
   merging d
   warning: internal :merge cannot merge symlinks for d
   warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
@@ -397,10 +397,10 @@
   $ hg up -Cqr1
   $ hg merge
   merging a
-  warning: cannot merge flags for b
+  warning: cannot merge flags for b without common ancestor - keeping local flags
   merging b
   merging bx
-  warning: cannot merge flags for c
+  warning: cannot merge flags for c without common ancestor - keeping local flags
   merging d
   warning: internal :merge cannot merge symlinks for d
   warning: conflicts while merging d! (edit, then use 'hg resolve --mark')