コード例 #1
0
    def _get_environment_options_group(self):
        group = RunOptions._get_environment_options_group(self)

        group.add_option(
            ContextOption(
                '--svnadmin',
                type='string',
                action='store',
                dest='svnadmin_executable',
                help='path to the "svnadmin" program',
                man_help=
                ('Path to the \\fIsvnadmin\\fR program.  (\\fIsvnadmin\\fR is '
                 'needed when the \\fB-s\\fR/\\fB--svnrepos\\fR output option is '
                 'used.)'),
                metavar='PATH',
            ))

        return group
コード例 #2
0
    def _get_output_options_group(self):
        group = DVCSRunOptions._get_output_options_group(self)

        group.add_option(
            IncompatibleOption(
                '--blobfile',
                type='string',
                action='store',
                help='path to which the "blob" data should be written',
                man_help=
                ('Write the "blob" data (containing revision contents) to '
                 '\\fIpath\\fR.  If not set, the blob data is written to the '
                 'same destination as the dumpfile output.'),
                metavar='PATH',
            ))
        group.add_option(
            IncompatibleOption(
                '--dumpfile',
                type='string',
                action='store',
                help='path to which the revision data should be written',
                man_help=
                ('Write the revision data (branches and commits) to \\fIpath\\fR.  '
                 'If not set, output goes to stdout.'),
                metavar='PATH',
            ))
        group.add_option(
            ContextOption(
                '--dry-run',
                action='store_true',
                help=(
                    'do not create any output; just print what would happen.'),
                man_help=(
                    'Do not create any output; just print what would happen.'),
            ))

        return group
コード例 #3
0
    def _get_output_options_group(self):
        group = DVCSRunOptions._get_output_options_group(self)

        group.add_option(
            IncompatibleOption(
                '--dumpfile',
                type='string',
                action='store',
                help='path to which the data should be written',
                man_help=(
                    'Write the blobs and revision data to \\fIpath\\fR.'),
                metavar='PATH',
            ))
        group.add_option(
            ContextOption(
                '--dry-run',
                action='store_true',
                help=(
                    'do not create any output; just print what would happen.'),
                man_help=(
                    'Do not create any output; just print what would happen.'),
            ))

        return group
コード例 #4
0
    def _get_output_options_group(self):
        group = super(GitRunOptions, self)._get_output_options_group()

        group.add_option(
            IncompatibleOption(
                '--blobfile',
                type='string',
                action='store',
                help='path to which the "blob" data should be written',
                man_help=(
                    'Write the "blob" data (containing revision contents) to '
                    '\\fIpath\\fR.'),
                metavar='PATH',
            ))
        group.add_option(
            IncompatibleOption(
                '--dumpfile',
                type='string',
                action='store',
                help='path to which the revision data should be written',
                man_help=
                ('Write the revision data (branches and commits) to \\fIpath\\fR.'
                 ),
                metavar='PATH',
            ))
        group.add_option(
            ContextOption(
                '--dry-run',
                action='store_true',
                help=(
                    'do not create any output; just print what would happen.'),
                man_help=(
                    'Do not create any output; just print what would happen.'),
            ))

        return group
