# HG changeset patch # User Pierre-Yves David # Date 1729812204 -7200 # Node ID 75123bc60b667af58eb6fdce58a714d792b97961 # Parent c53b6498ed1a837d7525799147701ece4e215c52 outgoing: move sorting in the display function This make the core code simpler. diff -r c53b6498ed1a -r 75123bc60b66 mercurial/hg.py --- a/mercurial/hg.py Fri Oct 25 01:04:38 2024 +0200 +++ b/mercurial/hg.py Fri Oct 25 01:23:24 2024 +0200 @@ -1454,6 +1454,9 @@ def display_outgoing_revs(ui, repo, o, opts): + # make sure this is ordered by revision number + cl = repo.changelog + o.sort(key=cl.rev) if opts.get(b'graph'): revdag = logcmdutil.graphrevs(repo, o, opts) ui.pager(b'outgoing') @@ -1524,11 +1527,7 @@ except: # re-raises other.close() raise - # make sure this is ordered by revision number - outgoing_revs = list(out) - cl = repo.changelog - outgoing_revs.sort(key=cl.rev) - return outgoing_revs, others + return list(out), others def verify(repo, level=None):