[PATCH] Report several files at once in _checkunknown
Jose E. Marchesi
jco at terma.com
Fri Aug 5 07:46:01 CDT 2011
Hi.
Just a little patch modifying _checkounknown to report a full list of
untracked files collisioning with files coming in the requested
revision. It is painful to have to run "hg update" as much times as
conflicting files!
Note that I used 'print' to emit the "? filename" lines, which may not
be correct.
Cheers!
diff -r f4522df38c65 mercurial/merge.py
--- a/mercurial/merge.py Tue Aug 02 15:21:10 2011 -0400
+++ b/mercurial/merge.py Fri Aug 05 14:45:14 2011 +0200
@@ -83,10 +83,15 @@
def _checkunknown(wctx, mctx):
"check for collisions between unknown files and files in mctx"
+ abort = False
for f in wctx.unknown():
if f in mctx and mctx[f].cmp(wctx[f]):
- raise util.Abort(_("untracked file in working directory differs"
- " from file in requested revision: '%s'") % f)
+ print("? " + f)
+ abort = True
+ if abort:
+ raise util.Abort("untracked files above in working directory differ"
+ " from files in requested revision")
+
def _checkcollision(mctx):
"check for case folding collisions in the destination context"
More information about the Mercurial-devel
mailing list