# HG changeset patch # User Augie Fackler # Date 2020-11-26 03:23:23 # 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 --git a/hgext/git/gitlog.py b/hgext/git/gitlog.py --- a/hgext/git/gitlog.py +++ b/hgext/git/gitlog.py @@ -148,6 +148,14 @@ class changelog(baselog): ) 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