Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
19319:ec17ddecdf64 | 19332:0af993732f66 |
---|---|
470 _update = update | 470 _update = update |
471 | 471 |
472 def clean(repo, node, show_stats=True): | 472 def clean(repo, node, show_stats=True): |
473 """forcibly switch the working directory to node, clobbering changes""" | 473 """forcibly switch the working directory to node, clobbering changes""" |
474 stats = updaterepo(repo, node, True) | 474 stats = updaterepo(repo, node, True) |
475 util.unlinkpath(repo.join('graftstate'), ignoremissing=True) | |
475 if show_stats: | 476 if show_stats: |
476 _showstats(repo, stats) | 477 _showstats(repo, stats) |
477 return stats[3] > 0 | 478 return stats[3] > 0 |
478 | 479 |
479 def merge(repo, node, force=None, remind=True): | 480 def merge(repo, node, force=None, remind=True): |