Patchwork D6034: absorb: use scmutil.cleanupnodes() so operation gets set

login
register
mail settings
Submitter phabricator
Date Feb. 28, 2019, 1:48 a.m.
Message ID <a7e3be6d8616ba030613411d5f3fa7e6@localhost.localdomain>
Download mbox | patch
Permalink /patch/38959/
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 rHGa008e0af892e: absorb: use scmutil.cleanupnodes() so operation gets set (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6034?vs=14261&id=14264

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

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
@@ -860,10 +860,10 @@ 
         return obsolete.isenabled(self.repo, obsolete.createmarkersopt)
 
     def _obsoleteoldcommits(self):
-        relations = [(self.repo[k], v and (self.repo[v],) or ())
-                     for k, v in self.replacemap.iteritems()]
-        if relations:
-            obsolete.createmarkers(self.repo, relations)
+        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')
 
     def _stripoldcommits(self):
         nodelist = self.replacemap.keys()