~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_revisionnamespaces.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-03-11 20:42:22 UTC
  • mfrom: (1551.10.35 Aaron's mergeable stuff)
  • Revision ID: pqm@pqm.ubuntu.com-20070311204222-85d0ff7fb929ca45
Introduce submit: revision spec

Show diffs side-by-side

added added

removed removed

Lines of Context:
477
477
        new_tree = self.make_branch_and_tree('new_tree')
478
478
        self.assertRaises(errors.NoCommits,
479
479
                          self.get_in_history, 'branch:new_tree')
 
480
 
 
481
 
 
482
class TestRevisionSpec_submit(TestRevisionSpec):
 
483
 
 
484
    def test_submit_branch(self):
 
485
        # Common ancestor of trees is 'alt_r2'
 
486
        self.assertRaises(errors.NoSubmitBranch, self.get_in_history,
 
487
                          'submit:')
 
488
        self.tree.branch.set_parent('../tree2')
 
489
        self.assertInHistoryIs(None, 'alt_r2', 'submit:')
 
490
        self.tree.branch.set_parent('bogus')
 
491
        self.assertRaises(errors.NotBranchError, self.get_in_history,
 
492
            'submit:')
 
493
        # submit branch overrides parent branch
 
494
        self.tree.branch.set_submit_branch('tree2')
 
495
        self.assertInHistoryIs(None, 'alt_r2', 'submit:')