[PR #9394/912065ad backport][stable-9] h*.py: normalize docs (#9416)

h*.py: normalize docs (#9394)

* h*.py: normalize docs

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 912065ad0e)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2024-12-26 22:44:12 +01:00 committed by GitHub
parent e1d229f2c5
commit 87d63c5bed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 2272 additions and 2513 deletions

View file

@ -9,75 +9,71 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
DOCUMENTATION = r"""
module: hg
short_description: Manages Mercurial (hg) repositories
description:
- Manages Mercurial (hg) repositories. Supports SSH, HTTP/S and local address.
- Manages Mercurial (hg) repositories. Supports SSH, HTTP/S and local address.
author: "Yeukhon Wong (@yeukhon)"
extends_documentation_fragment:
- community.general.attributes
- community.general.attributes
attributes:
check_mode:
support: none
diff_mode:
support: none
check_mode:
support: none
diff_mode:
support: none
options:
repo:
description:
- The repository address.
required: true
aliases: [ name ]
type: str
dest:
description:
- Absolute path of where the repository should be cloned to.
This parameter is required, unless clone and update are set to no
type: path
revision:
description:
- Equivalent C(-r) option in hg command which could be the changeset, revision number,
branch name or even tag.
aliases: [ version ]
type: str
force:
description:
- Discards uncommitted changes. Runs C(hg update -C).
type: bool
default: false
purge:
description:
- Deletes untracked files. Runs C(hg purge).
type: bool
default: false
update:
description:
- If V(false), do not retrieve new revisions from the origin repository
type: bool
default: true
clone:
description:
- If V(false), do not clone the repository if it does not exist locally.
type: bool
default: true
executable:
description:
- Path to hg executable to use. If not supplied,
the normal mechanism for resolving binary paths will be used.
type: str
repo:
description:
- The repository address.
required: true
aliases: [name]
type: str
dest:
description:
- Absolute path of where the repository should be cloned to. This parameter is required, unless clone and update are
set to no.
type: path
revision:
description:
- Equivalent C(-r) option in hg command which could be the changeset, revision number, branch name or even tag.
aliases: [version]
type: str
force:
description:
- Discards uncommitted changes. Runs C(hg update -C).
type: bool
default: false
purge:
description:
- Deletes untracked files. Runs C(hg purge).
type: bool
default: false
update:
description:
- If V(false), do not retrieve new revisions from the origin repository.
type: bool
default: true
clone:
description:
- If V(false), do not clone the repository if it does not exist locally.
type: bool
default: true
executable:
description:
- Path to hg executable to use. If not supplied, the normal mechanism for resolving binary paths will be used.
type: str
notes:
- This module does not support push capability. See U(https://github.com/ansible/ansible/issues/31156).
- "If the task seems to be hanging, first verify remote host is in C(known_hosts).
SSH will prompt user to authorize the first contact with a remote host. To avoid this prompt,
one solution is to add the remote host public key in C(/etc/ssh/ssh_known_hosts) before calling
the hg module, with the following command: ssh-keyscan remote_host.com >> /etc/ssh/ssh_known_hosts."
- As per 01 Dec 2018, Bitbucket has dropped support for TLSv1 and TLSv1.1 connections. As such,
if the underlying system still uses a Python version below 2.7.9, you will have issues checking out
bitbucket repositories. See U(https://bitbucket.org/blog/deprecating-tlsv1-tlsv1-1-2018-12-01).
'''
- This module does not support push capability. See U(https://github.com/ansible/ansible/issues/31156).
- 'If the task seems to be hanging, first verify remote host is in C(known_hosts). SSH will prompt user to authorize the
first contact with a remote host. To avoid this prompt, one solution is to add the remote host public key in C(/etc/ssh/ssh_known_hosts)
before calling the hg module, with the following command: C(ssh-keyscan remote_host.com >> /etc/ssh/ssh_known_hosts).'
- As per 01 Dec 2018, Bitbucket has dropped support for TLSv1 and TLSv1.1 connections. As such, if the underlying system
still uses a Python version below 2.7.9, you will have issues checking out bitbucket repositories.
See U(https://bitbucket.org/blog/deprecating-tlsv1-tlsv1-1-2018-12-01).
"""
EXAMPLES = '''
EXAMPLES = r"""
- name: Ensure the current working copy is inside the stable branch and deletes untracked files if any.
community.general.hg:
repo: https://bitbucket.org/user/repo1
@ -91,7 +87,7 @@ EXAMPLES = '''
dest: /srv/checkout
clone: false
update: false
'''
"""
import os