Patchwork D6036: absorb: let scmutil.cleanupnodes() take care of setting phase

login
register
mail settings
Submitter phabricator
Date Feb. 28, 2019, 1:48 a.m.
Message ID <815ec7bfb6cb6e6ee098e7e19a81d113@localhost.localdomain>
Download mbox | patch
Permalink /patch/38962/
State Not Applicable
Headers show

Comments

phabricator - Feb. 28, 2019, 1:48 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGb38c7304974f: absorb: let scmutil.cleanupnodes() take care of setting phase (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6036?vs=14263&id=14266

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

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
@@ -848,10 +848,7 @@ 
         if self._useobsolete and self.ui.configbool('absorb', 'add-noise'):
             extra['absorb_source'] = ctx.hex()
         mctx = overlaycontext(memworkingcopy, ctx, parents, extra=extra)
-        # preserve phase
-        with mctx.repo().ui.configoverride({
-            ('phases', 'new-commit'): ctx.phase()}):
-            return mctx.commit()
+        return mctx.commit()
 
     @util.propertycache
     def _useobsolete(self):
@@ -862,7 +859,8 @@ 
         replacements = {k: ([v] if v is not None else [])
                         for k, v in self.replacemap.iteritems()}
         if replacements:
-            scmutil.cleanupnodes(self.repo, replacements, operation='absorb')
+            scmutil.cleanupnodes(self.repo, replacements, operation='absorb',
+                                 fixphase=True)
 
 def _parsechunk(hunk):
     """(crecord.uihunk or patch.recordhunk) -> (path, (a1, a2, [bline]))"""