[PATCH 2 of 5] merge: set _local/_other for conflictfree merges

timeless timeless at mozdev.org
Tue Mar 22 18:21:49 EDT 2016


# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1458226168 0
#      Thu Mar 17 14:49:28 2016 +0000
# Node ID 0ff0274cf3ca9d66dd86d0f9431a06bc2ba11535
# Parent  994882c8bff031e25365a5ebf02451eba8c6d067
merge: set _local/_other for conflictfree merges

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -167,6 +167,14 @@
                 self._stateextras[filename] = extras
             elif not rtype.islower():
                 unsupported.add(rtype)
+        if self._local is None or self._other is None:
+            parents = self._repo[None].parents()
+            if len(parents) == 2:
+                # we have two parents, we have a merge, but no conflicts.
+                p1, p2 = parents
+                self._local = p1.node()
+                self._other = p2.node()
+
         self._results = {}
         self._dirty = False
 


More information about the Mercurial-devel mailing list