Show More
@@ -1,49 +1,51 | |||||
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, and migrate secret keys | |
16 |
|
16 | |||
17 | #if gpg2 |
|
17 | #if gpg2 | |
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 | $ gpg --no-permission-warning --no-secmem-warning --list-secret-keys \ | |||
|
21 | > > /dev/null 2>&1 | |||
20 | #endif |
|
22 | #endif | |
21 |
|
23 | |||
22 | $ hg init r |
|
24 | $ hg init r | |
23 | $ cd r |
|
25 | $ cd r | |
24 | $ echo foo > foo |
|
26 | $ echo foo > foo | |
25 | $ hg ci -Amfoo |
|
27 | $ hg ci -Amfoo | |
26 | adding foo |
|
28 | adding foo | |
27 |
|
29 | |||
28 | $ hg sigs |
|
30 | $ hg sigs | |
29 |
|
31 | |||
30 | $ HGEDITOR=cat hg sign -e 0 |
|
32 | $ HGEDITOR=cat hg sign -e 0 | |
31 | signing 0:e63c23eaa88a |
|
33 | signing 0:e63c23eaa88a | |
32 | Added signature for changeset e63c23eaa88a |
|
34 | Added signature for changeset e63c23eaa88a | |
33 |
|
35 | |||
34 |
|
36 | |||
35 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
37 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
36 | HG: Leave message empty to abort commit. |
|
38 | HG: Leave message empty to abort commit. | |
37 | HG: -- |
|
39 | HG: -- | |
38 | HG: user: test |
|
40 | HG: user: test | |
39 | HG: branch 'default' |
|
41 | HG: branch 'default' | |
40 | HG: added .hgsigs |
|
42 | HG: added .hgsigs | |
41 |
|
43 | |||
42 | $ hg sigs |
|
44 | $ hg sigs | |
43 | hgtest 0:e63c23eaa88ae77967edcf4ea194d31167c478b0 |
|
45 | hgtest 0:e63c23eaa88ae77967edcf4ea194d31167c478b0 | |
44 |
|
46 | |||
45 | $ hg sigcheck 0 |
|
47 | $ hg sigcheck 0 | |
46 | e63c23eaa88a is signed by: |
|
48 | e63c23eaa88a is signed by: | |
47 | hgtest |
|
49 | hgtest | |
48 |
|
50 | |||
49 | $ cd .. |
|
51 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now