Comments
Patch
# HG changeset patch
# User Wei, Elson <elson.wei@gmail.com>
# Date 1373595319 -28800
# Fri Jul 12 10:15:19 2013 +0800
# Node ID 67fe87db273db79c14b5d2c251b34b92275c691e
# Parent 750bda4b332c3eb913750f26f496b988042da25f
gpg: add shortkey() to convert from long id to short
@@ -276,6 +276,12 @@
except ValueError, inst:
raise util.Abort(str(inst))
+def shortkey(key):
+ if len(key) == 16:
+ return key[-8:]
+ else:
+ return key
+
def node2txt(repo, node, ver):
"""map a manifest into some text"""
if ver == "0":