diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -1240,12 +1240,27 @@ wctx[f].remove() numupdates = sum(len(l) for m, l in actions.items() if m != 'k') + z = 0 if [a for a in actions['r'] if a[0] == '.hgsubstate']: subrepo.submerge(repo, wctx, mctx, wctx, overwrite, labels) - # remove in parallel (must come first) - z = 0 + # record path conflicts + for f, args, msg in actions['p']: + f1, fo = args + s = repo.ui.status + s(_("%s: path conflict - a file or link has the same name as a " + "directory\n") % f) + if fo == 'l': + s(_("the local file has been renamed to %s\n") % f1) + else: + s(_("the remote file has been renamed to %s\n") % f1) + s(_("resolve manually then use 'hg resolve --mark %s'\n") % f) + ms.addpath(f, f1, fo) + z += 1 + progress(_updating, z, item=f, total=numupdates, unit=_files) + + # remove in parallel (must come before getting) prog = worker.worker(repo.ui, 0.001, batchremove, (repo, wctx), actions['r']) for i, item in prog: @@ -1695,7 +1710,8 @@ del actionbyfile[f] # Convert to dictionary-of-lists format - actions = dict((m, []) for m in 'a am f g cd dc r dm dg m e k'.split()) + actions = dict((m, []) + for m in 'a am f g cd dc r dm dg m e k p'.split()) for f, (m, args, msg) in actionbyfile.iteritems(): if m not in actions: actions[m] = [] diff --git a/mercurial/sparse.py b/mercurial/sparse.py --- a/mercurial/sparse.py +++ b/mercurial/sparse.py @@ -486,7 +486,8 @@ dropped.append(file) # Apply changes to disk - typeactions = dict((m, []) for m in 'a f g am cd dc r dm dg m e k'.split()) + typeactions = dict((m, []) + for m in 'a f g am cd dc r dm dg m e k p'.split()) for f, (m, args, msg) in actions.iteritems(): if m not in typeactions: typeactions[m] = []