Mercurial > public > mercurial-scm > hg
diff mercurial/merge.py @ 34553:0217d66846f7
merge: improve error messages for path conflicts during update
Differential Revision: https://phab.mercurial-scm.org/D782
author | Mark Thomas <mbthomas@fb.com> |
---|---|
date | Mon, 02 Oct 2017 14:05:30 -0700 |
parents | 33c8a6837181 |
children | 989e884d1be9 |
line wrap: on
line diff
--- a/mercurial/merge.py Mon Oct 02 14:05:30 2017 -0700 +++ b/mercurial/merge.py Mon Oct 02 14:05:30 2017 -0700 @@ -741,13 +741,23 @@ actions[f] = ('g', (fl2, True), "remote created") for f in sorted(abortconflicts): - repo.ui.warn(_("%s: untracked file differs\n") % f) + warn = repo.ui.warn + if f in pathconflicts: + if repo.wvfs.isfileorlink(f): + warn(_("%s: untracked file conflicts with directory\n") % f) + else: + warn(_("%s: untracked directory conflicts with file\n") % f) + else: + warn(_("%s: untracked file differs\n") % f) if abortconflicts: raise error.Abort(_("untracked files in working directory " "differ from files in requested revision")) for f in sorted(warnconflicts): - repo.ui.warn(_("%s: replacing untracked file\n") % f) + if repo.wvfs.isfileorlink(f): + repo.ui.warn(_("%s: replacing untracked file\n") % f) + else: + repo.ui.warn(_("%s: replacing untracked files in directory\n") % f) for f, (m, args, msg) in actions.iteritems(): if m == 'c':