mercurial/hg.py
changeset 44160 abcc82bf0717
parent 44060 a61287a95dc3
child 44175 2b6632d64328
equal deleted inserted replaced
44159:df2162672d24 44160:abcc82bf0717
  1038 
  1038 
  1039 
  1039 
  1040 def clean(repo, node, show_stats=True, quietempty=False):
  1040 def clean(repo, node, show_stats=True, quietempty=False):
  1041     """forcibly switch the working directory to node, clobbering changes"""
  1041     """forcibly switch the working directory to node, clobbering changes"""
  1042     stats = updaterepo(repo, node, True)
  1042     stats = updaterepo(repo, node, True)
       
  1043     assert stats.unresolvedcount == 0
  1043     repo.vfs.unlinkpath(b'graftstate', ignoremissing=True)
  1044     repo.vfs.unlinkpath(b'graftstate', ignoremissing=True)
  1044     if show_stats:
  1045     if show_stats:
  1045         _showstats(repo, stats, quietempty)
  1046         _showstats(repo, stats, quietempty)
  1046     return stats.unresolvedcount > 0
       
  1047 
  1047 
  1048 
  1048 
  1049 # naming conflict in updatetotally()
  1049 # naming conflict in updatetotally()
  1050 _clean = clean
  1050 _clean = clean
  1051 
  1051