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