diff mercurial/hg.py @ 19332:0af993732f66 stable

update: remove .hg/graftstate on clean (issue3970) e078ea9b4ce4 introduced a check for interrupted grafts while committing. This exposed a bug where hg update --clean didn't remove that file.
author Siddharth Agarwal <sid0@fb.com>
date Fri, 28 Jun 2013 16:58:31 -0700
parents a9c443b3b240
children 648d1974b3f3
line wrap: on
line diff
--- a/mercurial/hg.py	Wed Jun 19 23:05:40 2013 -0700
+++ b/mercurial/hg.py	Fri Jun 28 16:58:31 2013 -0700
@@ -472,6 +472,7 @@
 def clean(repo, node, show_stats=True):
     """forcibly switch the working directory to node, clobbering changes"""
     stats = updaterepo(repo, node, True)
+    util.unlinkpath(repo.join('graftstate'), ignoremissing=True)
     if show_stats:
         _showstats(repo, stats)
     return stats[3] > 0