Skip to content
Snippets Groups Projects
Commit b623c7b2 authored by Kyle Lippincott's avatar Kyle Lippincott
Browse files

nodes: expand/comment the magic nodes so they are more easily searchable

We just encountered `000000000000modified`, and it was quite annoying to search
for these, even though I knew they existed.  For those that don't know that they
exist, this is essentially impossible to search for :)

(Technically we encountered it in its hex form,
3030303030303030303030306d6f646966696564, so I'm adding comments with those
forms in case that's helpful to people in the future).

Differential Revision: https://phab.mercurial-scm.org/D4331
parent 5f924aa0
No related merge requests found
......@@ -21,8 +21,9 @@
raise TypeError(e)
nullrev = -1
# In hex, this is '0000000000000000000000000000000000000000'
nullid = b"\0" * 20
nullhex = hex(nullid)
# Phony node value to stand-in for new files in some uses of
# manifests.
......@@ -24,14 +25,17 @@
nullid = b"\0" * 20
nullhex = hex(nullid)
# Phony node value to stand-in for new files in some uses of
# manifests.
newnodeid = '!' * 20
addednodeid = ('0' * 15) + 'added'
modifiednodeid = ('0' * 12) + 'modified'
# In hex, this is '2121212121212121212121212121212121212121'
newnodeid = '!!!!!!!!!!!!!!!!!!!!'
# In hex, this is '0000000000000000000000000000006164646564'
addednodeid = '000000000000000added'
# In hex, this is '0000000000000000000000006d6f646966696564'
modifiednodeid = '000000000000modified'
wdirfilenodeids = {newnodeid, addednodeid, modifiednodeid}
# pseudo identifiers for working directory
# (they are experimental, so don't add too many dependencies on them)
wdirrev = 0x7fffffff
......@@ -32,9 +36,10 @@
wdirfilenodeids = {newnodeid, addednodeid, modifiednodeid}
# pseudo identifiers for working directory
# (they are experimental, so don't add too many dependencies on them)
wdirrev = 0x7fffffff
# In hex, this is 'ffffffffffffffffffffffffffffffffffffffff'
wdirid = b"\xff" * 20
wdirhex = hex(wdirid)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment