py3: fix comparison between int and None stable
authorManuel Jacob <me@manueljacob.de>
Tue, 16 Jun 2020 14:38:50 +0200
branchstable
changeset 44972 9e5f598fd29b
parent 44971 423e20c78e6d
child 44975 1a4b9b602e54
py3: fix comparison between int and None If stop is None, the condition was always false on Python 2, as None compares smaller than ints. Therefore we make the condition false if stop is None.
hgext/convert/subversion.py
--- a/hgext/convert/subversion.py	Tue Jun 16 14:33:49 2020 +0200
+++ b/hgext/convert/subversion.py	Tue Jun 16 14:38:50 2020 +0200
@@ -817,7 +817,7 @@
                         # We do not know the latest changed revision,
                         # keep the first one with changed paths.
                         break
-                    if revnum <= stop:
+                    if stop is not None and revnum <= stop:
                         break
 
                     for p in paths: