view mercurial/node.py @ 13601:0388e3e36693

bisect: new command to extend the bisect range (issue2690) When bisect ends in a merge point, and one of the parent wasn't checked, this usually means the culprit is in a branch that wasn't scanned. For this case we provide a new command which extends the range of the bisect search to the common ancestor of the parents of the merge.
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Sat, 12 Mar 2011 17:08:42 +0100
parents 25e572394f5c
children 1a5211f2f87f
line wrap: on
line source

# 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])