Mercurial > hg-stable
diff hgext/absorb.py @ 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 | 8843bc1fc14d |
children | c91321e86071 |
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()