30
30
b.commit('Commit two', rev_id='a@r-0-2')
31
31
b.commit('Commit three', rev_id='a@r-0-3')
33
self.assertEquals(get_revision_info(b, None), (0, None))
34
self.assertEquals(get_revision_info(b, 1), (1, 'a@r-0-1'))
35
self.assertEquals(get_revision_info(b, 'revno:1'), (1, 'a@r-0-1'))
36
self.assertEquals(get_revision_info(b, 'revid:a@r-0-1'), (1, 'a@r-0-1'))
37
self.assertRaises(NoSuchRevision, get_revision_info, b, 'revid:a@r-0-0')
38
self.assertRaises(TypeError, get_revision_info, b, object)
40
self.assertEquals(get_revision_info(b, 'date:-tomorrow'), (3, 'a@r-0-3'))
41
self.assertEquals(get_revision_info(b, 'date:+today'), (1, 'a@r-0-1'))
43
self.assertEquals(get_revision_info(b, 'last:1'), (3, 'a@r-0-3'))
44
self.assertEquals(get_revision_info(b, '-1'), (3, 'a@r-0-3'))
47
b2 = Branch('newbranch', init=True)
48
self.assertEquals(b2.lookup_revision('revid:a@r-0-1'), None)
33
self.assertEquals(RevisionSpec(b, None), (0, None))
34
self.assertEquals(RevisionSpec(b, 1), (1, 'a@r-0-1'))
35
self.assertEquals(RevisionSpec(b, 'revno:1'), (1, 'a@r-0-1'))
36
self.assertEquals(RevisionSpec(b, 'revid:a@r-0-1'), (1, 'a@r-0-1'))
37
self.assertRaises(NoSuchRevision, RevisionSpec, b, 'revid:a@r-0-0')
38
self.assertRaises(TypeError, RevisionSpec, b, object)
40
self.assertEquals(RevisionSpec(b, 'date:-tomorrow'), (3, 'a@r-0-3'))
41
self.assertEquals(RevisionSpec(b, 'date:+today'), (1, 'a@r-0-1'))
43
self.assertEquals(RevisionSpec(b, 'last:1'), (3, 'a@r-0-3'))
44
self.assertEquals(RevisionSpec(b, '-1'), (3, 'a@r-0-3'))