changeset 36277:18106c3bc94a

tags: don't feed both int and None to min() They're not comparable on Python 3, and we can just map None to 0. Differential Revision: https://phab.mercurial-scm.org/D2307
author Augie Fackler <augie@google.com>
date Sat, 17 Feb 2018 22:39:38 -0500
parents c95c8ab2e7ec
children a87093e2805d
files mercurial/tags.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/tags.py	Sat Feb 17 22:39:12 2018 -0500
+++ b/mercurial/tags.py	Sat Feb 17 22:39:38 2018 -0500
@@ -739,7 +739,7 @@
         entry = bytearray(prefix + fnode)
         self._raw[offset:offset + _fnodesrecsize] = entry
         # self._dirtyoffset could be None.
-        self._dirtyoffset = min(self._dirtyoffset, offset) or 0
+        self._dirtyoffset = min(self._dirtyoffset or 0, offset or 0)
 
     def write(self):
         """Perform all necessary writes to cache file.