# HG changeset patch # User Augie Fackler # Date 1606361003 18000 # Node ID 6aacc39501f79323a15eebef055050f4f1e9468d # Parent a2eda1ff22aae2724038fd6bda4ffeb4ce7332c4 gitlog: add tiprev() function Lots of stuff was broken because this was missing. Differential Revision: https://phab.mercurial-scm.org/D9402 diff -r a2eda1ff22aa -r 6aacc39501f7 hgext/git/gitlog.py --- 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