# HG changeset patch # User Anton Shestakov # Date 1633415402 -10800 # Node ID 2da56c12e70f33b42fc513b64f27abff6b13826b # Parent b47a952b244a2d4db3f5e7dfdbe30779c1dc27cf evolve: simplify latest_evolution_date() diff -r b47a952b244a -r 2da56c12e70f hgext3rd/evolve/evolvecmd.py --- 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