Mercurial > public > mercurial-scm > hg
comparison hgext/git/gitlog.py @ 47045:846920d89476 stable
git: fix partial node matching
Looks like everything is meant to be a str here.
Differential Revision: https://phab.mercurial-scm.org/D10521
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Tue, 27 Apr 2021 00:26:12 -0400 |
parents | 048beb0167a7 |
children | 497cedcb6504 |
comparison
equal
deleted
inserted
replaced
47044:96d295dd4968 | 47045:846920d89476 |
---|---|
166 if wdirhex.startswith(id): | 166 if wdirhex.startswith(id): |
167 raise error.WdirUnsupported | 167 raise error.WdirUnsupported |
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): |
175 candidates.append(nullid) | 176 candidates.append(nullid) |
176 if len(candidates) > 1: | 177 if len(candidates) > 1: |