diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -1041,7 +1041,6 @@ """forcibly switch the working directory to node, clobbering changes""" stats = updaterepo(repo, node, True) assert stats.unresolvedcount == 0 - repo.vfs.unlinkpath(b'graftstate', ignoremissing=True) if show_stats: _showstats(repo, stats, quietempty)