Mercurial > hg
comparison mercurial/bookmarks.py @ 44824: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 | 8407031f195f |
children | 9acbe30953e8 |
comparison
equal
deleted
inserted
replaced
44821:edffab2cf0ea | 44824:f189c5280d48 |
---|---|
752 ) | 752 ) |
753 | 753 |
754 if changed: | 754 if changed: |
755 tr = trfunc() | 755 tr = trfunc() |
756 changes = [] | 756 changes = [] |
757 for b, node, writer, msg in sorted(changed): | 757 key = lambda t: (t[0], t[1] or b'') |
758 for b, node, writer, msg in sorted(changed, key=key): | |
758 changes.append((b, node)) | 759 changes.append((b, node)) |
759 writer(msg) | 760 writer(msg) |
760 localmarks.applychanges(repo, tr, changes) | 761 localmarks.applychanges(repo, tr, changes) |
761 | 762 |
762 | 763 |