コード例 #5
0
    def _get_output_options_group(self):
        group = RunOptions._get_output_options_group(self)

        group.add_option(
            IncompatibleOption(
                '--svnrepos',
                '-s',
                type='string',
                action='store',
                help='path where SVN repos should be created',
                man_help=
                ('Write the output of the conversion into a Subversion repository '
                 'located at \\fIpath\\fR.  This option causes a new Subversion '
                 'repository to be created at \\fIpath\\fR unless the '
                 '\\fB--existing-svnrepos\\fR option is also used.'),
                metavar='PATH',
            ))
        self.parser.set_default('existing_svnrepos', False)
        group.add_option(
            IncompatibleOption(
                '--existing-svnrepos',
                action='store_true',
                help=
                'load into existing SVN repository (for use with --svnrepos)',
                man_help=
                ('Load the converted CVS repository into an existing Subversion '
                 'repository, instead of creating a new repository.  (This option '
                 'should be used in combination with '
                 '\\fB-s\\fR/\\fB--svnrepos\\fR.)  The repository must either be '
                 'empty or contain no paths that overlap with those that will '
                 'result from the conversion.  Please note that you need write '
                 'permission for the repository files.'),
            ))
        group.add_option(
            IncompatibleOption(
                '--fs-type',
                type='string',
                action='store',
                help=('pass --fs-type=TYPE to "svnadmin create" (for use with '
                      '--svnrepos)'),
                man_help=
                ('Pass \\fI--fs-type\\fR=\\fItype\\fR to "svnadmin create" when '
                 'creating a new repository.'),
                metavar='TYPE',
            ))
        self.parser.set_default('bdb_txn_nosync', False)
        group.add_option(
            IncompatibleOption(
                '--bdb-txn-nosync',
                action='store_true',
                help=(
                    'pass --bdb-txn-nosync to "svnadmin create" (for use with '
                    '--svnrepos)'),
                man_help=(
                    'Pass \\fI--bdb-txn-nosync\\fR to "svnadmin create" when '
                    'creating a new BDB-style Subversion repository.'),
            ))
        self.parser.set_default('create_options', [])
        group.add_option(
            IncompatibleOption(
                '--create-option',
                type='string',
                action='append',
                dest='create_options',
                help='pass OPT to "svnadmin create" (for use with --svnrepos)',
                man_help=
                ('Pass \\fIopt\\fR to "svnadmin create" when creating a new '
                 'Subversion repository (can be specified multiple times to '
                 'pass multiple options).'),
                metavar='OPT',
            ))
        group.add_option(
            IncompatibleOption(
                '--dumpfile',
                type='string',
                action='store',
                help='just produce a dumpfile; don\'t commit to a repos',
                man_help=
                ('Just produce a dumpfile; don\'t commit to an SVN repository. '
                 'Write the dumpfile to \\fIpath\\fR.'),
                metavar='PATH',
            ))

        group.add_option(
            ContextOption(
                '--dry-run',
                action='store_true',
                help=(
                    'do not create a repository or a dumpfile; just print what '
                    'would happen.'),
                man_help=
                ('Do not create a repository or a dumpfile; just print the '
                 'details of what cvs2svn would do if it were really converting '
                 'your repository.'),
            ))

        # Deprecated options:
        self.parser.set_default('dump_only', False)
        group.add_option(
            IncompatibleOption(
                '--dump-only',
                action='callback',
                callback=self.callback_dump_only,
                help=optparse.SUPPRESS_HELP,
                man_help=optparse.SUPPRESS_HELP,
            ))
        group.add_option(
            IncompatibleOption(
                '--create',
                action='callback',
                callback=self.callback_create,
                help=optparse.SUPPRESS_HELP,
                man_help=optparse.SUPPRESS_HELP,
            ))

        return group
