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(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'))
33
self.assertEquals(RevisionSpec(None).in_history(b), (0, None))
34
self.assertEquals(RevisionSpec(1).in_history(b), (1, 'a@r-0-1'))
35
self.assertEquals(RevisionSpec('revno:1').in_history(b),
37
self.assertEquals(RevisionSpec('revid:a@r-0-1').in_history(b),
39
self.assertRaises(NoSuchRevision,
40
RevisionSpec('revid:a@r-0-0').in_history, b)
41
self.assertRaises(TypeError, RevisionSpec, object)
43
self.assertEquals(RevisionSpec('date:-tomorrow').in_history(b),
45
self.assertEquals(RevisionSpec('date:+today').in_history(b),
48
self.assertEquals(RevisionSpec('last:1').in_history(b),
50
self.assertEquals(RevisionSpec('-1').in_history(b), (3, 'a@r-0-3'))