eggs/mercurial-1.7.3-py2.6-linux-x86_64.egg/mercurial/node.py
author Nishanth Amuluru <nishanth@fossee.in>
Sat, 08 Jan 2011 12:24:21 +0530
changeset 71 5eb99afe6350
parent 69 c6bca38c1cbf
permissions -rw-r--r--
renamed the db and removed taggind as of now

# node.py - basic nodeid manipulation for mercurial
#
# Copyright 2005, 2006 Matt Mackall <mpm@selenic.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.

import binascii

nullrev = -1
nullid = "\0" * 20

# This ugly style has a noticeable effect in manifest parsing
hex = binascii.hexlify
bin = binascii.unhexlify

def short(node):
    return hex(node[:6])