/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bundle.py

  • Committer: John Arbash Meinel
  • Date: 2011-04-20 12:27:33 UTC
  • mfrom: (4379.5.7 faster-dirstate-save)
  • mto: This revision was merged to the branch mainline in revision 5836.
  • Revision ID: john@arbash-meinel.com-20110420122733-xh83w1u6nadvf637
Merge Ian's work on faster dirstate operations (not writing out new dirstate for uninteresting changes).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2005-2011 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,
31
30
    revision as _mod_revision,
32
31
    tests,
33
32
    treebuilder,
35
34
from bzrlib.bundle import read_mergeable_from_url
36
35
from bzrlib.bundle.apply_bundle import install_bundle, merge_bundle
37
36
from bzrlib.bundle.bundle_data import BundleTree
38
 
from bzrlib.bzrdir import BzrDir
39
37
from bzrlib.directory_service import directories
40
38
from bzrlib.bundle.serializer import write_bundle, read_bundle, v09, v4
41
39
from bzrlib.bundle.serializer.v08 import BundleSerializerV08
42
40
from bzrlib.bundle.serializer.v09 import BundleSerializerV09
43
41
from bzrlib.bundle.serializer.v4 import BundleSerializerV4
44
 
from bzrlib.branch import Branch
45
42
from bzrlib.repofmt import knitrepo
46
43
from bzrlib.tests import (
47
44
    test_read_bundle,
114
111
            ie = InventoryDirectory(file_id, name, parent_id)
115
112
        elif kind == 'file':
116
113
            ie = InventoryFile(file_id, name, parent_id)
 
114
            ie.text_sha1 = text_sha_1
 
115
            ie.text_size = text_size
117
116
        elif kind == 'symlink':
118
117
            ie = InventoryLink(file_id, name, parent_id)
119
118
        else:
120
119
            raise errors.BzrError('unknown kind %r' % kind)
121
 
        ie.text_sha1 = text_sha_1
122
 
        ie.text_size = text_size
123
120
        return ie
124
121
 
125
122
    def add_dir(self, file_id, path):
145
142
        result.seek(0,0)
146
143
        return result
147
144
 
 
145
    def get_file_revision(self, file_id):
 
146
        return self.inventory[file_id].revision
 
147
 
148
148
    def contents_stats(self, file_id):
149
149
        if file_id not in self.contents:
150
150
            return None, None
1412
1412
        branch = tree_a.branch
1413
1413
        repo_a = branch.repository
1414
1414
        tree_a.commit("base", allow_pointless=True, rev_id='A')
1415
 
        self.failIf(branch.repository.has_signature_for_revision_id('A'))
 
1415
        self.assertFalse(branch.repository.has_signature_for_revision_id('A'))
1416
1416
        try:
1417
1417
            from bzrlib.testament import Testament
1418
1418
            # monkey patch gpg signing mechanism
1442
1442
        install_bundle(repo_b, serializer.read(s))
1443
1443
 
1444
1444
 
1445
 
class V4WeaveBundleTester(V4BundleTester):
1446
 
 
1447
 
    def bzrdir_format(self):
1448
 
        return 'metaweave'
1449
 
 
1450
 
 
1451
1445
class V4_2aBundleTester(V4BundleTester):
1452
1446
 
1453
1447
    def bzrdir_format(self):