gitlog: add tiprev() function
Lots of stuff was broken because this was missing.
Differential Revision: https://phab.mercurial-scm.org/D9402
--- a/hgext/git/gitlog.py Tue Nov 24 17:49:16 2020 +0100
+++ b/hgext/git/gitlog.py Wed Nov 25 22:23:23 2020 -0500
@@ -148,6 +148,14 @@
)
return (int(r[0]) for r in t)
+ def tiprev(self):
+ t = self._db.execute(
+ 'SELECT rev FROM changelog '
+ 'ORDER BY REV DESC '
+ 'LIMIT 1'
+ )
+ return next(t)
+
def _partialmatch(self, id):
if nodemod.wdirhex.startswith(id):
raise error.WdirUnsupported