branch | stable |
changeset 47046 | 497cedcb6504 |
parent 47045 | 846920d89476 |
child 47048 | 03c73fc6f89a |
--- a/hgext/git/gitlog.py Tue Apr 27 00:26:12 2021 -0400 +++ b/hgext/git/gitlog.py Tue Apr 27 12:31:30 2021 -0400 @@ -159,8 +159,11 @@ def tiprev(self): t = self._db.execute( 'SELECT rev FROM changelog ' 'ORDER BY REV DESC ' 'LIMIT 1' - ) - return next(t) + ).fetchone() + + if t is not None: + return t[0] + return -1 def _partialmatch(self, id): if wdirhex.startswith(id):