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

  • Committer: Jelmer Vernooij
  • Date: 2020-07-05 12:50:01 UTC
  • mfrom: (7490.40.46 work)
  • mto: (7490.40.48 work)
  • mto: This revision was merged to the branch mainline in revision 7519.
  • Revision ID: jelmer@jelmer.uk-20200705125001-7s3vo0p55szbbws7
Merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 
16
16
"""Fastimport/fastexport commands."""
17
17
 
 
18
from __future__ import absolute_import
 
19
 
18
20
from ... import controldir
19
21
from ...commands import Command
20
22
from ...option import Option, RegistryOption
 
23
from ...sixish import (
 
24
    text_type,
 
25
    )
21
26
 
22
27
 
23
28
from . import (
237
242
    _see_also = ['fast-export', 'fast-import-filter', 'fast-import-info']
238
243
    takes_args = ['source', 'destination?']
239
244
    takes_options = ['verbose',
240
 
                     Option('user-map', type=str,
 
245
                     Option('user-map', type=text_type,
241
246
                            help="Path to file containing a map of user-ids.",
242
247
                            ),
243
 
                     Option('info', type=str,
 
248
                     Option('info', type=text_type,
244
249
                            help="Path to file containing caching hints.",
245
250
                            ),
246
251
                     Option('trees',
266
271
                                                experimental="Enable experimental features.",
267
272
                                                value_switches=True, enum_switch=False,
268
273
                                                ),
269
 
                     Option('import-marks', type=str,
 
274
                     Option('import-marks', type=text_type,
270
275
                            help="Import marks from file."
271
276
                            ),
272
 
                     Option('export-marks', type=str,
 
277
                     Option('export-marks', type=text_type,
273
278
                            help="Export marks to file."
274
279
                            ),
275
280
                     RegistryOption('format',
317
322
                    user_map=user_map)
318
323
 
319
324
    def _generate_info(self, source):
320
 
        from io import StringIO
 
325
        from ...sixish import StringIO
321
326
        from fastimport import parser
322
327
        from fastimport.errors import ParsingError
323
328
        from ...errors import CommandError
443
448
    _see_also = ['fast-import', 'fast-import-filter']
444
449
    takes_args = ['source?', 'destination?']
445
450
    takes_options = ['verbose', 'revision',
446
 
                     Option('git-branch', short_name='b', type=str,
 
451
                     Option('git-branch', short_name='b', type=text_type,
447
452
                            argname='FILE',
448
453
                            help='Name of the git branch to create (default=master).'
449
454
                            ),
450
455
                     Option('checkpoint', type=int, argname='N',
451
456
                            help="Checkpoint every N revisions (default=10000)."
452
457
                            ),
453
 
                     Option('marks', type=str, argname='FILE',
 
458
                     Option('marks', type=text_type, argname='FILE',
454
459
                            help="Import marks from and export marks to file."
455
460
                            ),
456
 
                     Option('import-marks', type=str, argname='FILE',
 
461
                     Option('import-marks', type=text_type, argname='FILE',
457
462
                            help="Import marks from file."
458
463
                            ),
459
 
                     Option('export-marks', type=str, argname='FILE',
 
464
                     Option('export-marks', type=text_type, argname='FILE',
460
465
                            help="Export marks to file."
461
466
                            ),
462
467
                     Option('plain',