Patchwork [1,of,4,V4] gpg: treat "ERRSIG" as a valid key id but no fingerprint

login
register
mail settings
Submitter elson.wei@gmail.com
Date July 12, 2013, 2:20 a.m.
Message ID <1b573beed7a3f34705d1.1373595637@ElsonWei-NB.PrimeVOLT>
Download mbox | patch
Permalink /patch/1836/
State Superseded, archived
Headers show

Comments

elson.wei@gmail.com - July 12, 2013, 2:20 a.m.
# HG changeset patch
# User Wei, Elson <elson.wei@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

Patch

# HG changeset patch
# User Wei, Elson <elson.wei@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