Binary file tests/gpg/pubring.gpg has changed
Binary file tests/gpg/random_seed has changed
Binary file tests/gpg/secring.gpg has changed
Binary file tests/gpg/trustdb.gpg has changed
--- a/tests/hghave Sun Jun 14 12:18:46 2009 -0700
+++ b/tests/hghave Sun Jun 14 13:32:19 2009 -0700
@@ -146,6 +146,9 @@
def has_tla():
return matchoutput('tla --version 2>&1', r'The GNU Arch Revision')
+def has_gpg():
+ return matchoutput('gpg --version 2>&1', r'GnuPG')
+
def has_unix_permissions():
d = tempfile.mkdtemp(prefix=tempprefix, dir=".")
try:
@@ -183,6 +186,7 @@
"execbit": (has_executablebit, "executable bit"),
"fifo": (has_fifo, "named pipes"),
"git": (has_git, "git command line client"),
+ "gpg": (has_gpg, "gpg client"),
"hotshot": (has_hotshot, "python hotshot module"),
"icasefs": (has_icasefs, "case insensitive file system"),
"inotify": (has_inotify, "inotify extension support"),
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-gpg Sun Jun 14 13:32:19 2009 -0700
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+"$TESTDIR/hghave" gpg || exit 80
+
+cat <<EOF >> $HGRCPATH
+[extensions]
+gpg=
+
+[gpg]
+cmd=gpg --no-permission-warning --homedir $TESTDIR/gpg
+EOF
+
+hg init r
+cd r
+echo foo > foo
+hg ci -Amfoo
+
+echo '% no signatures'
+hg sigs
+
+echo '% hg sign 0'
+hg sign 0
+
+echo '% hg sigs'
+hg sigs
+
+echo '% hg sigcheck 0'
+hg sigcheck 0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-gpg.out Sun Jun 14 13:32:19 2009 -0700
@@ -0,0 +1,9 @@
+adding foo
+% no signatures
+% hg sign 0
+Signing 0:e63c23eaa88a
+% hg sigs
+hgtest 0:e63c23eaa88ae77967edcf4ea194d31167c478b0
+% hg sigcheck 0
+e63c23eaa88a is signed by:
+ hgtest