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
  Looks like everything is meant to be a str here.

REPOSITORY
  rHG Mercurial

BRANCH
  stable

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

AFFECTED FILES
  hgext/git/gitlog.py
  tests/test-git-interop.t

CHANGE DETAILS

diff --git a/tests/test-git-interop.t b/tests/test-git-interop.t
--- a/tests/test-git-interop.t
+++ b/tests/test-git-interop.t
@@ -271,6 +271,20 @@
   $ hg log -r ae1ab744f95bfd5b07cf573baef98a778058537b --template 
"{shortest(node,1)}\n"
   ae
 
+This covers gitlog._partialmatch()
+  $ hg log -r a
+  abort: ambiguous revision identifier: a
+  [10]
+  $ hg log -r a1
+  changeset:   2:a1983dd7fb19
+  user:        test <test>
+  date:        Fri Mar 06 14:26:27 2020 -0500
+  summary:     more alpha
+  
+  $ hg log -r dead
+  abort: unknown revision 'dead'
+  [255]
+
 This coveres changelog.findmissing()
   $ hg merge --preview 3d9be8deba43
 
diff --git a/hgext/git/gitlog.py b/hgext/git/gitlog.py
--- a/hgext/git/gitlog.py
+++ b/hgext/git/gitlog.py
@@ -168,7 +168,8 @@
         candidates = [
             bin(x[0])
             for x in self._db.execute(
-                'SELECT node FROM changelog WHERE node LIKE ?', (id + b'%',)
+                'SELECT node FROM changelog WHERE node LIKE ?',
+                (pycompat.sysstr(id + b'%'),),
             )
         ]
         if nullhex.startswith(id):



To: mharbison72, durin42, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to