diff mercurial/merge.py @ 30200:a2804ddcf9ae

update: enable copy tracing for backwards and non-linear updates As a followup to the issue4028 series, this fixes a variant of the issue that can occur when updating with uncommited local changes. The duplicated .hgsub warning is coming from wc.dirty(). We would previously skip this call because it's only relevant when we're going to perform copy tracing, which we didn't do before. The change to the update summary line is because we now treat the rename as a proper rename (which counts as a change), rather than an add+delete pair (which counts as a change and a delete).
author Gábor Stefanik <gabor.stefanik@nng.com>
date Thu, 25 Aug 2016 22:02:26 +0200
parents 90a6c18a7c1d
children 318a24b52eeb
line wrap: on
line diff
--- a/mercurial/merge.py	Mon Sep 26 10:47:37 2016 +0200
+++ b/mercurial/merge.py	Thu Aug 25 22:02:26 2016 +0200
@@ -1555,15 +1555,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(