~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bundle.py

  • Committer: Robert Collins
  • Date: 2010-05-06 07:48:22 UTC
  • mto: This revision was merged to the branch mainline in revision 5223.
  • Revision ID: robertc@robertcollins.net-20100506074822-0bsgf2j4h8jx0xkk
Added ``bzrlib.tests.matchers`` as a place to put matchers, along with
our first in-tree matcher. See the module docstring for details.
(Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2011 Canonical Ltd
 
1
# Copyright (C) 2005-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
27
27
    inventory,
28
28
    merge,
29
29
    osutils,
 
30
    repository,
30
31
    revision as _mod_revision,
31
32
    tests,
32
33
    treebuilder,
34
35
from bzrlib.bundle import read_mergeable_from_url
35
36
from bzrlib.bundle.apply_bundle import install_bundle, merge_bundle
36
37
from bzrlib.bundle.bundle_data import BundleTree
 
38
from bzrlib.bzrdir import BzrDir
37
39
from bzrlib.directory_service import directories
38
40
from bzrlib.bundle.serializer import write_bundle, read_bundle, v09, v4
39
41
from bzrlib.bundle.serializer.v08 import BundleSerializerV08
40
42
from bzrlib.bundle.serializer.v09 import BundleSerializerV09
41
43
from bzrlib.bundle.serializer.v4 import BundleSerializerV4
 
44
from bzrlib.branch import Branch
42
45
from bzrlib.repofmt import knitrepo
43
46
from bzrlib.tests import (
44
47
    test_read_bundle,
111
114
            ie = InventoryDirectory(file_id, name, parent_id)
112
115
        elif kind == 'file':
113
116
            ie = InventoryFile(file_id, name, parent_id)
114
 
            ie.text_sha1 = text_sha_1
115
 
            ie.text_size = text_size
116
117
        elif kind == 'symlink':
117
118
            ie = InventoryLink(file_id, name, parent_id)
118
119
        else:
119
120
            raise errors.BzrError('unknown kind %r' % kind)
 
121
        ie.text_sha1 = text_sha_1
 
122
        ie.text_size = text_size
120
123
        return ie
121
124
 
122
125
    def add_dir(self, file_id, path):