Anons79 Mini Shell

Directory : /proc/self/root/lib/python2.7/site-packages/ansible/modules/source_control/
Upload File :
Current File : //proc/self/root/lib/python2.7/site-packages/ansible/modules/source_control/subversion.pyc

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zdd
l	Z	dd
l
Z
ddlmZddl
mZd
efd��YZd�Zedkr�e�nd
S(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatustcoretsupported_bysa	
---
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) <[email protected]>
notes:
   - Requires I(svn) to be installed on the client.
   - This module does not handle externals.
options:
  repo:
    description:
      - The subversion URL to the repository.
    required: true
    aliases: [ name, repository ]
  dest:
    description:
      - Absolute path where the repository should be deployed.
    required: true
  revision:
    description:
      - Specific revision to checkout.
    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.
        Prior to 1.9 the default was C(yes).
    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.
  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.
  executable:
    description:
      - Path to svn executable to use. If not supplied,
        the normal mechanism for resolving binary paths will be used.
    version_added: "1.4"
  checkout:
    description:
     - If C(no), do not check out the repository if it does not exist locally.
    type: bool
    default: "yes"
    version_added: "2.3"
  update:
    description:
     - If C(no), do not retrieve new revisions from the origin repository.
    type: bool
    default: "yes"
    version_added: "2.3"
  export:
    description:
      - If C(yes), do export instead of checkout/update.
    type: bool
    default: "no"
    version_added: "1.6"
  switch:
    description:
      - If C(no), do not call svn switch before update.
    default: "yes"
    version_added: "2.0"
    type: bool
s�
- name: Checkout subversion repository to specified folder
  subversion:
    repo: svn+ssh://an.example.org/path/to/repo
    dest: /src/checkout

- name: Export subversion directory to folder
  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
- subversion:
    repo: svn+ssh://an.example.org/path/to/repo
    dest: /srv/checkout
    checkout: no
    update: no
