/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 breezy/tests/test_bundle.py

  • Committer: Jelmer Vernooij
  • Date: 2017-11-12 17:53:47 UTC
  • mfrom: (6813 trunk)
  • mto: This revision was merged to the branch mainline in revision 6819.
  • Revision ID: jelmer@jelmer.uk-20171112175347-wovgaqmkbyo8fo7f
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
118
118
        return kind
119
119
 
120
120
    def make_entry(self, file_id, path):
121
 
        from ..bzr.inventory import (InventoryFile , InventoryDirectory,
 
121
        from ..bzr.inventory import (InventoryFile, InventoryDirectory,
122
122
            InventoryLink)
123
123
        name = os.path.basename(path)
124
124
        kind = self.kind(file_id)
158
158
            file_id = self.path2id(path)
159
159
        result = BytesIO()
160
160
        result.write(self.contents[file_id])
161
 
        result.seek(0,0)
 
161
        result.seek(0, 0)
162
162
        return result
163
163
 
164
164
    def get_file_revision(self, path, file_id=None):
269
269
    def unified_diff(self, old, new):
270
270
        out = BytesIO()
271
271
        diff.internal_diff("old", old, "new", new, out)
272
 
        out.seek(0,0)
 
272
        out.seek(0, 0)
273
273
        return out.read()
274
274
 
275
275
    def make_tree_2(self):
719
719
        tt.apply()
720
720
        self.tree1.commit('add symlink', rev_id='l@cset-0-1')
721
721
        bundle = self.get_valid_bundle('null:', 'l@cset-0-1')
722
 
        if getattr(bundle ,'revision_tree', None) is not None:
 
722
        if getattr(bundle, 'revision_tree', None) is not None:
723
723
            # Not all bundle formats supports revision_tree
724
724
            bund_tree = bundle.revision_tree(self.b1.repository, 'l@cset-0-1')
725
725
            self.assertEqual(link_target, bund_tree.get_symlink_target(link_id))
732
732
        tt.apply()
733
733
        self.tree1.commit('rename and change symlink', rev_id='l@cset-0-2')
734
734
        bundle = self.get_valid_bundle('l@cset-0-1', 'l@cset-0-2')
735
 
        if getattr(bundle ,'revision_tree', None) is not None:
 
735
        if getattr(bundle, 'revision_tree', None) is not None:
736
736
            # Not all bundle formats supports revision_tree
737
737
            bund_tree = bundle.revision_tree(self.b1.repository, 'l@cset-0-2')
738
738
            self.assertEqual(new_link_target,