absorb: run cleanupnodes() within transaction also when not using obsmarkers
authorMartin von Zweigbergk <martinvonz@google.com>
Thu, 28 Feb 2019 07:45:51 -0800
changeset 41835 c6a5009ed04a
parent 41834 8e364664a999
child 41836 ae189674bdad
absorb: run cleanupnodes() within transaction also when not using obsmarkers scmutil.cleanupnodes() schedules stripping to be done after the current transaction, so we can safely run it within the transaction. This also means that the phase will be updated within the transaction, which I believe means that the initial (possibly incorrect) phase will not visible. Differential Revision: https://phab.mercurial-scm.org/D6037
hgext/absorb.py
--- a/hgext/absorb.py	Sat Mar 02 05:23:15 2019 +0530
+++ b/hgext/absorb.py	Thu Feb 28 07:45:51 2019 -0800
@@ -688,9 +688,6 @@
                 self._movebookmarks(tr)
                 if self.repo['.'].node() in self.replacemap:
                     self._moveworkingdirectoryparent()
-                if self._useobsolete:
-                    self._cleanupoldcommits()
-            if not self._useobsolete: # strip must be outside transactions
                 self._cleanupoldcommits()
         return self.finalnode