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

login
register
mail settings
Submitter elson.wei@gmail.com
Date July 14, 2013, 1:52 p.m.
Message ID <1ad21fa22fa565cea47b.1373809935@ElsonWei-NB>
Download mbox | patch
Permalink /patch/1889/
State Accepted
Commit f9e04a4e28d08d3bbc81e14e5edf3612aece4182
Headers show

Comments

elson.wei@gmail.com - July 14, 2013, 1:52 p.m.
# HG changeset patch
# User Wei, Elson <elson.wei@gmail.com>
# Date 1373809852 -28800
#      Sun Jul 14 21:50:52 2013 +0800
# Node ID 1ad21fa22fa565cea47b735ca7fee5c1bc590ba2
# Parent  446ad1284333c9ffee4c96d9b7e887a869314d7a
gpg: show "Unknown key ID xxxxxxxx" when the status is ERRSIG
Matt Mackall - July 18, 2013, 9:06 p.m.
On Sun, 2013-07-14 at 21:52 +0800, elson.wei@gmail.com wrote:
> # HG changeset patch
> # User Wei, Elson <elson.wei@gmail.com>
> # Date 1373809852 -28800
> #      Sun Jul 14 21:50:52 2013 +0800
> # Node ID 1ad21fa22fa565cea47b735ca7fee5c1bc590ba2
> # Parent  446ad1284333c9ffee4c96d9b7e887a869314d7a
> gpg: show "Unknown key ID xxxxxxxx" when the status is ERRSIG

These are queued for default, thanks. Also, check-code sends its
regards.

Patch

# HG changeset patch
# User Wei, Elson <elson.wei@gmail.com>
# Date 1373809852 -28800
#      Sun Jul 14 21:50:52 2013 +0800
# Node ID 1ad21fa22fa565cea47b735ca7fee5c1bc590ba2
# Parent  446ad1284333c9ffee4c96d9b7e887a869314d7a
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(ui, key[1][:15])))
+            continue
         if key[0] == "BADSIG":
             ui.write(_("%s Bad signature from \"%s\"\n") % (prefix, key[2]))
             continue