/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_upstream_import.py

  • Committer: Jelmer Vernooij
  • Date: 2018-11-17 00:47:52 UTC
  • mfrom: (7182 work)
  • mto: This revision was merged to the branch mainline in revision 7305.
  • Revision ID: jelmer@jelmer.uk-20181117004752-6ywampe5pfywlby4
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
101
101
        try:
102
102
            os.mkdir('project-0.1')
103
103
            if subdir:
104
 
                prefix='project-0.1/'
 
104
                prefix = 'project-0.1/'
105
105
                archive_file.add('project-0.1')
106
106
            else:
107
 
                prefix=''
 
107
                prefix = ''
108
108
                os.chdir('project-0.1')
109
109
            os.mkdir(prefix + 'junk')
110
110
            archive_file.add(prefix + 'junk')
131
131
        os.mkdir('project-0.2')
132
132
        try:
133
133
            if subdir:
134
 
                prefix='project-0.2/'
 
134
                prefix = 'project-0.2/'
135
135
                archive_file.add('project-0.2')
136
136
            else:
137
 
                prefix=''
 
137
                prefix = ''
138
138
                os.chdir('project-0.2')
139
139
 
140
140
            os.mkdir(prefix + 'junk')
285
285
        b = self.make_repository('foo')
286
286
        null_tree = b.revision_tree(_mod_revision.NULL_REVISION)
287
287
        tt = transform.TransformPreview(null_tree)
288
 
        root = tt.new_directory('', transform.ROOT_PARENT, b'tree-root')
 
288
        tt.new_directory('', transform.ROOT_PARENT, b'tree-root')
289
289
        tt.fixup_new_roots()
290
290
        self.addCleanup(tt.finalize)
291
291
        return tt
293
293
    def test_nonascii_paths(self):
294
294
        self.requireFeature(UnicodeFilenameFeature)
295
295
        tt = self.get_empty_tt()
296
 
        encoded_file = tt.new_file(
297
 
            u'\u1234file', tt.root, [b'contents'], b'new-file')
298
 
        encoded_file = tt.new_file(
299
 
            'other', tt.root, [b'contents'], b'other-file')
 
296
        tt.new_file(u'\u1234file', tt.root, [b'contents'], b'new-file')
 
297
        tt.new_file('other', tt.root, [b'contents'], b'other-file')
300
298
        tarfile = self.transform_to_tar(tt)
301
299
        tarfile.seek(0)
302
300
        tree = self.make_branch_and_tree('bar')