histedit: make cleanupnode more robust
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 31 Jul 2015 15:46:49 -0700
changeset 25906 5d0e1e95e30f
parent 25905 80149d0b6842
child 25907 4b92d11e48fe
histedit: make cleanupnode more robust The goal of this function is to strip content out of the repository. We do not really care if this content is visible or cleanup node not and we should proceed anyway. None of the internal actions are subject to this, however, a third party extension running arbitrary commands during histedit is affected by this.
hgext/histedit.py
--- a/hgext/histedit.py	Wed Jul 29 13:21:03 2015 -0700
+++ b/hgext/histedit.py	Fri Jul 31 15:46:49 2015 -0700
@@ -1132,6 +1132,10 @@
     lock = None
     try:
         lock = repo.lock()
+        # do not let filtering get in the way of the cleanse
+        # we should probably get ride of obsolescence marker created during the
+        # histedit, but we currently do not have such information.
+        repo = repo.unfiltered()
         # Find all node that need to be stripped
         # (we hg %lr instead of %ln to silently ignore unknown item
         nm = repo.changelog.nodemap