43
from bzrlib.plugins.fastimport import commands, helpers, marks_file
43
from bzrlib.plugins.fastimport import helpers, marks_file
45
from fastimport import commands
46
47
class BzrFastExporter(object):
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_)),
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',
385
file_cmds.append(commands.FileModifyCommand(path,
386
helpers.kind_to_mode('directory', False),
385
389
self.warning("cannot export '%s' of kind %s yet - ignoring" %