~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_send.py

  • Committer: John Arbash Meinel
  • Date: 2010-02-17 17:11:16 UTC
  • mfrom: (4797.2.17 2.1)
  • mto: (4797.2.18 2.1)
  • mto: This revision was merged to the branch mainline in revision 5055.
  • Revision ID: john@arbash-meinel.com-20100217171116-h7t9223ystbnx5h8
merge bzr.2.1 in preparation for NEWS entry.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006, 2007, 2008, 2009 Canonical Ltd
 
1
# Copyright (C) 2006-2010 Canonical Ltd
2
2
# Authors: Aaron Bentley
3
3
#
4
4
# This program is free software; you can redistribute it and/or modify
67
67
 
68
68
    def get_MD(self, args, cmd=None, wd='branch'):
69
69
        out = StringIO(self.run_send(args, cmd=cmd, wd=wd)[0])
70
 
        return merge_directive.MergeDirective.from_lines(out.readlines())
 
70
        return merge_directive.MergeDirective.from_lines(out)
71
71
 
72
72
    def assertBundleContains(self, revs, args, cmd=None, wd='branch'):
73
73
        md = self.get_MD(args, cmd=cmd, wd=wd)
322
322
        out, err = self.run_send(args)
323
323
        self.assertEquals(
324
324
            'Bundling %d revision(s).\n' % len(revs), err)
325
 
        md = merge_directive.MergeDirective.from_lines(
326
 
                StringIO(out).readlines())
 
325
        md = merge_directive.MergeDirective.from_lines(StringIO(out))
327
326
        self.assertEqual('parent', md.base_revision_id)
328
327
        br = serializer.read_bundle(StringIO(md.get_raw_bundle()))
329
328
        self.assertEqual(set(revs), set(r.revision_id for r in br.revisions))