# HG changeset patch # User Matt Mackall # Date 2011-03-22 17:00:38 # Node ID 5b3383ea67d28fd34de6657984cee822d191f686 # Parent bc41d08a5cccf997d584c16d9f493a10f7059778 merge: avoid unlinking destination of merge when case changes (issue2715) diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -338,7 +338,8 @@ def applyupdates(repo, action, wctx, mct else: merged += 1 util.set_flags(repo.wjoin(fd), 'l' in flags, 'x' in flags) - if f != fd and move and os.path.lexists(repo.wjoin(f)): + if (move and repo.dirstate.normalize(fd) != f + and os.path.lexists(repo.wjoin(f))): repo.ui.debug("removing %s\n" % f) os.unlink(repo.wjoin(f)) elif m == "g": # get