Skip to content
Snippets Groups Projects
Commit 846920d8 authored by Matt Harbison's avatar Matt Harbison
Browse files

git: fix partial node matching

Looks like everything is meant to be a str here.

Differential Revision: https://phab.mercurial-scm.org/D10521
parent 96d295dd
No related branches found
No related tags found
No related merge requests found
......@@ -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):
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment