HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/svn.cpython-310.pyc
o

�N�g�*�@s�dZddlZddlZddlZddlmZe�dej�Z	dd�Z
dd�Zdd
d�Zd dd
�Z
d dd�Zd dd�Zd dd�Zd!dd�Zd"dd�Zd dd�Zd dd�Z					d#dd�ZdS)$z
Subversion SCM
�N)�CommandExecutionErrorz^([^:]+):\s+(\S.*)$cCstjj�d�durdSdS)z'
    Only load if svn is installed
    �svnN)Fz;The svn execution module cannot be loaded: svn unavailable.T)�salt�utils�path�which�rr�D/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/svn.py�__virtual__sr
c
Ks�dd|g}t|�}|r|�d|g�|r|�d|g�|�|�td|fd||d�|��}|d}	|	d	kr:|d
St|ddd
�|���)a
    Execute svn
    return the output of the command

    cmd
        The command to run.

    cwd
        The path to the Subversion repository

    user
        Run svn as a user other than what the minion runs as

    username
        Connect to the Subversion server as another user

    password
        Connect to the Subversion server with this password

        .. versionadded:: 0.17.0

    opts
        Any additional options to add to the command line

    kwargs
        Additional options to pass to the run-cmd
    rz--non-interactivez
--usernamez
--passwordzcmd.run_allF)Zpython_shell�cwdZrunas�retcoder�stdout�stderr�

� )�list�extendZ__salt__r�join)
�cmdr�user�username�password�opts�kwargs�options�resultrrrr	�_run_svns$

���r�strc
Cs�t�}|dkr|�d�|r|tjj�|�7}td|||||�}|dvr&|Sg}|�d�D]
}	|�t�	|	��q-|dkr>|S|dkrIdd	�|D�Sd
S)a�
    Display the Subversion information from the checkout.

    cwd
        The path to the Subversion repository

    targets : None
        files, directories, and URLs to pass to the command as arguments
        svn uses '.' by default

    user : None
        Run svn as a user other than what the minion runs as

    username : None
        Connect to the Subversion server as another user

    password : None
        Connect to the Subversion server with this password

        .. versionadded:: 0.17.0

    fmt : str
        How to fmt the output from info.
        (str, xml, list, dict)

    CLI Example:

    .. code-block:: bash

        salt '*' svn.info /path/to/svn/repo
    �xmlz--xml�info)rrrr�dictcSsg|]}t|��qSr)r )�.0�tmprrr	�
<listcomp>yszinfo.<locals>.<listcomp>N)
r�appendrr�args�shlex_splitr�split�_INI_RE�findall)
r�targetsrrr�fmtr�infosZ	info_listZ	infosplitrrr	rHs  
�rcG�*||f7}|r||f7}td|||||�S)a�
    Download a working copy of the remote Subversion repository
    directory or file

    cwd
        The path to the Subversion repository

    remote : None
        URL to checkout

    target : None
        The name to give the file or directory working copy
        Default: svn uses the remote basename

    user : None
        Run svn as a user other than what the minion runs as

    username : None
        Connect to the Subversion server as another user

    password : None
        Connect to the Subversion server with this password

        .. versionadded:: 0.17.0

    CLI Example:

    .. code-block:: bash

        salt '*' svn.checkout /path/to/repo svn://remote/repo
    �checkout�r�r�remote�targetrrrrrrr	r.|�
 
r.cGr-)a�
    .. versionadded:: 2014.1.0

    Switch a working copy of a remote Subversion repository
    directory

    cwd
        The path to the Subversion repository

    remote : None
        URL to switch

    target : None
        The name to give the file or directory working copy
        Default: svn uses the remote basename

    user : None
        Run svn as a user other than what the minion runs as

    username : None
        Connect to the Subversion server as another user

    password : None
        Connect to the Subversion server with this password

    CLI Example:

    .. code-block:: bash

        salt '*' svn.switch /path/to/repo svn://remote/repo
    �switchr/r0rrr	r4�r3r4cG�,|r
|ttjj�|��7}td|||||�S)ax
    Update the current directory, files, or directories from
    the remote Subversion repository

    cwd
        The path to the Subversion repository

    targets : None
        files and directories to pass to the command as arguments
        Default: svn uses '.'

    user : None
        Run svn as a user other than what the minion runs as

    password : None
        Connect to the Subversion server with this password

        .. versionadded:: 0.17.0

    username : None
        Connect to the Subversion server as another user

    CLI Example:

    .. code-block:: bash

        salt '*' svn.update /path/to/repo
    �update��tuplerrr%r&r�rr*rrrrrrr	r6��r6cGr5)a�
    Return the diff of the current directory, files, or directories from
    the remote Subversion repository

    cwd
        The path to the Subversion repository

    targets : None
        files and directories to pass to the command as arguments
        Default: svn uses '.'

    user : None
        Run svn as a user other than what the minion runs as

    username : None
        Connect to the Subversion server as another user

    password : None
        Connect to the Subversion server with this password

        .. versionadded:: 0.17.0

    CLI Example:

    .. code-block:: bash

        salt '*' svn.diff /path/to/repo
    �diffr7r9rrr	r;�r:r;cG�<|r|d|f7}|r|ttjj�|��7}td|||||�S)a�
    Commit the current directory, files, or directories to
    the remote Subversion repository

    cwd
        The path to the Subversion repository

    targets : None
        files and directories to pass to the command as arguments
        Default: svn uses '.'

    msg : None
        Message to attach to the commit log

    user : None
        Run svn as a user other than what the minion runs as

    username : None
        Connect to the Subversion server as another user

    password : None
        Connect to the Subversion server with this password

        .. versionadded:: 0.17.0

    CLI Example:

    .. code-block:: bash

        salt '*' svn.commit /path/to/repo
    �-m�commitr7�rr*�msgrrrrrrr	r>s
 r>cGr5)aK
    Add files to be tracked by the Subversion working-copy checkout

    cwd
        The path to the Subversion repository

    targets : None
        files and directories to pass to the command as arguments

    user : None
        Run svn as a user other than what the minion runs as

    username : None
        Connect to the Subversion server as another user

    password : None
        Connect to the Subversion server with this password

        .. versionadded:: 0.17.0

    CLI Example:

    .. code-block:: bash

        salt '*' svn.add /path/to/repo /path/to/new/file
    �addr7r9rrr	rA3srAcGr<)a�
    Remove files and directories from the Subversion repository

    cwd
        The path to the Subversion repository

    targets : None
        files, directories, and URLs to pass to the command as arguments

    msg : None
        Message to attach to the commit log

    user : None
        Run svn as a user other than what the minion runs as

    username : None
        Connect to the Subversion server as another user

    password : None
        Connect to the Subversion server with this password

        .. versionadded:: 0.17.0

    CLI Example:

    .. code-block:: bash

        salt '*' svn.remove /path/to/repo /path/to/repo/remove
    r=�remover7r?rrr	rBSs
rBcGr5)a�
    Display the status of the current directory, files, or
    directories in the Subversion repository

    cwd
        The path to the Subversion repository

    targets : None
        files, directories, and URLs to pass to the command as arguments
        Default: svn uses '.'

    user : None
        Run svn as a user other than what the minion runs as

    username : None
        Connect to the Subversion server as another user

    password : None
        Connect to the Subversion server with this password

        .. versionadded:: 0.17.0

    CLI Example:

    .. code-block:: bash

        salt '*' svn.status /path/to/repo
    �statusr7r9rrr	rCxr:rC�HEADc	Gs>||f7}|r||f7}d}||t|�f7}td|||||�S)a�
    Create an unversioned copy of a tree.

    cwd
        The path to the Subversion repository

    remote : None
        URL and path to file or directory checkout

    target : None
        The name to give the file or directory working copy
        Default: svn uses the remote basename

    user : None
        Run svn as a user other than what the minion runs as

    username : None
        Connect to the Subversion server as another user

    password : None
        Connect to the Subversion server with this password

        .. versionadded:: 0.17.0

    CLI Example:

    .. code-block:: bash

        salt '*' svn.export /path/to/repo svn://remote/repo
    z-r�export)rr)	rr1r2rrr�revisionrZ
revision_argsrrr	rE�s
(
�rE)NNNNr)NNNN)NNNNN)NNN)NNNNrD)�__doc__�reZsalt.utils.argsrZsalt.utils.pathZsalt.exceptionsr�compile�Mr(r
rrr.r4r6r;r>rArBrCrErrrr	�<module>s.

0
4
&
&
"
"
'
 
%%