/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: Martin
  • Date: 2017-11-12 13:53:51 UTC
  • mto: This revision was merged to the branch mainline in revision 6810.
  • Revision ID: gzlist@googlemail.com-20171112135351-uyr1ncw7visg62c2
Apply 2to3 ws_comma fixer

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)
156
156
    def get_file(self, file_id):
157
157
        result = BytesIO()
158
158
        result.write(self.contents[file_id])
159
 
        result.seek(0,0)
 
159
        result.seek(0, 0)
160
160
        return result
161
161
 
162
162
    def get_file_revision(self, file_id):
260
260
    def unified_diff(self, old, new):
261
261
        out = BytesIO()
262
262
        diff.internal_diff("old", old, "new", new, out)
263
 
        out.seek(0,0)
 
263
        out.seek(0, 0)
264
264
        return out.read()
265
265
 
266
266
    def make_tree_2(self):
709
709
        tt.apply()
710
710
        self.tree1.commit('add symlink', rev_id='l@cset-0-1')
711
711
        bundle = self.get_valid_bundle('null:', 'l@cset-0-1')
712
 
        if getattr(bundle ,'revision_tree', None) is not None:
 
712
        if getattr(bundle, 'revision_tree', None) is not None:
713
713
            # Not all bundle formats supports revision_tree
714
714
            bund_tree = bundle.revision_tree(self.b1.repository, 'l@cset-0-1')
715
715
            self.assertEqual(link_target, bund_tree.get_symlink_target(link_id))
722
722
        tt.apply()
723
723
        self.tree1.commit('rename and change symlink', rev_id='l@cset-0-2')
724
724
        bundle = self.get_valid_bundle('l@cset-0-1', 'l@cset-0-2')
725
 
        if getattr(bundle ,'revision_tree', None) is not None:
 
725
        if getattr(bundle, 'revision_tree', None) is not None:
726
726
            # Not all bundle formats supports revision_tree
727
727
            bund_tree = bundle.revision_tree(self.b1.repository, 'l@cset-0-2')
728
728
            self.assertEqual(new_link_target,