def options(self, optparse):
        SubCommand.options(self, optparse, modules=globals())

        options = optparse.add_option_group('Remote options')
        options.add_option('-r',
                           '--remote',
                           dest='remote',
                           action='store',
                           help='Set the remote server location')

        options = optparse.add_option_group('Output options')
        options.add_option('-o',
                           '--output',
                           dest='output',
                           action='store',
                           help='Set the output directory')
        options.add_option(
            '--immediate',
            dest='immediate',
            action='store_true',
            help='Set the immediate directory to store the immediate files')
        options.add_option('--gitiles',
                           dest='gitiles',
                           action='store_true',
                           help='Enable gitiles links within the SHA-1')
        options.add_option('--format',
                           dest='format',
                           metavar='TEXT, HTML, ALL',
                           action='store',
                           default='text',
                           help='Set the report format')
Example #2
0
    def options(self, optparse):
        SubCommand.options(self,
                           optparse,
                           option_remote=True,
                           option_import=True,
                           modules=globals())

        options = optparse.get_option_group('--refs') or \
            optparse.add_option_group('Remote options')
        options.add_option(
            '--git',
            '--git-url',
            dest='git',
            action='store',
            metavar='GIT_URL',
            help='Set the git repository url to download and import')
        options.add_option('--rev',
                           '--reversion',
                           '--branch',
                           dest='branch',
                           action='store',
                           help='Set the initial revisions to download')
        options = optparse.get_option_group('--all') or \
            optparse.add_option_group('Git options')
        options.add_option(
            '-n',
            '--name',
            '--project-name',
            dest='name',
            action='store',
            metavar='NAME',
            help='Set the project name or local url. If it\'s not set, the '
            'name will be generated from the git name.')
        options.add_option('--bare',
                           dest='bare',
                           action='store_true',
                           help='Clone the bare repository')
        options.add_option('-m',
                           '--mirror',
                           dest='mirror',
                           action='store',
                           metavar='LOCATION',
                           help='Set the git repository mirror location')
Example #3
0
  def options(self, optparse):
    SubCommand.options(self, optparse)

    options = optparse.add_option_group('Pattern options')
    options.add_option(
      '--simple-substitute',
      dest='simple_subst', action='store_true',
      help='Define to use simple variable in option "from" and "to"')
    options.add_option(
      '--group',
      dest='group', action='store',
      help='The set name in value-set file')
    options.add_option(
      '--from',
      dest='fr', action='store', metavar="FROM",
      help='The referred "from" attr in referred elements')
    options.add_option(
      '--to',
      dest='to', action='store',
      help='The referred "to" attr in referred elements')

    options = optparse.add_option_group('File options')
    options.add_option(
      '--xml-file',
      dest='xml_file', action='store',
      help='Set the xml file as import value-sets')
    options.add_option(
      '--inplace',
      dest='inplace', action='store_true',
      help='Update the file in the place')
    options.add_option(
      '--postfix',
      dest='postfix', action='store',
      help='Output the files with specific extension postfix')
    options.add_option(
      '--output',
      dest='output', action='store',
      help='Output the replaced content to the file')
Example #4
0
    def options(self, optparse):
        SubCommand.options(self, optparse, option_import=True,
                           option_remote=True, modules=globals())

        options = optparse.get_option_group('--refs') or \
            optparse.add_option_group('Remote options')
        options.add_option(
            '-b', '--branch',
            dest="branch", action='store', metavar='BRANCH',
            help='Set the branch')
        options.add_option(
            '-n', '--name', '--project-name',
            dest="name", action='store', metavar='NAME',
            help='Set the project name. If it\'s not set, the name will be '
                 'generated from the git name')

        options = optparse.get_option_group('-a') or \
            optparse.add_option_group('Import options')
        options.add_option(
            '--author',
            dest='author', action='store',
            help='Set the commit author')
        options.add_option(
            '--init-path', '--init-import-path',
            dest='init_path', action='store',
            help='Set the initialized path with the provided path or '
                 'extracted package')
        options.add_option(
            '-l', '--local',
            dest='local', action='store_true',
            help='Set locally not to push the stuffs')
        options.add_option(
            '--keep-order', '--keep-file-order', '--skip-file-sort',
            dest='keep_order', action='store_true',
            help='Keep the order of input files or directories without sort')

        options = optparse.add_option_group('File options')
        options.add_option(
            '--auto-detect', '--skip-single-directory',
            dest='auto_detect', action='store_true',
            help='Ignore the root directory from the uncompressed package')
        options.add_option(
            '--vpref', '--version-prefix',
            dest='version_prefix', action='store',
            default='v', metavar='PREFIX',
            help='append the tag prefix ahead of the normal tag, it has no '
                 'effort with the option "tag-template", the default '
                 'is "%default"')
        options.add_option(
            '--temp-directory', '--temporary-directory',
            dest='temp_directory', action='store',
            help='Temporary directory for immediate storage')
        options.add_option(
            '--ppattern', '--pkg-pattern',
            dest='pkg_pattern', action='append', metavar='PATTERN',
            help='setup the matching pattern with the file or directory name '
                 'to pick out the pkgname and the version to decide the '
                 'importing order. The first match will be treated as the '
                 'package name {%(n)s in normal and %(N)s in capital} and '
                 'other will be built as the version {%(v)s or ${V}s}. More '
                 'than one pattern can be accepted')
        options.add_option(
            '--message-template',
            dest='message_template', action='store',
            help='Set the message template with the value from option '
                 '"--ppattern"')
        options.add_option(
            '--enable-escape',
            dest='enable_escape', action='store_true',
            help='Escape the messages with the known items like %sha1, '
                 '%md5, %file, %size, etc')
        options.add_option(
            '--version-template',
            dest='version_template', action='store',
            help='Set the tag template with the value from option '
                 '"--ppattern"')
        options.add_option(
            '--use-commit-file',
            dest='use_commit_file', action='store_true',
            help='Use the file like the imported file as the commit message')

        options = optparse.add_option_group('Filter options')
        options.add_option(
            '--filter-out',
            dest='filter_out', action='append', metavar='FILTER1,FILTER2',
            help='filter out not to import the directories or files which '
                 'match the filter pattern. More than one pattern can be '
                 'accepted')
        options.add_option(
            '--characters', '--filter-out-chars',
            dest='filter_out_chars', action='store',
            metavar='CHARS', default='-.',
            help='filter out the characters in the segments returned from '
                 'the option "ppattern", default: %default')
        options.add_option(
            '--filter-out-sccs',
            dest='filter_out_sccs', action='store_true',
            help='filter out the known sccs meta files including cvs, '
                 'subversion, mercurial. git is excluded as they can be '
                 'resued')

        options = optparse.add_option_group('Other options')
        options.add_option(
            '--show-order',
            dest='show_order', action='store_true',
            help='Show the import order for the listed files')