Show More
@@ -1,47 +1,42 b'' | |||
|
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 |
> 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 | 11 | > EOF |
|
12 | $ GNUPGHOME="$TESTTMP/gpg"; export GNUPGHOME | |
|
13 | $ cp -R "$TESTDIR/gpg" "$GNUPGHOME" | |
|
14 | ||
|
12 | 15 | $ hg init r |
|
13 | 16 | $ cd r |
|
14 | 17 | $ echo foo > foo |
|
15 | 18 | $ hg ci -Amfoo |
|
16 | 19 | adding foo |
|
17 | 20 | |
|
18 | 21 | $ hg sigs |
|
19 | 22 | |
|
20 | 23 | $ HGEDITOR=cat hg sign -e 0 |
|
21 | 24 | signing 0:e63c23eaa88a |
|
22 | 25 | Added signature for changeset e63c23eaa88a |
|
23 | 26 | |
|
24 | 27 | |
|
25 | 28 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
26 | 29 | HG: Leave message empty to abort commit. |
|
27 | 30 | HG: -- |
|
28 | 31 | HG: user: test |
|
29 | 32 | HG: branch 'default' |
|
30 | 33 | HG: added .hgsigs |
|
31 | 34 | |
|
32 | 35 | $ hg sigs |
|
33 | 36 | hgtest 0:e63c23eaa88ae77967edcf4ea194d31167c478b0 |
|
34 | 37 | |
|
35 | 38 | $ hg sigcheck 0 |
|
36 | 39 | e63c23eaa88a is signed by: |
|
37 | 40 | hgtest |
|
38 | 41 | |
|
39 | verify that this test has not modified the trustdb.gpg file back in | |
|
40 | the main hg working dir | |
|
41 | $ md5sum.py "$TESTDIR/gpg/trustdb.gpg" | |
|
42 | f6b9c78c65fa9536e7512bb2ceb338ae */gpg/trustdb.gpg (glob) | |
|
43 | ||
|
44 | don't leak any state to next test run | |
|
45 | $ rm -f "$TESTDIR/gpg/random_seed" | |
|
46 | ||
|
47 | 42 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now