diff mercurial/merge.py @ 16492:774e2dcd0a65 stable

update: fix case-collision with a clean wd and no --clean cbf2ea2f5ca1 introduced some logic to avoid case-collision detection between source and destination revisions when it does not make sense: clean or to be cleaned working directories. Unfortunately, part of it was flawed and the related test was broken by another bug. This patch disables cross revision case collision detection for updates without option or with --check, if the working directory is clean.
author Patrick Mezard <patrick@mezard.eu>
date Mon, 23 Apr 2012 14:32:59 +0200
parents cbf2ea2f5ca1
children 11212babc690
line wrap: on
line diff
--- a/mercurial/merge.py	Mon Apr 23 12:12:04 2012 +0200
+++ b/mercurial/merge.py	Mon Apr 23 14:32:59 2012 +0200
@@ -577,7 +577,8 @@
         folding = not util.checkcase(repo.path)
         if folding:
             # collision check is not needed for clean update
-            if not branchmerge and force:
+            if (not branchmerge and
+                (force or not wc.dirty(missing=True, branch=False))):
                 _checkcollision(p2, None)
             else:
                 _checkcollision(p2, wc)