##// END OF EJS Templates
merge: improve error messages for path conflicts during update...
Mark Thomas -
r34554:0217d668 default
parent child Browse files
Show More
@@ -741,13 +741,23 b' def _checkunknownfiles(repo, wctx, mctx,'
741 actions[f] = ('g', (fl2, True), "remote created")
741 actions[f] = ('g', (fl2, True), "remote created")
742
742
743 for f in sorted(abortconflicts):
743 for f in sorted(abortconflicts):
744 repo.ui.warn(_("%s: untracked file differs\n") % f)
744 warn = repo.ui.warn
745 if f in pathconflicts:
746 if repo.wvfs.isfileorlink(f):
747 warn(_("%s: untracked file conflicts with directory\n") % f)
748 else:
749 warn(_("%s: untracked directory conflicts with file\n") % f)
750 else:
751 warn(_("%s: untracked file differs\n") % f)
745 if abortconflicts:
752 if abortconflicts:
746 raise error.Abort(_("untracked files in working directory "
753 raise error.Abort(_("untracked files in working directory "
747 "differ from files in requested revision"))
754 "differ from files in requested revision"))
748
755
749 for f in sorted(warnconflicts):
756 for f in sorted(warnconflicts):
750 repo.ui.warn(_("%s: replacing untracked file\n") % f)
757 if repo.wvfs.isfileorlink(f):
758 repo.ui.warn(_("%s: replacing untracked file\n") % f)
759 else:
760 repo.ui.warn(_("%s: replacing untracked files in directory\n") % f)
751
761
752 for f, (m, args, msg) in actions.iteritems():
762 for f, (m, args, msg) in actions.iteritems():
753 if m == 'c':
763 if m == 'c':
@@ -30,7 +30,7 b" of the files in a commit we're updating "
30
30
31 $ mkdir b && touch b/nonempty
31 $ mkdir b && touch b/nonempty
32 $ hg up
32 $ hg up
33 b: untracked file differs
33 b: untracked directory conflicts with file
34 abort: untracked files in working directory differ from files in requested revision
34 abort: untracked files in working directory differ from files in requested revision
35 [255]
35 [255]
36 $ hg ci
36 $ hg ci
@@ -37,7 +37,7 b' Basic update - local directory conflicts'
37 $ mkdir a
37 $ mkdir a
38 $ echo 3 > a/b
38 $ echo 3 > a/b
39 $ hg up file
39 $ hg up file
40 a: untracked file differs
40 a: untracked directory conflicts with file
41 abort: untracked files in working directory differ from files in requested revision
41 abort: untracked files in working directory differ from files in requested revision
42 [255]
42 [255]
43 $ hg up --clean file
43 $ hg up --clean file
@@ -50,7 +50,7 b' make sure that this does not erase untra'
50 $ hg st
50 $ hg st
51 ? name/file
51 ? name/file
52 $ hg up 1
52 $ hg up 1
53 name: untracked file differs
53 name: untracked directory conflicts with file
54 abort: untracked files in working directory differ from files in requested revision
54 abort: untracked files in working directory differ from files in requested revision
55 [255]
55 [255]
56 $ cd ..
56 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now