# HG changeset patch # User Matt Mackall # Date 1332798114 18000 # Node ID 2b0a406d3043b0895b0267a9616b5e65ea33f952 # Parent 531e69ff348fc7fb6e23d9f07b594a50c5baf879 merge: fix unknown file merge detection for case-folding systems This was triggering some test failures on Mac. diff -r 531e69ff348f -r 2b0a406d3043 mercurial/merge.py --- 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) diff -r 531e69ff348f -r 2b0a406d3043 tests/test-casefolding.t --- a/tests/test-casefolding.t Thu Mar 22 17:08:05 2012 -0500 +++ b/tests/test-casefolding.t Mon Mar 26 16:41:54 2012 -0500 @@ -66,7 +66,7 @@ 0 files updated, 0 files merged, 1 files removed, 0 files unresolved $ echo gold > a $ hg up - a: untracked file differs + A: untracked file differs abort: untracked files in working directory differ from files in requested revision [255] $ cat a