Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
]
)
perforce_options = OptionGroup(
name='Perforce Options',
description='Perforce-specific options for selecting the '
'Perforce client and communicating with the '
'repository.',
option_list=[
Option('--p4-client',
dest='p4_client',
config_key='P4_CLIENT',
default=None,
metavar='CLIENT_NAME',
help='The Perforce client name for the repository.'),
Option('--p4-port',
dest='p4_port',
config_key='P4_PORT',
default=None,
metavar='PORT',
help='The IP address for the Perforce server.'),
Option('--p4-passwd',
dest='p4_passwd',
config_key='P4_PASSWD',
default=None,
metavar='PASSWORD',
help='The Perforce password or ticket of the user '
'in the P4USER environment variable.'),
]
)
subversion_options = OptionGroup(
'generation.',
option_list=[
Option('--basedir',
dest='basedir',
config_key='BASEDIR',
default=None,
metavar='PATH',
help='The path within the repository where the diff '
'was generated. This overrides the detected path. '
'Often used when passing --diff-filename.'),
Option('--svn-username',
dest='svn_username',
default=None,
metavar='USERNAME',
help='The username for the SVN repository.'),
Option('--svn-password',
dest='svn_password',
default=None,
metavar='PASSWORD',
help='The password for the SVN repository.'),
Option('--svn-show-copies-as-adds',
dest='svn_show_copies_as_adds',
metavar='y|n',
default=None,
help='Treat copied or moved files as new files.'
'\n'
'This is only supported in Subversion 1.7+.',
added_in='0.5.2'),
Option('--svn-changelist',
dest='svn_changelist',
default=None,
metavar='ID',
default=None,
metavar='PATH',
help='The path within the repository where the diff '
'was generated. This overrides the detected path. '
'Often used when passing --diff-filename.'),
Option('--svn-username',
dest='svn_username',
default=None,
metavar='USERNAME',
help='The username for the SVN repository.'),
Option('--svn-password',
dest='svn_password',
default=None,
metavar='PASSWORD',
help='The password for the SVN repository.'),
Option('--svn-show-copies-as-adds',
dest='svn_show_copies_as_adds',
metavar='y|n',
default=None,
help='Treat copied or moved files as new files.'
'\n'
'This is only supported in Subversion 1.7+.',
added_in='0.5.2'),
Option('--svn-changelist',
dest='svn_changelist',
default=None,
metavar='ID',
help='Generates the diff for review based on a '
'local changelist.',
deprecated_in='0.6'),
]
)
'server.'),
Option('--api-token',
dest='api_token',
metavar='TOKEN',
config_key='API_TOKEN',
default=None,
help='The API token to use for authentication, instead of '
'using a username and password.',
added_in='0.7'),
]
)
repository_options = OptionGroup(
name='Repository Options',
option_list=[
Option('--repository',
dest='repository_name',
metavar='NAME',
config_key='REPOSITORY',
default=None,
help='The name of the repository configured on '
'Review Board that matches the local repository.'),
Option('--repository-url',
dest='repository_url',
metavar='URL',
config_key='REPOSITORY_URL',
default=None,
help='The URL for a repository.'
'\n'
'When generating diffs, this can be used for '
'creating a diff outside of a working copy '
'(currently only supported by Subversion with '
'specific revisions or --diff-filename, and by '
'ClearCase with relative paths outside the view).'
'\n'
'For Git, this specifies the origin URL of the '
'current repository, overriding the origin URL '
'supplied by the client.',
versions_changed={
'0.6': 'Prior versions used the `REPOSITORY` setting '
'in .reviewboardrc, and allowed a '
'repository name to be passed to '
'--repository-url. This is no '
'longer supported in 0.6 and higher. You '
'may need to update your configuration and '
'scripts appropriately.',
}),
Option('--repository-type',
dest='repository_type',
metavar='TYPE',
config_key='REPOSITORY_TYPE',
default=None,
help='The type of repository in the current directory. '
'In most cases this should be detected '
'automatically, but some directory structures '
'containing multiple repositories require this '
'option to select the proper type. The '
'`rbt list-repo-types` command can be used to '
'list the supported values.'),
]
)
diff_options = OptionGroup(
name='Diff Generation Options',
'using a username and password.',
added_in='0.7'),
]
)
repository_options = OptionGroup(
name='Repository Options',
option_list=[
Option('--repository',
dest='repository_name',
metavar='NAME',
config_key='REPOSITORY',
default=None,
help='The name of the repository configured on '
'Review Board that matches the local repository.'),
Option('--repository-url',
dest='repository_url',
metavar='URL',
config_key='REPOSITORY_URL',
default=None,
help='The URL for a repository.'
'\n'
'When generating diffs, this can be used for '
'creating a diff outside of a working copy '
'(currently only supported by Subversion with '
'specific revisions or --diff-filename, and by '
'ClearCase with relative paths outside the view).'
'\n'
'For Git, this specifies the origin URL of the '
'current repository, overriding the origin URL '
'supplied by the client.',
versions_changed={
)
subversion_options = OptionGroup(
name='Subversion Options',
description='Subversion-specific options for controlling diff '
'generation.',
option_list=[
Option('--basedir',
dest='basedir',
config_key='BASEDIR',
default=None,
metavar='PATH',
help='The path within the repository where the diff '
'was generated. This overrides the detected path. '
'Often used when passing --diff-filename.'),
Option('--svn-username',
dest='svn_username',
default=None,
metavar='USERNAME',
help='The username for the SVN repository.'),
Option('--svn-password',
dest='svn_password',
default=None,
metavar='PASSWORD',
help='The password for the SVN repository.'),
Option('--svn-show-copies-as-adds',
dest='svn_show_copies_as_adds',
metavar='y|n',
default=None,
help='Treat copied or moved files as new files.'
'\n'
'This is only supported in Subversion 1.7+.',
metavar='USERNAME',
help='The username for the SVN repository.'),
Option('--svn-password',
dest='svn_password',
default=None,
metavar='PASSWORD',
help='The password for the SVN repository.'),
Option('--svn-show-copies-as-adds',
dest='svn_show_copies_as_adds',
metavar='y|n',
default=None,
help='Treat copied or moved files as new files.'
'\n'
'This is only supported in Subversion 1.7+.',
added_in='0.5.2'),
Option('--svn-changelist',
dest='svn_changelist',
default=None,
metavar='ID',
help='Generates the diff for review based on a '
'local changelist.',
deprecated_in='0.6'),
]
)
tfs_options = OptionGroup(
name='TFS Options',
description='Team Foundation Server specific options for '
'communicating with the TFS server.',
option_list=[
Option('--tfs-login',
dest='tfs_login',
metavar='REV1:REV2',
default=None,
help='Generates a diff for the given revision range.',
deprecated_in='0.6'),
Option('-I', '--include',
metavar='FILENAME',
dest='include_files',
action='append',
help='Includes only the specified file in the diff. '
'This can be used multiple times to specify '
'multiple files.'
'\n'
'Supported by: Bazaar, CVS, Git, Mercurial, '
'Perforce, and Subversion.',
added_in='0.6'),
Option('-X', '--exclude',
metavar='PATTERN',
dest='exclude_patterns',
action='append',
config_key='EXCLUDE_PATTERNS',
help='Excludes all files that match the given pattern '
'from the diff. This can be used multiple times to '
'specify multiple patterns. UNIX glob syntax is used '
'for pattern matching.'
'\n'
'Supported by: Bazaar, CVS, Git, Mercurial, '
'Perforce, and Subversion.',
extended_help=(
'Patterns that begin with a path separator (/ on Mac '
'OS and Linux, \\ on Windows) will be treated as being '
'relative to the root of the repository. All other '
'patterns are treated as being relative to the current '
'list the supported values.'),
]
)
diff_options = OptionGroup(
name='Diff Generation Options',
description='Options for choosing what gets included in a diff, '
'and how the diff is generated.',
option_list=[
Option('--revision-range',
dest='revision_range',
metavar='REV1:REV2',
default=None,
help='Generates a diff for the given revision range.',
deprecated_in='0.6'),
Option('-I', '--include',
metavar='FILENAME',
dest='include_files',
action='append',
help='Includes only the specified file in the diff. '
'This can be used multiple times to specify '
'multiple files.'
'\n'
'Supported by: Bazaar, CVS, Git, Mercurial, '
'Perforce, and Subversion.',
added_in='0.6'),
Option('-X', '--exclude',
metavar='PATTERN',
dest='exclude_patterns',
action='append',
config_key='EXCLUDE_PATTERNS',
help='Excludes all files that match the given pattern '