~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:32:29 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-20070306173229-f5rqgyxswuetgzn5
Take public_branch as a string, not object

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)
 
107
            public_branch=branch_c.base)
108
108
        md1 = merge_directive.MergeDirective.from_objects(
109
109
            tree_a.branch.repository, 'rev2a', 500, 144, tree_b.branch.base)
110
110
        self.assertContainsRe(md1.patch, 'Bazaar revision bundle')
113
113
        branch_c.pull(tree_a.branch)
114
114
        md2 = merge_directive.MergeDirective.from_objects(
115
115
            tree_a.branch.repository, 'rev2a', 500, 144, tree_b.branch.base,
116
 
            patch_type='diff', public_branch=branch_c)
 
116
            patch_type='diff', public_branch=branch_c.base)
117
117
        self.assertNotContainsRe(md2.patch, 'Bazaar revision bundle')
118
118
        self.assertContainsRe(md1.patch, '\\+content_c')
119
119
        self.assertNotContainsRe(md1.patch, '\\+content_a')
120
120
        md3 = merge_directive.MergeDirective.from_objects(
121
121
            tree_a.branch.repository, 'rev2a', 500, 144, tree_b.branch.base,
122
 
            patch_type=None, public_branch=branch_c, message='Merge message')
 
122
            patch_type=None, public_branch=branch_c.base,
 
123
            message='Merge message')
123
124
        md3.to_lines()
124
125
        self.assertIs(None, md3.patch)
125
126
        self.assertEqual('Merge message', md3.message)
149
150
        tree_a, tree_b, branch_c = self.make_trees()
150
151
        md = merge_directive.MergeDirective.from_objects(
151
152
            tree_a.branch.repository, 'rev2a', 500, 36, tree_b.branch.base,
152
 
            patch_type=None, public_branch=tree_a.branch)
 
153
            patch_type=None, public_branch=tree_a.branch.base)
153
154
        message = md.to_email('pqm@example.com', tree_a.branch)
154
155
        self.assertContainsRe(message.as_string(), EMAIL1)
155
156
        md.message = 'Commit of rev2a with special message'