From 458120dd40db6b4df55a4e96b650e16798ef06a0 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Tue, 3 May 2011 11:25:13 +0000 Subject: add hg and python --- sys/lib/python/mercurial/node.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 sys/lib/python/mercurial/node.py (limited to 'sys/lib/python/mercurial/node.py') diff --git a/sys/lib/python/mercurial/node.py b/sys/lib/python/mercurial/node.py new file mode 100644 index 000000000..2a3be39c1 --- /dev/null +++ b/sys/lib/python/mercurial/node.py @@ -0,0 +1,18 @@ +# node.py - basic nodeid manipulation for mercurial +# +# Copyright 2005, 2006 Matt Mackall +# +# This software may be used and distributed according to the terms of the +# GNU General Public License version 2, incorporated herein by reference. + +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]) -- cgit v1.2.3