diff mercurial/merge.py @ 23478:30b602168c3b stable

update: don't overwrite untracked ignored files on update When looking for untracked files that would conflict with a tracked file in the target revision (or the remote side of a merge), we explcitly exclude ignored files. The code was added in 7e30f5f2285f (merge: refactor unknown file conflict checking, 2012-02-09), but it seems like only unknown, not ignored, files were considered since the beginning of time. Although ignored files are mostly build outputs and backup files, we should still not overwrite them. Fix by simply removing the explicit check.
author Martin von Zweigbergk <martinvonz@google.com>
date Sun, 16 Nov 2014 23:41:44 -0800
parents 902554884335
children 406dfc63a1ad
line wrap: on
line diff
--- a/mercurial/merge.py	Tue Dec 02 17:11:01 2014 -0800
+++ b/mercurial/merge.py	Sun Nov 16 23:41:44 2014 -0800
@@ -298,8 +298,7 @@
         return r
 
 def _checkunknownfile(repo, wctx, mctx, f):
-    return (not repo.dirstate._ignore(f)
-        and os.path.isfile(repo.wjoin(f))
+    return (os.path.isfile(repo.wjoin(f))
         and repo.wopener.audit.check(f)
         and repo.dirstate.normalize(f) not in repo.dirstate
         and mctx[f].cmp(wctx[f]))