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

  • Committer: Ian Clatworthy
  • Date: 2009-08-11 07:27:15 UTC
  • mto: (0.64.200 trunk)
  • mto: This revision was merged to the branch mainline in revision 6631.
  • Revision ID: ian.clatworthy@canonical.com-20090811072715-llsfnu89mn8pt6dh
add encoding option to fast-export-from-darcs

Show diffs side-by-side

added added

removed removed

Lines of Context:
434
434
    hidden = False
435
435
    _see_also = ['fast-import', 'fast-import-filter']
436
436
    takes_args = ['source', 'destination']
437
 
    takes_options = ['verbose']
 
437
    takes_options = ['verbose',
 
438
                    Option('encoding', type=str, argname='CODEC',
 
439
                        help="Encoding used for commit messages if not utf-8."
 
440
                        ),
 
441
                    ]
438
442
    aliases = []
439
443
    encoding_type = 'exact'
440
 
    def run(self, source, destination, verbose=False):
 
444
    def run(self, source, destination, verbose=False, encoding=None):
441
445
        from bzrlib.plugins.fastimport.exporters import fast_export_from
442
 
        fast_export_from(source, destination, 'darcs', verbose)
 
446
        custom = None
 
447
        if encoding is not None:
 
448
            custom = ['--encoding', encoding]
 
449
        fast_export_from(source, destination, 'darcs', verbose, custom)
443
450
 
444
451
 
445
452
class cmd_fast_export_from_hg(Command):