changeset 23398:9da5a7413eb8

merge: use None as filename for base in 'both created' conflicts Instead of using a file that we know is not in the common ancestor's maniffest, let's use None. This is safe as the only place that cares about the value (applyupdates) already checks if the item exists in the ancestor.
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 24 Nov 2014 16:17:02 -0800
parents c7c95838be9a
children fd5247a88e63
files mercurial/merge.py
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/merge.py	Mon Nov 24 16:42:36 2014 -0800
+++ b/mercurial/merge.py	Mon Nov 24 16:17:02 2014 -0800
@@ -421,9 +421,7 @@
                     actions['m'].append((f, (f, f, fa, False, pa.node()),
                                    "both renamed from " + fa))
                 else:
-                    # Note: f as ancestor is wrong - we can't really make a
-                    # 3-way merge without an ancestor file.
-                    actions['m'].append((f, (f, f, f, False, pa.node()),
+                    actions['m'].append((f, (f, f, None, False, pa.node()),
                                    "both created"))
             else:
                 a = ma[f]
@@ -493,8 +491,7 @@
             else:
                 different = _checkunknownfile(repo, wctx, p2, f)
                 if force and branchmerge and different:
-                    # FIXME: This is wrong - f is not in ma ...
-                    actions['m'].append((f, (f, f, f, False, pa.node()),
+                    actions['m'].append((f, (f, f, None, False, pa.node()),
                                     "remote differs from untracked local"))
                 elif not force and different:
                     aborts.append((f, 'ud'))