Mercurial > hg
comparison hgext/convert/subversion.py @ 44972:9e5f598fd29b stable
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.
author | Manuel Jacob <me@manueljacob.de> |
---|---|
date | Tue, 16 Jun 2020 14:38:50 +0200 |
parents | 423e20c78e6d |
children | 93aa152d4295 5c0d5b48e58c |
comparison
equal
deleted
inserted
replaced
44971:423e20c78e6d | 44972:9e5f598fd29b |
---|---|
815 paths, revnum, author, date, message = entry | 815 paths, revnum, author, date, message = entry |
816 if stop is None and paths: | 816 if stop is None and paths: |
817 # We do not know the latest changed revision, | 817 # We do not know the latest changed revision, |
818 # keep the first one with changed paths. | 818 # keep the first one with changed paths. |
819 break | 819 break |
820 if revnum <= stop: | 820 if stop is not None and revnum <= stop: |
821 break | 821 break |
822 | 822 |
823 for p in paths: | 823 for p in paths: |
824 if not path.startswith(p) or not paths[p].copyfrom_path: | 824 if not path.startswith(p) or not paths[p].copyfrom_path: |
825 continue | 825 continue |