Mercurial > public > mercurial-scm > hg-stable
diff mercurial/revset.py @ 47081:a407fe56d6e8
core: don't hard-code hex node lengths
Differential Revision: https://phab.mercurial-scm.org/D10535
author | Joerg Sonnenberger <joerg@bec.de> |
---|---|
date | Fri, 30 Apr 2021 03:09:16 +0200 |
parents | 1e2f2c782928 |
children | ba673c821b9d |
line wrap: on
line diff
--- a/mercurial/revset.py Mon May 03 02:33:00 2021 +0200 +++ b/mercurial/revset.py Fri Apr 30 03:09:16 2021 +0200 @@ -1724,7 +1724,7 @@ def _node(repo, n): """process a node input""" rn = None - if len(n) == 40: + if len(n) == 2 * repo.nodeconstants.nodelen: try: rn = repo.changelog.rev(bin(n)) except error.WdirUnsupported: