view mercurial/node.py @ 19928:d1ac3790e10a

localrepo: invoke only feature setup functions for enabled extensions Before this patch, each feature setup functions for localrepository class should examine whether corresponding extension is enabled or not by themselves. This patch invokes only feature setup functions defined in module of enabled extensions, and it makes implementation of feature setup functions easier and simpler.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Thu, 17 Oct 2013 21:45:17 +0900
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])