# HG changeset patch # User Yuya Nishihara # Date 1434978093 -32400 # Node ID 1a5211f2f87f01be2d88f2ff69385d82c7467cf3 # Parent 8854ca3fa675192e878aea92d5a9772b77ed3b2f 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. diff -r 8854ca3fa675 -r 1a5211f2f87f mercurial/node.py --- 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