Patchwork D10525: git: use the correct type for stopping changelog.revs()

login
register
mail settings
Submitter phabricator
Date April 28, 2021, 3:08 p.m.
Message ID <differential-rev-PHID-DREV-6gyi3rokt7oaoinr5vwu-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48845/
State Superseded
Headers show

Comments

phabricator - April 28, 2021, 3:08 p.m.
mharbison72 created this revision.
Herald added a reviewer: durin42.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
pulkit accepted this revision.
This revision is now accepted and ready to land.

REVISION SUMMARY
  The `tip` function returns a binary node, but the database is expecting an int.

REPOSITORY
  rHG Mercurial

BRANCH
  stable

REVISION DETAIL
  https://phab.mercurial-scm.org/D10525

AFFECTED FILES
  hgext/git/gitlog.py

CHANGE DETAILS




To: mharbison72, durin42, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/hgext/git/gitlog.py b/hgext/git/gitlog.py
--- a/hgext/git/gitlog.py
+++ b/hgext/git/gitlog.py
@@ -147,7 +147,7 @@ 
 
     def revs(self, start=0, stop=None):
         if stop is None:
-            stop = self.tip()
+            stop = self.tiprev()
         t = self._db.execute(
             'SELECT rev FROM changelog '
             'WHERE rev >= ? AND rev <= ? '