~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_merge_directive.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-06-19 19:43:21 UTC
  • mfrom: (1551.15.29 Aaron's mergeable stuff)
  • Revision ID: pqm@pqm.ubuntu.com-20070619194321-g3qy7rh361kdvstd
Make merge directives robust against broken bundles

Show diffs side-by-side

added added

removed removed

Lines of Context:
265
265
        self.assertContainsRe(md1.patch, '\\+content_c')
266
266
        self.assertNotContainsRe(md1.patch, '\\+content_a')
267
267
 
 
268
    def test_broken_bundle(self):
 
269
        tree_a, tree_b, branch_c = self.make_trees()
 
270
        md1 = merge_directive.MergeDirective.from_objects(
 
271
            tree_a.branch.repository, 'rev2a', 500, 120, tree_b.branch.base,
 
272
            public_branch=branch_c.base)
 
273
        lines = md1.to_lines()
 
274
        lines = [l.replace('\n', '\r\n') for l in lines]
 
275
        md2 = merge_directive.MergeDirective.from_lines(lines)
 
276
        self.assertEqual('rev2a', md2.revision_id)
 
277
 
268
278
    def test_signing(self):
269
279
        time = 453
270
280
        timezone = 7200