982
bundle = read_bundle(bundle_sio)
983
revision_info = bundle.revisions[0]
984
self.assertEqual('rev1', revision_info.revision_id)
985
rev = revision_info.as_revision()
986
self.assertEqual({'branch-nick':'tree', 'a':'4', 'b':'3', 'c':'2',
987
'd':'1'}, rev.properties)
989
def test_bundle_unicode_properties(self):
990
"""We should be able to round trip a non-ascii property."""
991
tree = self.make_branch_and_memory_tree('tree')
993
self.addCleanup(tree.unlock)
995
tree.add([''], ['TREE_ROOT'])
996
# Revisions themselves do not require anything about revision property
997
# keys, other than that they are a basestring, and do not contain
999
# However, Testaments assert than they are str(), and thus should not
1001
tree.commit('One', rev_id='rev1',
1002
revprops={'omega':u'\u03a9', 'alpha':u'\u03b1'})
1003
self.b1 = tree.branch
1004
bundle_sio, revision_ids = self.create_bundle_text(None, 'rev1')
1005
self.assertContainsRe(bundle_sio.getvalue(),
1007
'# alpha: \xce\xb1\n'
1008
'# branch-nick: tree\n'
1009
'# omega: \xce\xa9\n'
1011
bundle = read_bundle(bundle_sio)
1012
revision_info = bundle.revisions[0]
1013
self.assertEqual('rev1', revision_info.revision_id)
1014
rev = revision_info.as_revision()
1015
self.assertEqual({'branch-nick':'tree', 'omega':u'\u03a9',
1016
'alpha':u'\u03b1'}, rev.properties)
984
1019
class V09BundleKnit2Tester(V08BundleTester):