Mercurial > evolve
changeset 6045:2da56c12e70f
evolve: simplify latest_evolution_date()
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Tue, 05 Oct 2021 09:30:02 +0300 |
parents | b47a952b244a |
children | a49a90a5fa5b |
files | hgext3rd/evolve/evolvecmd.py |
diffstat | 1 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py Tue Oct 05 09:29:36 2021 +0300 +++ b/hgext3rd/evolve/evolvecmd.py Tue Oct 05 09:30:02 2021 +0300 @@ -1149,13 +1149,12 @@ return sorted(divergent_revs, key=lambda rev: (-ledmap[rev], rev)) def latest_evolution_date(repo, ctx): - """Return latest evolution date of a changeset `ctx`""" + """Return latest evolution date of `ctx`""" node = ctx.node() - pred = list(obsutil.closestpredecessors(repo, node)) - pred.append(node) - markers = obsutil.getmarkers(repo, nodes=pred, exclusive=True) - markers_dates = (m.date() for m in markers) - return max(markers_dates) + nodes = list(obsutil.closestpredecessors(repo, node)) + nodes.append(node) + markers = obsutil.getmarkers(repo, nodes=nodes, exclusive=True) + return max(m.date() for m in markers) def divergentdata(ctx): """return base, other part of a conflict