300
300
self.assertEqual({'B':['A'],
302
302
source.get_revision_graph('B'))
304
class TestRevisionAttributes(TestCaseWithTransport):
305
"""Test that revision attributes are correct."""
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.
310
tree1 = self.make_branch_and_tree("br1")
313
tree1.commit(message="quux", allow_pointless=True, committer="jaq",
314
revprops={'empty':'',
317
'multiline':'foo\nbar\n\n'
319
assert len(tree1.branch.revision_history()) > 0
320
rev_a = tree1.branch.repository.get_revision(tree1.branch.last_revision())
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
332
rev_b = tree2.branch.repository.get_revision(tree2.branch.last_revision())
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)