Mercurial > hg-stable
changeset 43168:01e8eefd9434
py3: fix sorting of obsolete markers when building bundle
Last item of marker tuple (parents) is either None or tuple. Comparison
thus fails on Python 3 with:
TypeError: '<' not supported between instances of 'tuple' and 'NoneType'
Fixing this by coercing None to the empty tuple when sorting markers in
exchange._getbundleobsmarkerpart().
author | Denis Laxalde <denis@laxalde.org> |
---|---|
date | Thu, 10 Oct 2019 20:27:34 +0200 |
parents | bca9d1a6c4c5 |
children | 3941e7063d03 |
files | mercurial/exchange.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/exchange.py Thu Oct 10 04:34:58 2019 +0200 +++ b/mercurial/exchange.py Thu Oct 10 20:27:34 2019 +0200 @@ -2567,7 +2567,8 @@ heads = repo.heads() subset = [c.node() for c in repo.set(b'::%ln', heads)] markers = repo.obsstore.relevantmarkers(subset) - markers = sorted(markers) + # last item of marker tuple ('parents') may be None or a tuple + markers = sorted(markers, key=lambda m: m[:-1] + (m[-1] or (),)) bundle2.buildobsmarkerspart(bundler, markers)