Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/websdk/mercurial/node.py
diff options
context:
space:
mode:
Diffstat (limited to 'websdk/mercurial/node.py')
-rw-r--r--[l---------]websdk/mercurial/node.py19
1 files changed, 18 insertions, 1 deletions
diff --git a/websdk/mercurial/node.py b/websdk/mercurial/node.py
index e7e4e04..9debeaf 120000..100644
--- a/websdk/mercurial/node.py
+++ b/websdk/mercurial/node.py
@@ -1 +1,18 @@
-/usr/share/pyshared/mercurial/node.py \ No newline at end of file
+# 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])