Comments
Patch
# HG changeset patch
# User Wei, Elson <elson.wei@gmail.com>
# Date 1373809845 -28800
# Sun Jul 14 21:50:45 2013 +0800
# Node ID 446ad1284333c9ffee4c96d9b7e887a869314d7a
# Parent 750bda4b332c3eb913750f26f496b988042da25f
gpg: add shortkey() to convert from long id to short
@@ -276,6 +276,13 @@
except ValueError, inst:
raise util.Abort(str(inst))
+def shortkey(ui, key):
+ if len(key) != 16:
+ ui.debug(_("key ID \"%s\" format error\n") % key)
+ return key
+
+ return key[-8:]
+
def node2txt(repo, node, ver):
"""map a manifest into some text"""
if ver == "0":