mercurial/node.py
changeset 28585 a3f3fdac8433
parent 26980 18f50b8cbf1e
child 30360 0298a07f64d9
equal deleted inserted replaced
28584:d69172ddfdca 28585:a3f3fdac8433
    12 # This ugly style has a noticeable effect in manifest parsing
    12 # This ugly style has a noticeable effect in manifest parsing
    13 hex = binascii.hexlify
    13 hex = binascii.hexlify
    14 bin = binascii.unhexlify
    14 bin = binascii.unhexlify
    15 
    15 
    16 nullrev = -1
    16 nullrev = -1
    17 nullid = "\0" * 20
    17 nullid = b"\0" * 20
    18 nullhex = hex(nullid)
    18 nullhex = hex(nullid)
    19 
    19 
    20 # pseudo identifiers for working directory
    20 # pseudo identifiers for working directory
    21 # (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)
    22 wdirrev = 0x7fffffff
    22 wdirrev = 0x7fffffff
    23 wdirid = "\xff" * 20
    23 wdirid = b"\xff" * 20
    24 
    24 
    25 def short(node):
    25 def short(node):
    26     return hex(node[:6])
    26     return hex(node[:6])