Mercurial > hg
view tests/test-mq-guards.out @ 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 | 29c39fe2491b |
children | 1c00577b0298 |
line wrap: on
line source
adding x popping c.patch popping b.patch popping a.patch patch queue now empty % should fail abort: no patch named does-not-exist.patch % should fail abort: no patches applied applying a.patch now at: a.patch % should guard a.patch % should print +a a.patch: +a popping a.patch patch queue now empty % should fail cannot push 'a.patch' - guarded by ['+a'] a.patch: +a % should push b.patch applying b.patch now at: b.patch popping b.patch patch queue now empty % test selection of an empty guard abort: guard cannot be an empty string number of unguarded, unapplied patches has changed from 2 to 3 % should push a.patch applying a.patch now at: a.patch % should print -a c.patch: -a % should skip c.patch applying b.patch skipping c.patch - guarded by '-a' now at: b.patch % should display b.patch b.patch % should push c.patch applying c.patch now at: c.patch popping c.patch popping b.patch popping a.patch patch queue now empty guards deactivated number of unguarded, unapplied patches has changed from 3 to 2 % should push all applying b.patch applying c.patch now at: c.patch popping c.patch popping b.patch patch queue now empty number of unguarded, unapplied patches has changed from 1 to 2 % should push a.patch, not b.patch applying a.patch now at: a.patch applying c.patch now at: c.patch popping c.patch popping a.patch patch queue now empty % should push b.patch applying b.patch now at: b.patch applying c.patch now at: c.patch c.patch popping c.patch popping b.patch patch queue now empty number of unguarded, unapplied patches has changed from 2 to 3 % should push a.patch, b.patch applying a.patch now at: a.patch applying b.patch now at: b.patch popping b.patch popping a.patch patch queue now empty number of unguarded, unapplied patches has changed from 3 to 2 % list patches and guards a.patch: +1 +2 -3 b.patch: +2 c.patch: unguarded % list patches and guards with color a.patch: [0;33m+1[0m [0;33m+2[0m [0;31m-3[0m b.patch: [0;33m+2[0m c.patch: [0;32munguarded[0m % list series 0 G a.patch 1 U b.patch 2 U c.patch % list guards 1 2 3 % should push b.patch applying b.patch now at: b.patch applying c.patch now at: c.patch guards deactivated popping guarded patches popping c.patch popping b.patch patch queue now empty reapplying unguarded patches applying c.patch now at: c.patch % guards in series file: +1 +2 -3 +1 +2 -3 % should show c.patch c.patch % should show : % new.patch: +1 +2 -3 % b.patch: +2 % c.patch: unguarded new.patch: +1 +2 -3 b.patch: +2 c.patch: unguarded popping d.patch now at: c.patch % should show new.patch and b.patch as Guarded, c.patch as Applied % and d.patch as Unapplied 0 G new.patch 1 G b.patch 2 A c.patch 3 U d.patch % qseries again, but with color 0 G [0;30;1mnew.patch[0m 1 G [0;30;1mb.patch[0m 2 A [0;34;1;4mc.patch[0m 3 U [0;30;1md.patch[0m % new.patch, b.patch: Guarded. c.patch: Applied. d.patch: Guarded. 0 G new.patch 1 G b.patch 2 A c.patch 3 G d.patch popping c.patch patch queue now empty new.patch: +1 +2 -3 b.patch: +2 c.patch: unguarded d.patch: +2 % hg qapplied % hg qapplied -v % hg qunapplied c.patch % hg qunapplied -v 0 G new.patch 1 G b.patch 2 U c.patch 3 G d.patch number of unguarded, unapplied patches has changed from 1 to 2 % hg qapplied % hg qapplied -v % hg qunapplied new.patch c.patch % hg qunapplied -v 0 U new.patch 1 G b.patch 2 U c.patch 3 G d.patch applying new.patch skipping b.patch - guarded by ['+2'] applying c.patch skipping d.patch - guarded by ['+2'] now at: c.patch % hg qapplied new.patch c.patch % hg qapplied -v 0 A new.patch 1 G b.patch 2 A c.patch % hg qunapplied % hg qunapplied -v 3 G d.patch number of unguarded, unapplied patches has changed from 0 to 1 number of guarded, applied patches has changed from 1 to 0 % hg qapplied new.patch c.patch % hg qapplied -v 0 A new.patch 1 U b.patch 2 A c.patch % hg qunapplied d.patch % hg qunapplied -v 3 U d.patch % hg qapplied new.patch new.patch % hg qunapplied new.patch b.patch d.patch % hg qapplied b.patch new.patch % hg qunapplied b.patch d.patch % hg qapplied c.patch new.patch c.patch % hg qunapplied c.patch d.patch % hg qapplied d.patch new.patch c.patch % hg qunapplied d.patch % hg qseries -m: only b.patch should be shown the guards file was not ignored in the past b.patch % hg qseries -m with color [0;31;1mb.patch[0m