コード例 #6
0
    def _get_conversion_options_group(self):
        group = RunOptions._get_conversion_options_group(self)

        self.parser.set_default('trunk_base', config.DEFAULT_TRUNK_BASE)
        group.add_option(
            IncompatibleOption(
                '--trunk',
                type='string',
                action='store',
                dest='trunk_base',
                help=('path for trunk (default: %s)' %
                      (config.DEFAULT_TRUNK_BASE, )),
                man_help=(
                    'Set the top-level path to use for trunk in the Subversion '
                    'repository. The default is \\fI%s\\fR.' %
                    (config.DEFAULT_TRUNK_BASE, )),
                metavar='PATH',
            ))
        self.parser.set_default('branches_base', config.DEFAULT_BRANCHES_BASE)
        group.add_option(
            IncompatibleOption(
                '--branches',
                type='string',
                action='store',
                dest='branches_base',
                help=('path for branches (default: %s)' %
                      (config.DEFAULT_BRANCHES_BASE, )),
                man_help=
                ('Set the top-level path to use for branches in the Subversion '
                 'repository.  The default is \\fI%s\\fR.' %
                 (config.DEFAULT_BRANCHES_BASE, )),
                metavar='PATH',
            ))
        self.parser.set_default('tags_base', config.DEFAULT_TAGS_BASE)
        group.add_option(
            IncompatibleOption(
                '--tags',
                type='string',
                action='store',
                dest='tags_base',
                help=('path for tags (default: %s)' %
                      (config.DEFAULT_TAGS_BASE, )),
                man_help=(
                    'Set the top-level path to use for tags in the Subversion '
                    'repository. The default is \\fI%s\\fR.' %
                    (config.DEFAULT_TAGS_BASE, )),
                metavar='PATH',
            ))
        group.add_option(
            ContextOption(
                '--no-prune',
                action='store_false',
                dest='prune',
                help='don\'t prune empty directories',
                man_help=
                ('When all files are deleted from a directory in the Subversion '
                 'repository, don\'t delete the empty directory (the default is '
                 'to delete any empty directories).'),
            ))
        group.add_option(
            ContextOption(
                '--no-cross-branch-commits',
                action='store_false',
                dest='cross_branch_commits',
                help='prevent the creation of cross-branch commits',
                man_help=
                ('Prevent the creation of commits that affect files on multiple '
                 'branches at once.'),
            ))

        return group
コード例 #7
0
    def _get_conversion_options_group(self):
        group = super(SVNRunOptions, self)._get_conversion_options_group()

        self.parser.set_default('trunk_base', config.DEFAULT_TRUNK_BASE)
        group.add_option(
            IncompatibleOption(
                '--trunk',
                type='string',
                action='store',
                dest='trunk_base',
                help=('path for trunk (default: %s)' %
                      (config.DEFAULT_TRUNK_BASE, )),
                man_help=(
                    'Set the top-level path to use for trunk in the Subversion '
                    'repository. The default is \\fI%s\\fR.' %
                    (config.DEFAULT_TRUNK_BASE, )),
                metavar='PATH',
            ))
        self.parser.set_default('branches_base', config.DEFAULT_BRANCHES_BASE)
        group.add_option(
            IncompatibleOption(
                '--branches',
                type='string',
                action='store',
                dest='branches_base',
                help=('path for branches (default: %s)' %
                      (config.DEFAULT_BRANCHES_BASE, )),
                man_help=
                ('Set the top-level path to use for branches in the Subversion '
                 'repository.  The default is \\fI%s\\fR.' %
                 (config.DEFAULT_BRANCHES_BASE, )),
                metavar='PATH',
            ))
        self.parser.set_default('tags_base', config.DEFAULT_TAGS_BASE)
        group.add_option(
            IncompatibleOption(
                '--tags',
                type='string',
                action='store',
                dest='tags_base',
                help=('path for tags (default: %s)' %
                      (config.DEFAULT_TAGS_BASE, )),
                man_help=(
                    'Set the top-level path to use for tags in the Subversion '
                    'repository. The default is \\fI%s\\fR.' %
                    (config.DEFAULT_TAGS_BASE, )),
                metavar='PATH',
            ))
        group.add_option(
            ContextOption(
                '--include-empty-directories',
                action='store_true',
                dest='include_empty_directories',
                help=('include empty directories within the CVS repository '
                      'in the conversion'),
                man_help=
                ('Treat empty subdirectories within the CVS repository as actual '
                 'directories, creating them when the parent directory is created '
                 'and removing them if and when the parent directory is pruned.'
                 ),
            ))
        group.add_option(
            ContextOption(
                '--no-prune',
                action='store_false',
                dest='prune',
                help='don\'t prune empty directories',
                man_help=
                ('When all files are deleted from a directory in the Subversion '
                 'repository, don\'t delete the empty directory (the default is '
                 'to delete any empty directories).'),
            ))
        group.add_option(
            ContextOption(
                '--no-cross-branch-commits',
                action='store_false',
                dest='cross_branch_commits',
                help='prevent the creation of cross-branch commits',
                man_help=
                ('Prevent the creation of commits that affect files on multiple '
                 'branches at once.'),
            ))

        return group