[PATCH 3 of 4 v5] update: enable the issue4028 fix also for update

Gábor Stefanik gabor.stefanik at nng.com
Thu Aug 4 09:57:59 EDT 2016


# HG changeset patch
# User Gábor Stefanik <gabor.stefanik at nng.com>
# Date 1470307035 -7200
#      Thu Aug 04 12:37:15 2016 +0200
# Node ID b122014f9d4905c8d1fdc8269c70a65bdc209639
# Parent  465b34b0657f87b63c9fe2b36670f540eda45dea
update: enable the issue4028 fix also for update

v2: don't do unnecessary copy tracing for updates with clean working copy

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -1514,15 +1514,16 @@
                     pas = [p1]
 
         # deprecated config: merge.followcopies
-        followcopies = False
+        followcopies = repo.ui.configbool('merge', 'followcopies', True)
         if overwrite:
             pas = [wc]
+            followcopies = False
         elif pas == [p2]: # backwards
-            pas = [wc.p1()]
-        elif not branchmerge and not wc.dirty(missing=True):
-            pass
-        elif pas[0] and repo.ui.configbool('merge', 'followcopies', True):
-            followcopies = True
+            pas = [p1]
+        elif not pas[0]:
+            followcopies = False
+        if not branchmerge and not wc.dirty(missing=True):
+            followcopies = False
 
         ### calculate phase
         actionbyfile, diverge, renamedelete = calculateupdates(


More information about the Mercurial-devel mailing list