author | Siddharth Agarwal <sid0@fb.com> |
Wed, 13 Aug 2014 15:51:33 -0700 | |
branch | stable |
changeset 22170 | 0e1b02f984c7 |
parent 21711 | 0986af9e7006 |
child 22046 | 7a9cbb315d84 |
permissions | -rw-r--r-- |
12428 | 1 |
Test the GPG extension |
8809 | 2 |
|
12428 | 3 |
$ "$TESTDIR/hghave" gpg || exit 80 |
4 |
$ cat <<EOF >> $HGRCPATH |
|
5 |
> [extensions] |
|
6 |
> gpg= |
|
7 |
> |
|
8 |
> [gpg] |
|
16350
4f795f5fbb0b
tests: make tests work if directory contains special characters
Thomas Arendsen Hein <thomas@intevation.de>
parents:
16349
diff
changeset
|
9 |
> cmd=gpg --no-permission-warning --no-secmem-warning --no-auto-check-trustdb --homedir "$TESTDIR/gpg" |
12428 | 10 |
> EOF |
11 |
$ hg init r |
|
12 |
$ cd r |
|
13 |
$ echo foo > foo |
|
14 |
$ hg ci -Amfoo |
|
15 |
adding foo |
|
8809 | 16 |
|
12428 | 17 |
$ hg sigs |
18 |
||
21711
0986af9e7006
gpg: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20305
diff
changeset
|
19 |
$ HGEDITOR=cat hg sign -e 0 |
16927 | 20 |
signing 0:e63c23eaa88a |
21711
0986af9e7006
gpg: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20305
diff
changeset
|
21 |
Added signature for changeset e63c23eaa88a |
0986af9e7006
gpg: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20305
diff
changeset
|
22 |
|
0986af9e7006
gpg: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20305
diff
changeset
|
23 |
|
0986af9e7006
gpg: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20305
diff
changeset
|
24 |
HG: Enter commit message. Lines beginning with 'HG:' are removed. |
0986af9e7006
gpg: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20305
diff
changeset
|
25 |
HG: Leave message empty to abort commit. |
0986af9e7006
gpg: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20305
diff
changeset
|
26 |
HG: -- |
0986af9e7006
gpg: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20305
diff
changeset
|
27 |
HG: user: test |
0986af9e7006
gpg: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20305
diff
changeset
|
28 |
HG: branch 'default' |
0986af9e7006
gpg: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20305
diff
changeset
|
29 |
HG: added .hgsigs |
8809 | 30 |
|
12428 | 31 |
$ hg sigs |
32 |
hgtest 0:e63c23eaa88ae77967edcf4ea194d31167c478b0 |
|
8809 | 33 |
|
12428 | 34 |
$ hg sigcheck 0 |
35 |
e63c23eaa88a is signed by: |
|
36 |
hgtest |
|
16289
aae219a99a6e
test-gpg: make sure gpg does not modify the trustdb.gpg file
Greg Ward <greg@gerg.ca>
parents:
12428
diff
changeset
|
37 |
|
aae219a99a6e
test-gpg: make sure gpg does not modify the trustdb.gpg file
Greg Ward <greg@gerg.ca>
parents:
12428
diff
changeset
|
38 |
verify that this test has not modified the trustdb.gpg file back in |
aae219a99a6e
test-gpg: make sure gpg does not modify the trustdb.gpg file
Greg Ward <greg@gerg.ca>
parents:
12428
diff
changeset
|
39 |
the main hg working dir |
16349
425f1fbcfb94
test-gpg: replace 825565136235 by md5sum check
Thomas Arendsen Hein <thomas@intevation.de>
parents:
16345
diff
changeset
|
40 |
$ "$TESTDIR/md5sum.py" "$TESTDIR/gpg/trustdb.gpg" |
425f1fbcfb94
test-gpg: replace 825565136235 by md5sum check
Thomas Arendsen Hein <thomas@intevation.de>
parents:
16345
diff
changeset
|
41 |
f6b9c78c65fa9536e7512bb2ceb338ae */gpg/trustdb.gpg (glob) |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
16350
diff
changeset
|
42 |
|
20305
e5a2177d97f0
tests: stop tracking tests/gpg/random_seed
Mads Kiilerich <madski@unity3d.com>
parents:
16927
diff
changeset
|
43 |
don't leak any state to next test run |
e5a2177d97f0
tests: stop tracking tests/gpg/random_seed
Mads Kiilerich <madski@unity3d.com>
parents:
16927
diff
changeset
|
44 |
$ rm -f "$TESTDIR/gpg/random_seed" |
e5a2177d97f0
tests: stop tracking tests/gpg/random_seed
Mads Kiilerich <madski@unity3d.com>
parents:
16927
diff
changeset
|
45 |
|
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
16350
diff
changeset
|
46 |
$ cd .. |