mercurial/node.py
changeset 26980 18f50b8cbf1e
parent 25962 738314da6c75
child 28585 a3f3fdac8433
equal deleted inserted replaced
26979:7b038ec6c5fd 26980:18f50b8cbf1e
     7 
     7 
     8 from __future__ import absolute_import
     8 from __future__ import absolute_import
     9 
     9 
    10 import binascii
    10 import binascii
    11 
    11 
       
    12 # This ugly style has a noticeable effect in manifest parsing
       
    13 hex = binascii.hexlify
       
    14 bin = binascii.unhexlify
       
    15 
    12 nullrev = -1
    16 nullrev = -1
    13 nullid = "\0" * 20
    17 nullid = "\0" * 20
       
    18 nullhex = hex(nullid)
    14 
    19 
    15 # pseudo identifiers for working directory
    20 # pseudo identifiers for working directory
    16 # (they are experimental, so don't add too many dependencies on them)
    21 # (they are experimental, so don't add too many dependencies on them)
    17 wdirrev = 0x7fffffff
    22 wdirrev = 0x7fffffff
    18 wdirid = "\xff" * 20
    23 wdirid = "\xff" * 20
    19 
    24 
    20 # This ugly style has a noticeable effect in manifest parsing
       
    21 hex = binascii.hexlify
       
    22 bin = binascii.unhexlify
       
    23 
       
    24 def short(node):
    25 def short(node):
    25     return hex(node[:6])
    26     return hex(node[:6])