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