Apply consistent parameter alises to hg and subversion

For issue #3372, apply consistent parameter aliases to source_control
modules.  For hg, add name and version and add to documentation string.
For subversion, add version and document version and name aliases in
documentation string.
pull/3642/merge
Stephen Fromm 12 years ago committed by James Cammarata
parent 49b0ff18a7
commit cc58403e48

@ -41,6 +41,7 @@ options:
- The repository address.
required: true
default: null
aliases: [ name ]
dest:
description:
- Absolute path of where the repository should be cloned to.
@ -52,6 +53,7 @@ options:
branch name or even tag.
required: false
default: "default"
aliases: [ version ]
force:
description:
- Discards uncommitted changes. Runs C(hg update -C).
@ -203,9 +205,9 @@ def switch_version(module, dest, revision):
def main():
module = AnsibleModule(
argument_spec = dict(
repo = dict(required=True),
repo = dict(required=True, aliases=['name']),
dest = dict(required=True),
revision = dict(default="default"),
revision = dict(default="default", aliases=['version']),
force = dict(default='yes', type='bool'),
purge = dict(default='no', type='bool')
),

@ -34,6 +34,7 @@ options:
description:
- The subversion URL to the repository.
required: true
aliases: [ name, repository ]
default: null
dest:
description:
@ -45,6 +46,7 @@ options:
- Specific revision to checkout.
required: false
default: HEAD
aliases: [ version ]
force:
description:
- If C(yes), modified files will be discarded. If C(no), module will fail if it encounters modified files.
@ -141,7 +143,7 @@ def main():
argument_spec=dict(
dest=dict(required=True),
repo=dict(required=True, aliases=['name', 'repository']),
revision=dict(default='HEAD', aliases=['rev']),
revision=dict(default='HEAD', aliases=['rev', 'version']),
force=dict(default='yes', type='bool'),
username=dict(required=False),
password=dict(required=False),

Loading…
Cancel
Save