Mercurial > hg-stable
changeset 44778:f189c5280d48 stable
py3: fix exception in pull when several things happen to a bookmark
Specifically, when `changes` is:
[(b'@upstream-committed', None, <function ui.status>, b'updating bookmark @upstream-committed\n'),
(b'@upstream-committed', binary-node, <function ui.warn>, b'divergent bookmark @ stored as @upstream-committed\n')]
sorting the list raises:
TypeError: '<' not supported between instances of 'bytes' and 'NoneType'
Differential Revision: https://phab.mercurial-scm.org/D8523
author | Valentin Gatien-Baron <vgatien-baron@janestreet.com> |
---|---|
date | Thu, 14 May 2020 10:24:52 -0400 |
parents | edffab2cf0ea |
children | 18e36ff8b414 |
files | mercurial/bookmarks.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/bookmarks.py Tue May 12 22:20:56 2020 +0200 +++ b/mercurial/bookmarks.py Thu May 14 10:24:52 2020 -0400 @@ -754,7 +754,8 @@ if changed: tr = trfunc() changes = [] - for b, node, writer, msg in sorted(changed): + key = lambda t: (t[0], t[1] or b'') + for b, node, writer, msg in sorted(changed, key=key): changes.append((b, node)) writer(msg) localmarks.applychanges(repo, tr, changes)