diff -r ec17ddecdf64 -r 0af993732f66 mercurial/hg.py --- 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