Mercurial > hg
changeset 25737:1a5211f2f87f
node: define experimental identifiers for working directory
The "ff..." node was introduced at 183965a00c76, and we also need an integer
that can be processed in revset. We could use len(repo), but it would be
likely to hide possible bugs. Instead, using INT_MAX, we can notice such bugs
by IndexError, at the cost of handling non-contiguous revisions.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Mon, 22 Jun 2015 22:01:33 +0900 |
parents | 8854ca3fa675 |
children | 04d26a3c96fd |
files | mercurial/node.py |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/node.py Sat Mar 14 17:58:18 2015 +0900 +++ b/mercurial/node.py Mon Jun 22 22:01:33 2015 +0900 @@ -10,6 +10,11 @@ nullrev = -1 nullid = "\0" * 20 +# pseudo identifiers for working directory +# (they are experimental, so don't add too many dependencies on them) +wdirrev = 0x7fffffff +wdirid = "\xff" * 20 + # This ugly style has a noticeable effect in manifest parsing hex = binascii.hexlify bin = binascii.unhexlify