##// END OF EJS Templates
git: fix partial node matching...
Matt Harbison -
r47819:846920d8 stable
parent child Browse files
Show More
@@ -168,7 +168,8 b' class changelog(baselog):'
168 candidates = [
168 candidates = [
169 bin(x[0])
169 bin(x[0])
170 for x in self._db.execute(
170 for x in self._db.execute(
171 'SELECT node FROM changelog WHERE node LIKE ?', (id + b'%',)
171 'SELECT node FROM changelog WHERE node LIKE ?',
172 (pycompat.sysstr(id + b'%'),),
172 )
173 )
173 ]
174 ]
174 if nullhex.startswith(id):
175 if nullhex.startswith(id):
@@ -271,6 +271,20 b' node|shortest works correctly'
271 $ hg log -r ae1ab744f95bfd5b07cf573baef98a778058537b --template "{shortest(node,1)}\n"
271 $ hg log -r ae1ab744f95bfd5b07cf573baef98a778058537b --template "{shortest(node,1)}\n"
272 ae
272 ae
273
273
274 This covers gitlog._partialmatch()
275 $ hg log -r a
276 abort: ambiguous revision identifier: a
277 [10]
278 $ hg log -r a1
279 changeset: 2:a1983dd7fb19
280 user: test <test>
281 date: Fri Mar 06 14:26:27 2020 -0500
282 summary: more alpha
283
284 $ hg log -r dead
285 abort: unknown revision 'dead'
286 [255]
287
274 This coveres changelog.findmissing()
288 This coveres changelog.findmissing()
275 $ hg merge --preview 3d9be8deba43
289 $ hg merge --preview 3d9be8deba43
276
290
General Comments 0
You need to be logged in to leave comments. Login now