~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_merge_directive.py

  • Committer: Aaron Bentley
  • Date: 2007-03-06 17:38:20 UTC
  • mto: (2323.6.9 0.15-integration)
  • mto: This revision was merged to the branch mainline in revision 2330.
  • Revision ID: abentley@panoramicfeedback.com-20070306173820-gm6h3evc1wq5hmcq
Check public branch only if not using a bundle

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
        self.assertRaises(errors.PublicBranchOutOfDate,
105
105
            merge_directive.MergeDirective.from_objects,
106
106
            tree_a.branch.repository, 'rev2a', 500, 144, tree_b.branch.base,
 
107
            public_branch=branch_c.base, patch_type='diff')
 
108
        # public branch is not checked if patch format is bundle.
 
109
        md1 = merge_directive.MergeDirective.from_objects(
 
110
            tree_a.branch.repository, 'rev2a', 500, 144, tree_b.branch.base,
107
111
            public_branch=branch_c.base)
108
 
        md1 = merge_directive.MergeDirective.from_objects(
109
 
            tree_a.branch.repository, 'rev2a', 500, 144, tree_b.branch.base)
110
112
        self.assertContainsRe(md1.patch, 'Bazaar revision bundle')
111
113
        self.assertContainsRe(md1.patch, '\\+content_c')
112
114
        self.assertNotContainsRe(md1.patch, '\\+content_a')
 
115
        # public branch is provided with a bundle, despite possibly being out
 
116
        # of date, because it's not required if a bundle is present.
 
117
        self.assertEqual(md1.source_branch, branch_c.base)
113
118
        branch_c.pull(tree_a.branch)
114
119
        md2 = merge_directive.MergeDirective.from_objects(
115
120
            tree_a.branch.repository, 'rev2a', 500, 144, tree_b.branch.base,