/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/fastimport/exporter.py

  • Committer: Jelmer Vernooij
  • Date: 2018-12-11 17:23:43 UTC
  • mfrom: (7221 work)
  • mto: This revision was merged to the branch mainline in revision 7223.
  • Revision ID: jelmer@jelmer.uk-20181211172343-ig78dq5zoqg9rrzl
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
499
499
            my_modified.append((path, id_, kind2))
500
500
 
501
501
        # Record modifications
 
502
        files_to_get = []
502
503
        for path, id_, kind in changes.added + my_modified + rd_modifies:
503
504
            if kind == 'file':
504
 
                text = tree_new.get_file_text(path)
505
 
                file_cmds.append(commands.FileModifyCommand(
506
 
                    path.encode("utf-8"),
507
 
                    helpers.kind_to_mode('file', tree_new.is_executable(path)),
508
 
                    None, text))
 
505
                files_to_get.append(
 
506
                    (path,
 
507
                     (path, helpers.kind_to_mode(
 
508
                         'file', tree_new.is_executable(path)))))
509
509
            elif kind == 'symlink':
510
510
                file_cmds.append(commands.FileModifyCommand(
511
511
                    path.encode("utf-8"),
521
521
            else:
522
522
                self.warning("cannot export '%s' of kind %s yet - ignoring" %
523
523
                             (path, kind))
 
524
        for (path, mode), chunks in tree_new.iter_files_bytes(
 
525
                files_to_get):
 
526
            file_cmds.append(commands.FileModifyCommand(
 
527
                path.encode("utf-8"), mode, None, b''.join(chunks)))
524
528
        return file_cmds
525
529
 
526
530
    def _process_renames_and_deletes(self, renames, deletes,