annotate tests/test-bookmarks-rebase @ 12252:4481f8a93c7a stable

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.)
author Brodie Rao <brodie@bitheap.org>
date Fri, 10 Sep 2010 09:30:50 -0500
parents 2313dc4d9817
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7317
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
1 #!/bin/sh
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
2
11208
2313dc4d9817 tests: fix bashism to load helpers.sh
Yuya Nishihara <yuya@tcha.org>
parents: 11198
diff changeset
3 . $TESTDIR/helpers.sh
11198
b345b1cc124f rebase: use helpers.sh in tests
Matt Mackall <mpm@selenic.com>
parents: 8168
diff changeset
4
7317
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
5 echo "[extensions]" >> $HGRCPATH
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
6 echo "rebase=" >> $HGRCPATH
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
7 echo "bookmarks=" >> $HGRCPATH
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
8
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
9 echo % initialize repository
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
10 hg init
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
11
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
12 echo 'a' > a
8168
8766fee6f225 tests: removed redundant "-u test" from test scripts
Martin Geisler <mg@lazybytes.net>
parents: 8167
diff changeset
13 hg ci -A -m "0"
7317
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
14
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
15 echo 'b' > b
8168
8766fee6f225 tests: removed redundant "-u test" from test scripts
Martin Geisler <mg@lazybytes.net>
parents: 8167
diff changeset
16 hg ci -A -m "1"
7317
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
17
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
18 hg up 0
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
19 echo 'c' > c
8168
8766fee6f225 tests: removed redundant "-u test" from test scripts
Martin Geisler <mg@lazybytes.net>
parents: 8167
diff changeset
20 hg ci -A -m "2"
7317
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
21
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
22 echo 'd' > d
8168
8766fee6f225 tests: removed redundant "-u test" from test scripts
Martin Geisler <mg@lazybytes.net>
parents: 8167
diff changeset
23 hg ci -A -m "3"
7317
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
24
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
25 hg bookmark -r 1 one
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
26 hg bookmark -r 3 two
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
27
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
28 echo % bookmark list
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
29 hg bookmark
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
30
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
31 echo % rebase
11198
b345b1cc124f rebase: use helpers.sh in tests
Matt Mackall <mpm@selenic.com>
parents: 8168
diff changeset
32 hg rebase -s two -d one 2>&1 | cleanrebase
7317
98408cb74137 bookmarks: Test if rebase works with bookmarks
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
33
8167
6c82beaaa11a tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents: 7317
diff changeset
34 hg log