/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_revisionspec.py

  • Committer: Aaron Bentley
  • Date: 2010-08-15 15:48:11 UTC
  • mto: (5365.6.7 annotate-revspec)
  • mto: This revision was merged to the branch mainline in revision 5443.
  • Revision ID: aaron@aaronbentley.com-20100815154811-qq7lhpw2blefnu0n
ImplementĀ mainlineĀ revisionĀ spec.

Show diffs side-by-side

added added

removed removed

Lines of Context:
652
652
    def test_as_revision_id(self):
653
653
        self.tree.branch.set_submit_branch('tree2')
654
654
        self.assertAsRevisionId('alt_r2', 'branch:tree2')
 
655
 
 
656
 
 
657
class TestRevisionSpec_mainline(TestRevisionSpec):
 
658
 
 
659
    def test_as_revision_id(self):
 
660
        self.assertAsRevisionId('r1', 'mainline:1')
 
661
        self.assertAsRevisionId('r2', 'mainline:1.1.1')
 
662
        self.assertAsRevisionId('r2', 'mainline:revid:alt_r2')
 
663
        spec = RevisionSpec.from_string('mainline:revid:alt_r22')
 
664
        e = self.assertRaises(errors.InvalidRevisionSpec,
 
665
                              spec.as_revision_id, self.tree.branch)
 
666
        self.assertContainsRe(str(e),
 
667
            "Requested revision: 'mainline:revid:alt_r22' does not exist in"
 
668
            " branch: ")
 
669
 
 
670
    def test_in_history(self):
 
671
        self.assertInHistoryIs(2, 'r2', 'mainline:revid:alt_r2')