N(tLooseVersion(t
AnsibleModulet
SubversioncB`s�eZd�Zd�Zed�Zd�Zed�Zed�Z	d�Z
d�Zd�Zd	�Z
d
�Zd�Zd�ZRS(
cC`sC||_||_||_||_||_||_||_dS(N(tmoduletdesttrepotrevisiontusernametpasswordtsvn_path(tselfRRR
RRRR((sM/usr/lib/python2.7/site-packages/ansible/modules/source_control/subversion.pyt__init__zs						cC`sC|jj|jddgdt�\}}}t|�td�kS(Ns	--versions--quiettcheck_rcs1.10.0(Rtrun_commandRtTrueR(Rtrctversionterr((sM/usr/lib/python2.7/site-packages/ansible/modules/source_control/subversion.pythas_option_password_from_stdin�s-cC`s�|jdddg}d	}|jr=|jd|jg�n|jr�|j�rk|jd�|j}q�|jjd�|jd|jg�n|j|�|jj	||d|�\}}}|r�|j
�S|Sd	S(
suExecute a subversion command, and return output. If check_rc is False, returns the return code instead of the output.s--non-interactives--trust-server-certs--no-auth-caches
--usernames--password-from-stdins�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.s
--passwordtdataN(RtNoneRtextendRRtappendRtwarnRt
splitlines(RtargsRtbitst
stdin_dataRtoutR((sM/usr/lib/python2.7/site-packages/ansible/modules/source_control/subversion.pyt_exec�s$			

$
cC`s(|jd|jgdt�}|dkS(sChecks if path is a SVN Repo.tinfoRi(R%RtFalse(RR((sM/usr/lib/python2.7/site-packages/ansible/modules/source_control/subversion.pytis_svn_repo�scC`sRdg}|r|jd�n|jd|j|j|jg�|j|�dS(s?Creates new svn working directory if it does not already exist.tcheckouts--forces-rN(RRRR
RR%(Rtforcetcmd((sM/usr/lib/python2.7/site-packages/ansible/modules/source_control/subversion.pyR)�s
	"cC`sRdg}|r|jd�n|jd|j|j|jg�|j|�dS(sExport svn repo to directorytexports--forces-rN(RRRR
RR%(RR*R+((sM/usr/lib/python2.7/site-packages/ansible/modules/source_control/subversion.pyR,�s
	"cC`sI|jd|j|jg�}x$|D]}tjd|�r%tSq%WtS(s Change working directory's repo.tswitchs^[ABDUCGE]\s(R%R
RtretsearchRR'(Rtoutputtline((sM/usr/lib/python2.7/site-packages/ansible/modules/source_control/subversion.pyR-�s

cC`sL|jdd|j|jg�}x$|D]}tjd|�r(tSq(WtS(s&Update existing svn working directory.tupdates-rs^[ABDUCGE]\s(R%RRR.R/RR'(RR0R1((sM/usr/lib/python2.7/site-packages/ansible/modules/source_control/subversion.pyR2�s
!
cC`sL|jdd|jg�}x*|D]"}tjd|�dkr"tSq"WtS(sRevert svn working directory.treverts-Rs
^Reverted N(R%RR.R/RRR'(RR0R1((sM/usr/lib/python2.7/site-packages/ansible/modules/source_control/subversion.pyR3�s

cC`smdj|jd|jg��}tjd|tj�jd�}tjd|tj�jd�}||fS(s1Revision and URL of subversion working directory.s
R&s
^Revision:.*$is^URL:.*$(tjoinR%RR.R/t	MULTILINEtgroup(Rttexttrevturl((sM/usr/lib/python2.7/site-packages/ansible/modules/source_control/subversion.pytget_revision�s!!!cC`sFdj|jd|jg��}tjd|tj�jd�}|S(s1Revision and URL of subversion working directory.s
R&s
^Revision:.*$i(R4R%R
R.R/R5R6(RR7R8((sM/usr/lib/python2.7/site-packages/ansible/modules/source_control/subversion.pytget_remote_revision�s!!cC`sO|jddd|jg�}tjd�}ttt|j|���dkS(sUTrue if revisioned files have been added or modified. Unrevisioned files are ignored.Rs--quiets--ignore-externalss^[^?X]i(R%RR.tcompiletlentlisttfiltertmatch(Rtlinestregex((sM/usr/lib/python2.7/site-packages/ansible/modules/source_control/subversion.pythas_local_mods�scC`s�|j�\}}dj|jddd|jg��}tjd|tj�jd�}t|j	d�dj
��}t|j	d�dj
��}t}||kr�t}n|||fS(	Ns
R&s-rtHEADs
^Revision:.*$it:i(
R:R4R%RR.R/R5R6tinttsplittstripR'R(RtcurrR9tout2theadtrev1trev2tchange((sM/usr/lib/python2.7/site-packages/ansible/modules/source_control/subversion.pytneeds_update�s'!	(t__name__t
__module__RRRR%R(R'R)R,R-R2R3R:R;RCRO(((sM/usr/lib/python2.7/site-packages/ansible/modules/source_control/subversion.pyR
ys						
							cC`s�tdtdtdd�dtdddtdd	d
g�dtdddd
dddg�dtdddt�dtdd�dtdddt�dtdd�dtdddt�dtdddt�dtdddt�dtdddt�dtdddt��dt�}|jd}|jd}|jd}|jd}|jd}|jd}|jdp�|jdt�}|jd}|jd}	|jd}
|jd}|jd}tdddd�|_|r|
s�|s�|r|jd d!�nt|||||||�}
|r^|r^|
r^|j	d"td#|
j
��n|swtjj
|�r�d}t}|jr�|j	d"t�n!|r�|
r�|j	d"t�n|r�|
r�|
j�t}qd|
jd|�t}nk|
j�r|s|j	d"t�n|jr�|
j�rM|rM|jd d$�n|
j�\}}}|j	d"|d%|d#|�nt}|
j�}|
j�}|	r�|
j�p�|}n|r�|r�|
j�p�|}q�|jd d$�n|
j�p�|}na|rMd}|
jdt�t}|
j�}|rd|rd|
j�qdn|jd d&|f�|r}|j	d"t�n4|
j�}|p�|}|j	d"|d%|d#|�dS('Nt
argument_specRttypetpathR
tstrtrequiredtaliasestnamet
repositoryRtdefaultRDR8RR*tboolRRtno_logt
executableR,R)R2R-tin_placetsupports_check_modetsvntLANGtCtLC_MESSAGEStmsgsXthe destination directory must be specified unless checkout=no, update=no, and export=notchangedtafters.ERROR: modified files exist in the repository.tbeforesEERROR: %s folder already exists, but its not a subversion repository.(R	tdictRR'tparamstget_bin_pathtrun_command_environ_updatet	fail_jsonR
t	exit_jsonR;tosRTtexistsRt
check_modeR)R,R(RCROR:R-R3R2(RRR
RR*RRRR,R-R)R2R^R`Rgt
local_modst
files_changedtcheckRfRe((sM/usr/lib/python2.7/site-packages/ansible/modules/source_control/subversion.pytmain�s�!!	










	

			t__main__(t
__future__RRRRSt
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLESRnR.tdistutils.versionRtansible.module_utils.basicR	tobjectR
RtRP(((sM/usr/lib/python2.7/site-packages/ansible/modules/source_control/subversion.pyt<module>s


O|	`

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]