comparison mercurial/node.py @ 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 25e572394f5c
children 738314da6c75
comparison
equal deleted inserted replaced
25736:8854ca3fa675 25737:1a5211f2f87f
8 import binascii 8 import binascii
9 9
10 nullrev = -1 10 nullrev = -1
11 nullid = "\0" * 20 11 nullid = "\0" * 20
12 12
13 # pseudo identifiers for working directory
14 # (they are experimental, so don't add too many dependencies on them)
15 wdirrev = 0x7fffffff
16 wdirid = "\xff" * 20
17
13 # This ugly style has a noticeable effect in manifest parsing 18 # This ugly style has a noticeable effect in manifest parsing
14 hex = binascii.hexlify 19 hex = binascii.hexlify
15 bin = binascii.unhexlify 20 bin = binascii.unhexlify
16 21
17 def short(node): 22 def short(node):