Mercurial > public > mercurial-scm > hg
diff mercurial/merge.py @ 15674:7b7f03502b5a
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 16 Dec 2011 19:05:59 -0600 |
parents | 5402fd9dd13e d550168f11ce |
children | 0bd17a4bed88 |
line wrap: on
line diff
--- a/mercurial/merge.py Thu Dec 15 16:50:21 2011 -0600 +++ b/mercurial/merge.py Fri Dec 16 19:05:59 2011 -0600 @@ -96,7 +96,7 @@ raise util.Abort(_("untracked file in working directory differs" " from file in requested revision: '%s'") % fn) -def _checkcollision(mctx): +def _checkcollision(mctx, wctx): "check for case folding collisions in the destination context" folded = {} for fn in mctx: @@ -106,6 +106,14 @@ % (fn, folded[fold])) folded[fold] = fn + if wctx: + for fn in wctx: + fold = util.normcase(fn) + mfn = folded.get(fold, None) + if mfn and (mfn != fn): + raise util.Abort(_("case-folding collision between %s and %s") + % (mfn, fn)) + def _forgetremoved(wctx, mctx, branchmerge): """ Forget removed files @@ -551,7 +559,7 @@ if not force: _checkunknown(wc, p2, folding) if folding: - _checkcollision(p2) + _checkcollision(p2, branchmerge and p1) action += _forgetremoved(wc, p2, branchmerge) action += manifestmerge(repo, wc, p2, pa, overwrite, partial)