tests/test-gpg
author Brodie Rao <brodie@bitheap.org>
Fri, 10 Sep 2010 09:30:50 -0500
branchstable
changeset 12252 4481f8a93c7a
parent 9041 6e5e548452de
permissions -rwxr-xr-x
convert/darcs: handle non-ASCII metadata in darcs changelog (issue2354) Given a commit author or message with non-ASCII characters in a darcs repo, convert would raise a UnicodeEncodeError when adding changesets to the hg changelog. This happened because etree returns back unicode objects for any text it can't encode into ASCII. convert was passing these objects to changelog.add(), which would then attempt encoding.fromlocal() on them. This patch ensures converter_source.recode() is called on each piece of commit data returned by etree. (Also note that darcs is currently encoding agnostic and will print out whatever is in a patch's metadata byte-for-byte, even in the XML changelog.)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8809
6fce36336e42 gpg: add test
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
     1
#!/bin/sh
6fce36336e42 gpg: add test
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
     2
6fce36336e42 gpg: add test
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
     3
"$TESTDIR/hghave" gpg || exit 80
6fce36336e42 gpg: add test
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
     4
6fce36336e42 gpg: add test
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
     5
cat <<EOF >> $HGRCPATH
6fce36336e42 gpg: add test
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
     6
[extensions]
6fce36336e42 gpg: add test
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
     7
gpg=
6fce36336e42 gpg: add test
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
     8
6fce36336e42 gpg: add test
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
     9
[gpg]
9041
6e5e548452de test-gpg: suppress secure memory warning
David Champion <dgc@uchicago.edu>
parents: 8809
diff changeset
    10
cmd=gpg --no-permission-warning --no-secmem-warning --homedir $TESTDIR/gpg
8809
6fce36336e42 gpg: add test
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    11
EOF
6fce36336e42 gpg: add test
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    12
6fce36336e42 gpg: add test
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    13
hg init r
6fce36336e42 gpg: add test
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    14
cd r
6fce36336e42 gpg: add test
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    15
echo foo > foo
6fce36336e42 gpg: add test
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    16
hg ci -Amfoo
6fce36336e42 gpg: add test
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    17
6fce36336e42 gpg: add test
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    18
echo '% no signatures'
6fce36336e42 gpg: add test
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    19
hg sigs
6fce36336e42 gpg: add test
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    20
6fce36336e42 gpg: add test
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    21
echo '% hg sign 0'
6fce36336e42 gpg: add test
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    22
hg sign 0
6fce36336e42 gpg: add test
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    23
6fce36336e42 gpg: add test
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    24
echo '% hg sigs'
6fce36336e42 gpg: add test
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    25
hg sigs
6fce36336e42 gpg: add test
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    26
6fce36336e42 gpg: add test
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    27
echo '% hg sigcheck 0'
6fce36336e42 gpg: add test
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
    28
hg sigcheck 0