--- a/mercurial/repair.py Tue Mar 06 18:42:52 2012 +0200
+++ b/mercurial/repair.py Tue Mar 06 18:43:05 2012 +0200
@@ -56,7 +56,7 @@
def strip(ui, repo, node, backup="all"):
cl = repo.changelog
- # TODO delete the undo files, and handle undo of merge sets
+ # TODO handle undo of merge sets
striprev = cl.rev(node)
keeppartialbundle = backup == 'strip'
@@ -142,6 +142,14 @@
if not keeppartialbundle:
os.unlink(chgrpfile)
+ # remove undo files
+ for undofile in repo.undofiles():
+ try:
+ os.unlink(undofile)
+ except OSError, e:
+ if e.errno != errno.ENOENT:
+ ui.warn(_('error removing %s: %s\n') % (undofile, str(e)))
+
for m in updatebm:
bm[m] = repo['.'].node()
bookmarks.write(repo)