~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-11 01:22:51 UTC
  • mto: (2323.6.9 0.15-integration)
  • mto: This revision was merged to the branch mainline in revision 2342.
  • Revision ID: aaron.bentley@utoronto.ca-20070311012251-pf1lg4uhb5s4qs3n
Use public location of submit branch if possible

Show diffs side-by-side

added added

removed removed

Lines of Context:
188
188
            tree_a.branch.repository, 'rev2a', 500, 144, tree_b.branch.base,
189
189
            patch_type=None, public_branch=branch_c.base)
190
190
 
 
191
    def test_use_public_submit_branch(self):
 
192
        tree_a, tree_b, branch_c = self.make_trees()
 
193
        branch_c.pull(tree_a.branch)
 
194
        md = merge_directive.MergeDirective.from_objects(
 
195
             tree_a.branch.repository, 'rev2a', 500, 144, tree_b.branch.base,
 
196
             patch_type=None, public_branch=branch_c.base)
 
197
        self.assertEqual(md.target_branch, tree_b.branch.base)
 
198
        tree_b.branch.set_public_branch('http://example.com')
 
199
        md2 = merge_directive.MergeDirective.from_objects(
 
200
              tree_a.branch.repository, 'rev2a', 500, 144, tree_b.branch.base,
 
201
              patch_type=None, public_branch=branch_c.base)
 
202
        self.assertEqual(md2.target_branch, 'http://example.com')
 
203
 
191
204
    def test_message(self):
192
205
        tree_a, tree_b, branch_c = self.make_trees()
193
206
        md3 = merge_directive.MergeDirective.from_objects(