Show More
@@ -1,49 +1,51 | |||
|
1 | 1 | #require gpg |
|
2 | 2 | |
|
3 | 3 | Test the GPG extension |
|
4 | 4 | |
|
5 | 5 | $ cat <<EOF >> $HGRCPATH |
|
6 | 6 | > [extensions] |
|
7 | 7 | > gpg= |
|
8 | 8 | > |
|
9 | 9 | > [gpg] |
|
10 | 10 | > cmd=gpg --no-permission-warning --no-secmem-warning --no-auto-check-trustdb |
|
11 | 11 | > EOF |
|
12 | 12 | $ GNUPGHOME="$TESTTMP/gpg"; export GNUPGHOME |
|
13 | 13 | $ cp -R "$TESTDIR/gpg" "$GNUPGHOME" |
|
14 | 14 | |
|
15 | Start gpg-agent, which is required by GnuPG v2 | |
|
15 | Start gpg-agent, which is required by GnuPG v2, and migrate secret keys | |
|
16 | 16 | |
|
17 | 17 | #if gpg2 |
|
18 | 18 | $ gpg-connect-agent -q --subst /serverpid '/echo ${get serverpid}' /bye \ |
|
19 | 19 | > >> $DAEMON_PIDS |
|
20 | $ gpg --no-permission-warning --no-secmem-warning --list-secret-keys \ | |
|
21 | > > /dev/null 2>&1 | |
|
20 | 22 | #endif |
|
21 | 23 | |
|
22 | 24 | $ hg init r |
|
23 | 25 | $ cd r |
|
24 | 26 | $ echo foo > foo |
|
25 | 27 | $ hg ci -Amfoo |
|
26 | 28 | adding foo |
|
27 | 29 | |
|
28 | 30 | $ hg sigs |
|
29 | 31 | |
|
30 | 32 | $ HGEDITOR=cat hg sign -e 0 |
|
31 | 33 | signing 0:e63c23eaa88a |
|
32 | 34 | Added signature for changeset e63c23eaa88a |
|
33 | 35 | |
|
34 | 36 | |
|
35 | 37 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
36 | 38 | HG: Leave message empty to abort commit. |
|
37 | 39 | HG: -- |
|
38 | 40 | HG: user: test |
|
39 | 41 | HG: branch 'default' |
|
40 | 42 | HG: added .hgsigs |
|
41 | 43 | |
|
42 | 44 | $ hg sigs |
|
43 | 45 | hgtest 0:e63c23eaa88ae77967edcf4ea194d31167c478b0 |
|
44 | 46 | |
|
45 | 47 | $ hg sigcheck 0 |
|
46 | 48 | e63c23eaa88a is signed by: |
|
47 | 49 | hgtest |
|
48 | 50 | |
|
49 | 51 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now