Patchwork D7984: clean: check that there are no conflicts after

login
register
mail settings
Submitter phabricator
Date Jan. 24, 2020, 11:26 p.m.
Message ID <dbbbd4f7b9dc847c53473d40dcdc30a3@localhost.localdomain>
Download mbox | patch
Permalink /patch/44628/
State Not Applicable
Headers show

Comments

phabricator - Jan. 24, 2020, 11:26 p.m.
Closed by commit rHGabcc82bf0717: clean: check that there are no conflicts after (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7984?vs=19558&id=19571

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7984/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7984

AFFECTED FILES
  mercurial/hg.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/mercurial/hg.py b/mercurial/hg.py
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -1040,10 +1040,10 @@ 
 def clean(repo, node, show_stats=True, quietempty=False):
     """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)
-    return stats.unresolvedcount > 0
 
 
 # naming conflict in updatetotally()