~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_revisionspec.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-02-09 01:40:51 UTC
  • mfrom: (3985.1.1 ianc-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090209014051-5mj66o1vx58glvs9
ancestor: revspec defaults to parent branch (Daniel Watkins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
553
553
    def test_as_revision_id(self):
554
554
        self.assertAsRevisionId('alt_r2', 'ancestor:tree2')
555
555
 
 
556
    def test_default(self):
 
557
        # We don't have a parent to default to
 
558
        self.assertRaises(errors.NotBranchError, self.get_in_history,
 
559
                          'ancestor:')
 
560
 
 
561
        # Create a branch with a parent to default to
 
562
        tree3 = self.tree.bzrdir.sprout('tree3').open_workingtree()
 
563
        tree3.commit('foo', rev_id='r3')
 
564
        self.tree = tree3
 
565
        self.assertInHistoryIs(2, 'r2', 'ancestor:')
 
566
 
556
567
 
557
568
class TestRevisionSpec_branch(TestRevisionSpec):
558
569