Mercurial > hg
changeset 52084:75123bc60b66 stable
outgoing: move sorting in the display function
This make the core code simpler.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 25 Oct 2024 01:23:24 +0200 |
parents | c53b6498ed1a |
children | 653b7a19f1de |
files | mercurial/hg.py |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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):