~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_revision.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-07-31 16:29:15 UTC
  • mfrom: (1886.1.5 read_empty_property-47782)
  • Revision ID: pqm@pqm.ubuntu.com-20060731162915-b2972d4eb057407a
(jam) fix bug #47782, rev props serialization should handle empty and unicode entries

Show diffs side-by-side

added added

removed removed

Lines of Context:
307
307
        tree1 = self.make_branch_and_tree("br1")
308
308
 
309
309
        # create a revision
310
 
        tree1.commit(message="quux", allow_pointless=True, committer="jaq")
 
310
        tree1.commit(message="quux", allow_pointless=True, committer="jaq",
 
311
                     revprops={'empty':'',
 
312
                               'value':'one',
 
313
                               'unicode':'\xb5',
 
314
                               'multiline':'foo\nbar\n\n'
 
315
                              })
311
316
        assert len(tree1.branch.revision_history()) > 0
312
317
        rev_a = tree1.branch.repository.get_revision(tree1.branch.last_revision())
313
318
 
317
322
                     timezone=rev_a.timezone,
318
323
                     committer=rev_a.committer,
319
324
                     rev_id=rev_a.revision_id,
 
325
                     revprops=rev_a.properties,
320
326
                     allow_pointless=True, # there's nothing in this commit
321
327
                     strict=True,
322
328
                     verbose=True)
327
333
        self.assertEqual(rev_a.timezone, rev_b.timezone)
328
334
        self.assertEqual(rev_a.committer, rev_b.committer)
329
335
        self.assertEqual(rev_a.revision_id, rev_b.revision_id)
 
336
        self.assertEqual(rev_a.properties, rev_b.properties)