/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-02-07 02:14:30 UTC
  • mto: This revision was merged to the branch mainline in revision 7492.
  • Revision ID: jelmer@jelmer.uk-20200207021430-m49iq3x4x8xlib6x
Drop python2 support.

Show diffs side-by-side

added added

removed removed

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