~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-08-16 14:24:51 UTC
  • mfrom: (1913.1.6 timezone-utc-55783)
  • Revision ID: pqm@pqm.ubuntu.com-20060816142451-0c165573fe342dd5
(jam) fix bugs #56290, #55783: handle TZ=UTC correctly

Show diffs side-by-side

added added

removed removed

Lines of Context:
300
300
        self.assertEqual({'B':['A'],
301
301
                          'A':[]},
302
302
                         source.get_revision_graph('B'))
303
 
 
304
 
class TestRevisionAttributes(TestCaseWithTransport):
305
 
    """Test that revision attributes are correct."""
306
 
 
307
 
    def test_revision_accessors(self):
308
 
        """Make sure the values that come out of a revision are the same as the ones that go in.
309
 
        """
310
 
        tree1 = self.make_branch_and_tree("br1")
311
 
 
312
 
        # create a revision
313
 
        tree1.commit(message="quux", allow_pointless=True, committer="jaq",
314
 
                     revprops={'empty':'',
315
 
                               'value':'one',
316
 
                               'unicode':'\xb5',
317
 
                               'multiline':'foo\nbar\n\n'
318
 
                              })
319
 
        assert len(tree1.branch.revision_history()) > 0
320
 
        rev_a = tree1.branch.repository.get_revision(tree1.branch.last_revision())
321
 
 
322
 
        tree2 = self.make_branch_and_tree("br2")
323
 
        tree2.commit(message=rev_a.message,
324
 
                     timestamp=rev_a.timestamp,
325
 
                     timezone=rev_a.timezone,
326
 
                     committer=rev_a.committer,
327
 
                     rev_id=rev_a.revision_id,
328
 
                     revprops=rev_a.properties,
329
 
                     allow_pointless=True, # there's nothing in this commit
330
 
                     strict=True,
331
 
                     verbose=True)
332
 
        rev_b = tree2.branch.repository.get_revision(tree2.branch.last_revision())
333
 
        
334
 
        self.assertEqual(rev_a.message, rev_b.message)
335
 
        self.assertEqual(rev_a.timestamp, rev_b.timestamp)
336
 
        self.assertEqual(rev_a.timezone, rev_b.timezone)
337
 
        self.assertEqual(rev_a.committer, rev_b.committer)
338
 
        self.assertEqual(rev_a.revision_id, rev_b.revision_id)
339
 
        self.assertEqual(rev_a.properties, rev_b.properties)