~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_revisionnamespaces.py

Add submit: specifier, for merge-directive-like diffs

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:')