~ubuntu-branches/debian/jessie/bzr-fastimport/jessie

« back to all changes in this revision

Viewing changes to bzr_exporter.py

  • Committer: Bazaar Package Importer
  • Author(s): Jelmer Vernooij
  • Date: 2010-11-06 18:40:27 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20101106184027-iclo8iim9equ6i8b
Tags: 0.9.0+bzr279-1
* New upstream snapshot.
* Bump standards version to 3.9.1 (no changes).
* Run testsuite during package build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
    trace,
41
41
    )
42
42
 
43
 
from bzrlib.plugins.fastimport import commands, helpers, marks_file
 
43
from bzrlib.plugins.fastimport import helpers, marks_file
44
44
 
 
45
from fastimport import commands
45
46
 
46
47
class BzrFastExporter(object):
47
48
 
372
373
        for path, id_, kind in changes.added + my_modified + rd_modifies:
373
374
            if kind == 'file':
374
375
                text = tree_new.get_file_text(id_)
375
 
                file_cmds.append(commands.FileModifyCommand(path, 'file',
376
 
                    tree_new.is_executable(id_), None, text))
 
376
                file_cmds.append(commands.FileModifyCommand(path,
 
377
                    helpers.kind_to_mode('file', tree_new.is_executable(id_)),
 
378
                    None, text))
377
379
            elif kind == 'symlink':
378
 
                file_cmds.append(commands.FileModifyCommand(path, 'symlink',
379
 
                    False, None, tree_new.get_symlink_target(id_)))
 
380
                file_cmds.append(commands.FileModifyCommand(path,
 
381
                    helpers.kind_to_mode('symlink', False),
 
382
                    None, tree_new.get_symlink_target(id_)))
380
383
            elif kind == 'directory':
381
384
                if not self.plain_format:
382
 
                    file_cmds.append(commands.FileModifyCommand(path, 'directory',
383
 
                        False, None, None))
 
385
                    file_cmds.append(commands.FileModifyCommand(path,
 
386
                        helpers.kind_to_mode('directory', False),
 
387
                        None, None))
384
388
            else:
385
389
                self.warning("cannot export '%s' of kind %s yet - ignoring" %
386
390
                    (path, kind))