Mercurial > hg
diff mercurial/localrepo.py @ 47042:c5e1cc0b4c77
core: don't hard-code node length
Differential Revision: https://phab.mercurial-scm.org/D10536
author | Joerg Sonnenberger <joerg@bec.de> |
---|---|
date | Fri, 30 Apr 2021 03:19:45 +0200 |
parents | a407fe56d6e8 |
children | 64cd1496bb70 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Fri Apr 30 03:09:16 2021 +0200 +++ b/mercurial/localrepo.py Fri Apr 30 03:19:45 2021 +0200 @@ -1840,7 +1840,7 @@ # when we know that '.' won't be hidden node = self.dirstate.p1() rev = self.unfiltered().changelog.rev(node) - elif len(changeid) == 20: + elif len(changeid) == self.nodeconstants.nodelen: try: node = changeid rev = self.changelog.rev(changeid)