[PATCH 1 of 4 V5] gpg: treat "ERRSIG" as a valid key id but no fingerprint

elson.wei at gmail.com elson.wei at gmail.com
Sun Jul 14 08:52:12 CDT 2013


# HG changeset patch
# User Wei, Elson <elson.wei at gmail.com>
# Date 1373594711 -28800
#      Fri Jul 12 10:05:11 2013 +0800
# Node ID 1b573beed7a3f34705d11007e5f183a51b6a0c33
# Parent  83d0df2ddf3f2a07ed347afcfa30ddacc18b4c3d
gpg: treat "ERRSIG" as a valid key id but no fingerprint

diff --git a/hgext/gpg.py b/hgext/gpg.py
--- a/hgext/gpg.py
+++ b/hgext/gpg.py
@@ -55,12 +55,13 @@
             if not l.startswith("[GNUPG:]"):
                 continue
             l = l[9:]
-            if l.startswith("ERRSIG"):
-                err = _("error while verifying signature")
-                break
-            elif l.startswith("VALIDSIG"):
+            if l.startswith("VALIDSIG"):
                 # fingerprint of the primary key
                 fingerprint = l.split()[10]
+            elif l.startswith("ERRSIG"):
+                key = l.split(" ", 3)[:2]
+                key.append("")
+                fingerprint = None
             elif (l.startswith("GOODSIG") or
                   l.startswith("EXPSIG") or
                   l.startswith("EXPKEYSIG") or
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2013-07-10_12-36-11_r19379+.diff
Type: text/x-patch
Size: 1074 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20130714/e5298bfe/attachment.bin>


More information about the Mercurial-devel mailing list