changeset 43278:2c70dd03b743

py3: fix sorting of obsolete markers during push This fixes similar errors as in 01e8eefd9434: TypeError: '<' not supported between instances of 'NoneType' and 'tuple'
author Denis Laxalde <denis.laxalde@logilab.fr>
date Thu, 17 Oct 2019 13:34:21 +0200
parents 48b9fbfb00b9
children 726bd0b612a2
files mercurial/exchange.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/exchange.py	Thu Oct 17 13:30:58 2019 +0200
+++ b/mercurial/exchange.py	Thu Oct 17 13:34:21 2019 +0200
@@ -1140,7 +1140,7 @@
         return
     pushop.stepsdone.add(b'obsmarkers')
     if pushop.outobsmarkers:
-        markers = sorted(pushop.outobsmarkers)
+        markers = _sortedmarkers(pushop.outobsmarkers)
         bundle2.buildobsmarkerspart(bundler, markers)
 
 
@@ -1475,7 +1475,8 @@
     if pushop.outobsmarkers:
         pushop.ui.debug(b'try to push obsolete markers to remote\n')
         rslts = []
-        remotedata = obsolete._pushkeyescape(sorted(pushop.outobsmarkers))
+        markers = _sortedmarkers(pushop.outobsmarkers)
+        remotedata = obsolete._pushkeyescape(markers)
         for key in sorted(remotedata, reverse=True):
             # reverse sort to ensure we end with dump0
             data = remotedata[key]