403Webshell
Server IP : 157.22.201.140  /  Your IP : 216.73.216.74
Web Server : nginx/1.30.1
System : Linux mit.vincode.fvds.ru 6.8.0-111-generic #111-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 11 23:16:02 UTC 2026 x86_64
User : root ( 0)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/ansible/modules/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/ansible/modules/__pycache__/subversion.cpython-312.pyc
�

1<�e�4���ddlmZmZmZeZdZdZdZddl	Z	ddl
Z
ddlmZddl
mZddlmZGd	�d
e�Zd�Zedk(re�yy)
�)�absolute_import�division�print_functiona�
---
module: subversion
short_description: Deploys a subversion repository
description:
   - Deploy given repository URL / revision to dest. If dest exists, update to the specified revision, otherwise perform a checkout.
version_added: "0.7"
author:
- Dane Summers (@dsummersl) <njharman@gmail.com>
options:
  repo:
    description:
      - The subversion URL to the repository.
    type: str
    required: true
    aliases: [ name, repository ]
  dest:
    description:
      - Absolute path where the repository should be deployed.
      - The destination directory must be specified unless O(checkout=no), O(update=no), and O(export=no).
    type: path
  revision:
    description:
      - Specific revision to checkout.
    type: str
    default: HEAD
    aliases: [ rev, version ]
  force:
    description:
      - If V(true), modified files will be discarded. If V(false), module will fail if it encounters modified files.
        Prior to 1.9 the default was V(true).
    type: bool
    default: "no"
  in_place:
    description:
      - If the directory exists, then the working copy will be checked-out over-the-top using
        svn checkout --force; if force is specified then existing files with different content are reverted.
    type: bool
    default: "no"
    version_added: "2.6"
  username:
    description:
      - C(--username) parameter passed to svn.
    type: str
  password:
    description:
      - C(--password) parameter passed to svn when svn is less than version 1.10.0. This is not secure and
        the password will be leaked to argv.
      - C(--password-from-stdin) parameter when svn is greater or equal to version 1.10.0.
    type: str
  executable:
    description:
      - Path to svn executable to use. If not supplied,
        the normal mechanism for resolving binary paths will be used.
    type: path
    version_added: "1.4"
  checkout:
    description:
     - If V(false), do not check out the repository if it does not exist locally.
    type: bool
    default: "yes"
    version_added: "2.3"
  update:
    description:
     - If V(false), do not retrieve new revisions from the origin repository.
    type: bool
    default: "yes"
    version_added: "2.3"
  export:
    description:
      - If V(true), do export instead of checkout/update.
    type: bool
    default: "no"
    version_added: "1.6"
  switch:
    description:
      - If V(false), do not call svn switch before update.
    default: "yes"
    version_added: "2.0"
    type: bool
  validate_certs:
    description:
      - If V(false), passes the C(--trust-server-cert) flag to svn.
      - If V(true), does not pass the flag.
    default: "no"
    version_added: "2.11"
    type: bool
extends_documentation_fragment: action_common_attributes
attributes:
    check_mode:
        support: full
    diff_mode:
        support: none
    platform:
        platforms: posix
notes:
   - This module does not handle externals.

requirements:
    - subversion (the command line tool with C(svn) entrypoint)
a+
- name: Checkout subversion repository to specified folder
  ansible.builtin.subversion:
    repo: svn+ssh://an.example.org/path/to/repo
    dest: /src/checkout

- name: Export subversion directory to folder
  ansible.builtin.subversion:
    repo: svn+ssh://an.example.org/path/to/repo
    dest: /src/export
    export: yes

- name: Get information about the repository whether or not it has already been cloned locally
  ansible.builtin.subversion:
    repo: svn+ssh://an.example.org/path/to/repo
    dest: /src/checkout
    checkout: no
    update: no
