changeset 41816:a008e0af892e

absorb: use scmutil.cleanupnodes() so operation gets set The operation is useful for e.g. `hg obslog` output. Differential Revision: https://phab.mercurial-scm.org/D6034
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 27 Feb 2019 16:15:10 -0800
parents 00c909de1143
children c91321e86071
files hgext/absorb.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/absorb.py	Mon Feb 25 09:02:29 2019 +0100
+++ b/hgext/absorb.py	Wed Feb 27 16:15:10 2019 -0800
@@ -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()