eggs/mercurial-1.7.3-py2.6-linux-x86_64.egg/mercurial/node.py
changeset 69 c6bca38c1cbf
equal deleted inserted replaced
68:5ff1fc726848 69:c6bca38c1cbf
       
     1 # node.py - basic nodeid manipulation for mercurial
       
     2 #
       
     3 # Copyright 2005, 2006 Matt Mackall <mpm@selenic.com>
       
     4 #
       
     5 # This software may be used and distributed according to the terms of the
       
     6 # GNU General Public License version 2 or any later version.
       
     7 
       
     8 import binascii
       
     9 
       
    10 nullrev = -1
       
    11 nullid = "\0" * 20
       
    12 
       
    13 # This ugly style has a noticeable effect in manifest parsing
       
    14 hex = binascii.hexlify
       
    15 bin = binascii.unhexlify
       
    16 
       
    17 def short(node):
       
    18     return hex(node[:6])