--- a/mercurial/merge.py Thu Mar 22 17:08:05 2012 -0500
+++ b/mercurial/merge.py Mon Mar 26 16:41:54 2012 -0500
@@ -84,6 +84,7 @@
def _checkunknownfile(repo, wctx, mctx, f):
return (not repo.dirstate._ignore(f)
and os.path.exists(repo.wjoin(f))
+ and repo.dirstate.normalize(f) not in repo.dirstate
and mctx[f].cmp(wctx[f]))
def _checkunknown(repo, wctx, mctx):
@@ -545,8 +546,6 @@
if not force and (wc.files() or wc.deleted()):
raise util.Abort(_("outstanding uncommitted changes"),
hint=_("use 'hg status' to list changes"))
- if not force:
- _checkunknown(repo, wc, p2)
for s in wc.substate:
if wc.sub(s).dirty():
raise util.Abort(_("outstanding uncommitted changes in "
@@ -570,6 +569,8 @@
folding = not util.checkcase(repo.path)
if folding:
_checkcollision(p2, branchmerge and p1)
+ if not force:
+ _checkunknown(repo, wc, p2)
action += _forgetremoved(wc, p2, branchmerge)
action += manifestmerge(repo, wc, p2, pa, overwrite, partial)