Mercurial > hg
changeset 3785:6398ff7cb705
imported patch collision
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 04 Dec 2006 17:10:31 -0600 |
parents | 1427949b8f80 |
children | 8d603f8567ae |
files | mercurial/merge.py |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/merge.py Mon Dec 04 17:10:29 2006 -0600 +++ b/mercurial/merge.py Mon Dec 04 17:10:31 2006 -0600 @@ -68,6 +68,16 @@ raise util.Abort(_("untracked local file '%s' differs"\ " from remote version") % f) +def checkcollision(mctx): + "check for case folding collisions in the destination context" + folded = {} + for fn in mctx.manifest(): + fold = fn.lower() + if fold in folded: + raise util.Abort(_("case-folding collision between %s and %s") + % (fn, folded[fold])) + folded[fold] = fn + def forgetremoved(wctx, mctx): """ Forget removed files @@ -460,6 +470,8 @@ action = [] if not force: checkunknown(wc, p2) + if not util.checkfolding(repo.path): + checkcollision(p2) if not branchmerge: action += forgetremoved(wc, p2) action += manifestmerge(repo, wc, p2, pa, overwrite, partial)