Patchwork [3,of,3,V3] gpg: show "Unknown key ID xxxxxxxx" when the status is ERRSIG

login
register
mail settings
Submitter elson.wei@gmail.com
Date July 10, 2013, 5:04 a.m.
Message ID <e332bf401b891fe79696.1373432656@ElsonWei-NB.PrimeVOLT>
Download mbox | patch
Permalink /patch/1827/
State Superseded, archived
Headers show

Comments

elson.wei@gmail.com - July 10, 2013, 5:04 a.m.
# HG changeset patch
# User Wei, Elson <elson.wei@gmail.com>
# Date 1373432623 -28800
#      Wed Jul 10 13:03:43 2013 +0800
# Node ID e332bf401b891fe79696994057ee25d175828bc1
# Parent  f4f121d7fce92354ed72782a7432ed0648ca5743
gpg: show "Unknown key ID xxxxxxxx" when the status is ERRSIG

Patch

# HG changeset patch
# User Wei, Elson <elson.wei@gmail.com>
# Date 1373432623 -28800
#      Wed Jul 10 13:03:43 2013 +0800
# Node ID e332bf401b891fe79696994057ee25d175828bc1
# Parent  f4f121d7fce92354ed72782a7432ed0648ca5743
gpg: show "Unknown key ID xxxxxxxx" when the status is ERRSIG

diff --git a/hgext/gpg.py b/hgext/gpg.py
--- a/hgext/gpg.py
+++ b/hgext/gpg.py
@@ -122,6 +122,9 @@ 
     validkeys = []
     # warn for expired key and/or sigs
     for key in keys:
+        if key[0] == "ERRSIG":
+            ui.write(_("%s Unknown key ID %s\n") % (prefix, shortkey(key[1])))
+            continue
         if key[0] == "BADSIG":
             ui.write(_("%s Bad signature from \"%s\"\n") % (prefix, key[2]))
             continue