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

login
register
mail settings
Submitter elson.wei@gmail.com
Date July 12, 2013, 2:20 a.m.
Message ID <00864ca77dfa95d9404c.1373595640@ElsonWei-NB.PrimeVOLT>
Download mbox | patch
Permalink /patch/1839/
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 1373595334 -28800
#      Fri Jul 12 10:15:34 2013 +0800
# Node ID 00864ca77dfa95d9404c897f142d87dacbd4b125
# Parent  67fe87db273db79c14b5d2c251b34b92275c691e
gpg: show "Unknown key ID xxxxxxxx" when the status is ERRSIG

Patch

# HG changeset patch
# User Wei, Elson <elson.wei@gmail.com>
# Date 1373595334 -28800
#      Fri Jul 12 10:15:34 2013 +0800
# Node ID 00864ca77dfa95d9404c897f142d87dacbd4b125
# Parent  67fe87db273db79c14b5d2c251b34b92275c691e
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