gpg: show "Unknown key ID xxxxxxxx" when the status is ERRSIG
authorWei, Elson <elson.wei@gmail.com>
Sun, 14 Jul 2013 21:50:52 +0800
changeset 19444 f9e04a4e28d0
parent 19443 2a7fd31ac548
child 19445 29c726e9c3ab
gpg: show "Unknown key ID xxxxxxxx" when the status is ERRSIG
hgext/gpg.py
--- a/hgext/gpg.py	Sun Jul 14 21:50:45 2013 +0800
+++ b/hgext/gpg.py	Sun Jul 14 21:50:52 2013 +0800
@@ -122,6 +122,10 @@
     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(ui, key[1][:15])))
+            continue
         if key[0] == "BADSIG":
             ui.write(_("%s Bad signature from \"%s\"\n") % (prefix, key[2]))
             continue