/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/plugins/git/tests/test_memorytree.py

  • Committer: Jelmer Vernooij
  • Date: 2018-05-13 22:54:28 UTC
  • mto: This revision was merged to the branch mainline in revision 6968.
  • Revision ID: jelmer@jelmer.uk-20180513225428-5ysu0bs9rtk7045h
Initial work to support brz-git on python3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
190
190
        tree.lock_write()
191
191
        self.addCleanup(tree.unlock)
192
192
        tree.add('')
193
 
        tree.mkdir('subdir', 'subdir-id')
194
 
        tree.add('foo', 'foo-id', 'file')
195
 
        tree.put_file_bytes_non_atomic('foo', 'content\n')
196
 
        tree.commit('one', rev_id='rev-one')
 
193
        tree.mkdir('subdir', b'subdir-id')
 
194
        tree.add('foo', b'foo-id', 'file')
 
195
        tree.put_file_bytes_non_atomic('foo', b'content\n')
 
196
        tree.commit('one', rev_id=b'rev-one')
197
197
 
198
198
        tree.rename_one('foo', 'subdir/bar')
199
 
        self.assertEqual('subdir/bar', tree.id2path('foo-id'))
200
 
        self.assertEqual('content\n',
 
199
        self.assertEqual('subdir/bar', tree.id2path(b'foo-id'))
 
200
        self.assertEqual(b'content\n',
201
201
                         tree._file_transport.get_bytes('subdir/bar'))
202
 
        tree.commit('two', rev_id='rev-two')
203
 
        rev_tree2 = tree.branch.repository.revision_tree('rev-two')
204
 
        self.assertEqual('subdir/bar', rev_tree2.id2path('foo-id'))
 
202
        tree.commit('two', rev_id=b'rev-two')
 
203
        rev_tree2 = tree.branch.repository.revision_tree(b'rev-two')
 
204
        self.assertEqual('subdir/bar', rev_tree2.id2path(b'foo-id'))