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

spectral (Kyle Lippincott) phabricator at mercurial-scm.org
Fri Aug 17 18:36:05 EDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHGb623c7b23695: nodes: expand/comment the magic nodes so they are more easily searchable (authored by spectral, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4331?vs=10425&id=10426

REVISION DETAIL
  https://phab.mercurial-scm.org/D4331

AFFECTED FILES
  mercurial/node.py

CHANGE DETAILS

diff --git a/mercurial/node.py b/mercurial/node.py
--- a/mercurial/node.py
+++ b/mercurial/node.py
@@ -21,20 +21,25 @@
         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.
-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
+# In hex, this is 'ffffffffffffffffffffffffffffffffffffffff'
 wdirid = b"\xff" * 20
 wdirhex = hex(wdirid)
 



To: spectral, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list