Patchwork D6037: absorb: run cleanupnodes() within transaction also when not using obsmarkers

login
register
mail settings
Submitter phabricator
Date Feb. 28, 2019, 4:03 p.m.
Message ID <differential-rev-PHID-DREV-x23ecaezkh7alos22izg-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/38965/
State Superseded
Headers show

Comments

phabricator - Feb. 28, 2019, 4:03 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/absorb.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/absorb.py b/hgext/absorb.py
--- a/hgext/absorb.py
+++ b/hgext/absorb.py
@@ -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