diff hgext/git/gitlog.py @ 49284:d44e3c45f0e4

py3: replace `pycompat.xrange` by `range`
author Manuel Jacob <me@manueljacob.de>
date Sun, 29 May 2022 15:17:27 +0200
parents 642e31cb55f0
children ef5f5f1cbd90
line wrap: on
line diff
--- a/hgext/git/gitlog.py	Sun May 29 12:38:54 2022 +0200
+++ b/hgext/git/gitlog.py	Sun May 29 15:17:27 2022 +0200
@@ -112,7 +112,7 @@
             return False
 
     def __iter__(self):
-        return iter(pycompat.xrange(len(self)))
+        return iter(range(len(self)))
 
     @property
     def filteredrevs(self):
@@ -186,7 +186,7 @@
 
     def shortest(self, node, minlength=1):
         nodehex = hex(node)
-        for attempt in pycompat.xrange(minlength, len(nodehex) + 1):
+        for attempt in range(minlength, len(nodehex) + 1):
             candidate = nodehex[:attempt]
             matches = int(
                 self._db.execute(