�#N)�
AnsibleModule)�get_best_parsable_locale)�LooseVersionc�d�eZdZdZd�Zd�Zdd�Zd�Zdd�Zdd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zy)�
Subversionz^\w+\s?:\s+\d+$c	�t�||_||_||_||_||_||_||_||_y)N)�module�dest�repo�revision�username�password�svn_path�validate_certs)	�selfr
rrrrrrrs	         �</usr/lib/python3/dist-packages/ansible/modules/subversion.py�__init__zSubversion.__init__�s;�������	���	� ��
� ��
� ��
� ��
�,���c��|jj|jddgd��\}}}t|�td�k\S)Nz	--version�--quietT��check_rcz1.10.0)r
�run_commandrr	)r�rc�version�errs    r�has_option_password_from_stdinz)Subversion.has_option_password_from_stdin�sD���;�;�2�2�D�M�M�;�PY�3Z�ei�2�j���G�S��G�$��X�(>�>�>rc�"�|jddg}|js|jd�d}|jr|j	d|jg�|j
rf|j
�r|jd�|j
}n8|jjd�|j	d|j
g�|j	|�|jj|||�	�\}}}|r|j�S|S)
zuExecute a subversion command, and return output. If check_rc is False, returns the return code instead of the output.z--non-interactivez--no-auth-cachez--trust-server-certNz
--usernamez--password-from-stdinz�The authentication provided will be used on the svn command line and is not secure. To securely pass credentials, upgrade svn to version 1.10.0 or greater.z
--password)�data)rr�appendr�extendrr!r
�warnr�
splitlines)r�argsr�bits�
stdin_datar�outr s        r�_execzSubversion._exec�s���
�M�M���
��
�"�"��K�K�-�.��
��=�=��K�K��t�}�}�5�6��=�=��2�2�4����3�4�!�]�]�
���� � �"k�l����\�4�=�=�9�:����D���{�{�.�.�t�X�J�.�O���C����>�>�#�#��Irc�J�|jd|jgd��}|dk(S)zChecks if path is a SVN Repo.�infoFrr)r,r)rrs  r�is_svn_repozSubversion.is_svn_repo�s&��
�Z�Z�����+�e�Z�
<���Q�w�rc��dg}|r|jd�|jd|j|j|jg�|j|�y)z?Creates new svn working directory if it does not already exist.�checkout�--force�-rN�r$r%rrrr,�r�force�cmds   rr1zSubversion.checkout�sD���l����J�J�y�!��
�
�D�$�-�-����D�I�I�>�?��
�
�3�rc��dg}|r|jd�|jd|j|j|jg�|j|�y)zExport svn repo to directory�exportr2r3Nr4r5s   rr9zSubversion.export�sD���j����J�J�y�!��
�
�D�$�-�-����D�I�I�>�?��
�
�3�rc��|jdd|j|j|jg�}|D]}t	j
d|�s�yy)z Change working directory's repo.�switchz
--revision�^[ABDUCGE]\sTF)r,rrr�re�search�r�output�lines   rr;zSubversion.switch�sN�����X�|�T�]�]�D�I�I�t�y�y�Y�Z���	�D��y�y��$�/��	�rc��|jdd|j|jg�}|D]}tjd|�s�yy)z&Update existing svn working directory.�updater3r<TF)r,rrr=r>r?s   rrCzSubversion.update�sF�����X�t�T�]�]�D�I�I�F�G���	�D��y�y��$�/��	�rc�~�|jdd|jg�}|D]}tjd|���yy)zRevert svn working directory.�revertz-Rz
^Reverted TF)r,rr=r>r?s   rrEzSubversion.revert�sC�����X�t�T�Y�Y�7�8���	�D��y�y���-�5��	�rc�h�dj|jd|jg��}tj|j
|tj�}|r|jd�}nd}tjd|tj�}|r|jd�}||fSd}||fS)�1Revision and URL of subversion working directory.�
r.r�Unable to get revisionz^URL\s?:.*$zUnable to get URL)�joinr,rr=r>�REVISION_RE�	MULTILINE�group)r�text�rev�urls    r�get_revisionzSubversion.get_revision�s����y�y����V�T�Y�Y�$7�8�9���i�i��(�(�$����=����)�)�A�,�C�*�C��i�i���b�l�l�;����)�)�A�,�C��C�x��&�C��C�x�rc���dj|jd|jg��}tj|j
|tj�}|r|jd�}|Sd}|S)rGrHr.rzUnable to get remote revision)rJr,rr=r>rKrLrM)rrNrOs   r�get_remote_revisionzSubversion.get_remote_revisionsa���y�y����V�T�Y�Y�$7�8�9���i�i��(�(�$����=����)�)�A�,�C��
�2�C��
rc��|jddd|jg�}tjd�}t	tt
|j|���dkDS)zUTrue if revisioned files have been added or modified. Unrevisioned files are ignored.�statusrz--ignore-externalsz^[^?X]r)r,rr=�compile�len�list�filter�match)r�lines�regexs   r�has_local_modszSubversion.has_local_modssN���
�
�H�i�1E�t�y�y�Q�R���
�
�9�%���4��u�{�{�E�2�3�4�q�8�8rc���|j�\}}dj|jdd|j|jg��}tj|j|t
j�}|r|jd�}nd}t|jd�dj��}t|jd�dj��}d}||krd	}|||fS)
NrHr.r3rrI�:�FT)
rQrJr,rrr=r>rKrLrM�int�split�strip)r�currrP�out2�head�rev1�rev2�changes        r�needs_updatezSubversion.needs_updates����%�%�'�	��c��y�y����V�T�4�=�=�$�)�)�$L�M�N���y�y��)�)�4����>����:�:�a�=�D�+�D��4�:�:�c�?�1�%�+�+�-�.���4�:�:�c�?�1�%�+�+�-�.�����$�;��F��t�T�!�!rN)T)F)�__name__�
__module__�__qualname__rKrr!r,r/r1r9r;rCrErQrSr]rj�rrrr�sJ��%�K�-�?��8�
������"�9�
"rrc��tttd��tddddg��tddd	d
g��tdd
��td��tdd��td��tdd
��tdd��tdd��tdd��tdd
��tdd
����
d��}|jd}|jd}|jd}|jd}|jd}|jd}|jdxs|jdd�}|jd}|jd}	|jd}
|jd}|jd}|jd}
t	|�}t||� �|_|s|
s|s|r|j
d!�"�t||||||||
�}|s%|s#|
s!|jd
|j��#�|stjj|�sgd}d
}|jr|jd�$�n|s|
s|jd
�$�|s|
r|j�d}�n]|j|�%�d}�nG|j!�r�|s|jd
�$�|jrL|j#�r|s|j
d&�"�|j%�\}}}|j|||�'�d
}|j'�}|j#�}|	r|j)�xs|}|r)|r|j+�xs|}n|j
d&�"�|j-�xs|}nS|r;d}|jd�%�d}|j#�}|r)|r'|j+�n|j
d(|�d)��"�|r|jd�$�y|j'�}xs}|j||�'�y)*N�path)�type�strT�name�
repository)rq�required�aliases�HEADrOr)rq�defaultrv�boolF)rqrx)rq�no_log)
rrrr6rr�
executabler9r1rCr;�in_placer)�
argument_spec�supports_check_moderrrr6rrr{�svnr9r;r1rCr|r)�LANG�LC_MESSAGESzXthe destination directory must be specified unless checkout=no, update=no, and export=no)�msg)�changed�after)r�)r6z.ERROR: modified files exist in the repository.)r��beforer�zERROR: z< folder already exists, but its not a subversion repository.)r�dict�params�get_bin_pathr�run_command_environ_update�	fail_jsonr�	exit_jsonrS�osrp�exists�
check_moder1r9r/r]rjrQr;rErC)r
rrrr6rrrr9r;r1rCr|r�localerr��
local_mods�
files_changed�checkr�r�s                      r�mainr�%s���
���6�"��5�4�&�,�9O�P��u�f�u�i�>P�Q��F�E�2��u�%��u�T�2���(��V�U�3��v�t�4��V�T�2��V�T�2��v�u�5��V�U�;�
�!�!�F�&�=�=�� �D��=�=�� �D��}�}�Z�(�H��M�M�'�"�E��}�}�Z�(�H��}�}�Z�(�H��}�}�\�*�N�f�.A�.A�%��.N�H�
�]�]�8�
$�F�
�]�]�8�
$�F��}�}�Z�(�H�
�]�]�8�
$�F��}�}�Z�(�H��]�]�#3�4�N�&�f�
-�F�(,�&�f�(M�F�%��X��6����w��x�
�V�T�4��8�X�x�Q_�
`�C��&������c�.E�.E�.G��H�
�R�W�W�^�^�D�)����
�������T��*������U��+��(��L�L�N� �M��J�J�U�J�#� �M�	���	�����U��+�����!�!�#�E�� � �%U� �V�#&�#3�#3�#5� �E�6�5����U�6���G��
��!�!�#���'�'�)�
���J�J�L�9�M�M��� #�
�
�� =�
�
�� � �%U� �V��
�
��5�
�
�	������4�� ��
��'�'�)�
��%��J�J�L����hl�n��o�
������&�� � �"���-�:�������u��Er�__main__)�
__future__rrrrq�
__metaclass__�
DOCUMENTATION�EXAMPLES�RETURNr�r=�ansible.module_utils.basicr�"ansible.module_utils.common.localer�#ansible.module_utils.compat.versionr	�objectrr�rkrnrr�<module>r�sd��A�@��
�d�
�L��(
��	�	�4�G�<�T"��T"�n`F�F�z���F�r

Youez - 2016 - github.com/yon3zu
LinuXploit