403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /lib64/python3.9/site-packages/hgext/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib64/python3.9/site-packages/hgext/__pycache__/keyword.cpython-39.pyc
a

�+�bw�	@s�dZddlmZddlZddlZddlZddlmZddlm	Z	ddl
mZddlm
Z
mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZddlmZm Z dd	l!m"Z"iZ#e�$e#�Z$d
Z%dZ&dZ'd
Z(dZ)dddddd�Z*e�+�Z+iZ,e�-e,�Z-e-dddd�e+dej.d�dd��Z/e+dej.d�dd��Z0e+d ej.d�d!d"��Z1d#d$iZ2d%d&�Z3d'd(�Z4d)d*�Z5Gd+d,�d,e6�Z7Gd-d.�d.ej�Z8d/d0�Z9d1d2�Z:e$d3d4d5ded6�fd7d8d$ed9�ed:�fged;�d<d=�d>d?��Z;e$d@e
j<edA�d<dB�dCdD��Z=e$dEdFdGdedH�fdIdJdedK�fdLdMdedN�fge
j<edO�d<dB�dPdQ��Z>e$dRe
j<edS�d<dB�dTdU��Z?dhdVdW�Z@dXdY�ZAdZd[�ZBd\d]�ZCdid^d_�ZDd`da�ZEdbdc�ZFddde�ZGdfdg�ZHdS)jaCexpand keywords in tracked files

This extension expands RCS/CVS-like or self-customized $Keywords$ in
tracked text files selected by your configuration.

Keywords are only expanded in local repositories and not stored in the
change history. The mechanism can be regarded as a convenience for the
current user or for archive distribution.

Keywords expand to the changeset data pertaining to the latest change
relative to the working directory parent of each file.

Configuration is done in the [keyword], [keywordset] and [keywordmaps]
sections of hgrc files.

Example::

    [keyword]
    # expand keywords in every python file except those matching "x*"
    **.py =
    x*    = ignore

    [keywordset]
    # prefer svn- over cvs-like default keywordmaps
    svn = True

.. note::

   The more specific you are in your filename patterns the less you
   lose speed in huge repositories.

For [keywordmaps] template mapping and expansion demonstration and
control run :hg:`kwdemo`. See :hg:`help templates` for a list of
available templates and filters.

Three additional date template filters are provided:

:``utcdate``:    "2006/09/18 15:13:13"
:``svnutcdate``: "2006-09-18 15:13:13Z"
:``svnisodate``: "2006-09-18 08:13:13 -700 (Mon, 18 Sep 2006)"

The default template mappings (view with :hg:`kwdemo -d`) can be
replaced with customized keywords and templates. Again, run
:hg:`kwdemo` to control the results of your configuration changes.

Before changing/disabling active keywords, you must run :hg:`kwshrink`
to avoid storing expanded keywords in the change history.

To force expansion after enabling it, or a configuration change, run
:hg:`kwexpand`.

Expansions spanning more than one line and incremental expansions,
like CVS' $Log$, are not supported. A keyword template map "Log =
{desc}" expands to the first line of the changeset description.
�)�absolute_importN)�_)�getattr)�webcommands)�cmdutil�context�dispatch�error�
extensions�filelog�	localrepo�
logcmdutil�match�patch�pathutil�pycompat�	registrar�scmutil�templatefilters�templateutil�util)�dateutil�
stringutil)�	timestampsships-with-hg-coresgadd addremove annotate bundle export grep incoming init log outgoing push tip verify convert email glogs/annotate changeset rev filediff diff comparisonsfmerge kwexpand kwshrink record qrecord resolve transplant unshelve rebase graft backout histedit fetchsrecords
green boldscyan bold underlinesgreensboldsnone)skwfiles.enabledskwfiles.deletedskwfiles.enabledunknownskwfiles.ignoredskwfiles.ignoredunknown�
keywordset�svnF)�defaultsutcdate)ZintypecCsd}t�|ddf|�S)z?Date. Returns a UTC-date in this format: "2009/08/18 11:00:13".s%Y/%m/%d %H:%M:%Sr�rZdatestr��dateZ
dateformat�r �3/usr/lib64/python3.9/site-packages/hgext/keyword.py�utcdate�sr"s
svnisodatecCst�|d�S)z]Date. Returns a date in this format: "2009-08-18 13:00:13
    +0200 (Tue, 18 Aug 2009)".
    s%%Y-%m-%d %H:%M:%S %1%2 (%a, %d %b %Y)r)rr r r!�
svnisodate�sr#s
svnutcdatecCsd}t�|ddf|�S)zIDate. Returns a UTC-date in this format: "2009-08-18
    11:00:13Z".
    s%Y-%m-%d %H:%M:%SZrrrr r r!�
svnutcdate�sr$�hgcmd�cCsFddd�}ddddddd	�d
dddd
d�f}|�||�d
d��|S)zBReturns default keywordmaps according to keywordset configuration.s{node|short}s
{author|user})sRevisionsAuthors{date|utcdate}s{file|basename},vs{root}/{file},vs;{file|basename},v {node|short} {date|utcdate} {author|user}s9{root}/{file},v {node|short} {date|utcdate} {author|user})�DatesRCSfilesRCSFilesSource�IdsHeaders{date|svnisodate}s>{file|basename},v {node|short} {date|svnutcdate} {author|user})r'r(sLastChangedRevisions
LastChangedBysLastChangedDaterr)�update�
configbool)�ui�	templatesZkwsetsr r r!�_defaultkwmaps�s&��
��r-cCs
|d|�S)zlHelper for keyword expansion removal in text.
    Depending on subfunc also returns number of substitutions.s$\1$r )�text�subfuncr r r!�_shrinktext�sr0cs0�fdd�|jD�}�fdd�|jD�}||fS)z�Retrieves modified and added files from a working directory state
    and returns the subset of each contained in given changed files
    retrieved from a change context.csg|]}|�vr|�qSr r ��.0�f��changedr r!�
<listcomp>�r&z_preselect.<locals>.<listcomp>csg|]}|�vr|�qSr r r1r4r r!r6�r&)�modified�added)�wstatusr5r7r8r r4r!�
_preselect�sr:c@s�eZdZdZdd�Zedd��Zejdd��Z	ejdd	��Z
ejd
d��Zdd
�Zdd�Z
dd�Zdd�Zddd�Zdd�Zdd�Zdd�ZdS)�kwtemplaterzr
    Sets up keyword templates, corresponding keyword regex, and
    provides keyword substitution functions.
    cCsl||_t�|�|_t�|jdg||�|_tdt��v|_	d|_
|j�d�}|r\t|�|_
nt|j�|_
dS)Nr&r%F�keywordmaps)r+�weakref�ref�_repor�root�kwtools�
restricted�split�restrict�
postcommit�configitems�dictr,r-)�selfr+�repo�inc�exc�kwmapsr r r!�__init__�szkwtemplater.__init__cCs|��S�N)r?�rHr r r!rIszkwtemplater.repocCsd�ttj|j����S)z+Returns bar-separated and escaped keywords.�|)�join�maprZreescaper,�keysrOr r r!�escapeszkwtemplater.escapecCst�d|j�S)z&Returns regex for unexpanded keywords.s\$(%s)\$��re�compilerTrOr r r!�rekwszkwtemplater.rekwcCst�d|j�S)z$Returns regex for expanded keywords.s\$(%s): [^$\n\r]*? \$rUrOr r r!�rekwexpszkwtemplater.rekwexpcs���fdd�}|||�S)z1Replaces keywords in data with expanded template.cs\|�d�}t��j�j�j|�}�j��|j��jj�d�t	�
�j���}d||fS)N�)r@�files	$%s: %s $)�groupr
Z
maketemplaterr+rIr,Z
pushbufferZshowr@r�	firstlineZ	popbuffer)Zmobj�kwZctZekw��ctx�pathrHr r!�kwsubs
�
z%kwtemplater.substitute.<locals>.kwsubr )rH�datarar`r/rbr r_r!�
substitutes
zkwtemplater.substitutecCs|jj||d���S)z4Similar to filelog.linkrev, but returns a changectx.)�fileid)rI�filectx�	changectx)rHrarer r r!�linkctx%szkwtemplater.linkctxcCs>|js:|�|�r:t�|�s:|�||�}|�||||jj�S|S)z$Returns data with keywords expanded.)rDrr�binaryrhrdrX�sub)rHra�nodercr`r r r!�expand)s���zkwtemplater.expandcs��fdd�|D�S)zkReturns subset of candidates which are configured for keyword
        expansion but are not symbolic links.cs(g|] }��|�rd��|�vr|�qS��l)r�flagsr1�r`rHr r!r67r&z(kwtemplater.iskwfile.<locals>.<listcomp>r )rHZcandr`r rpr!�iskwfile4szkwtemplater.iskwfileFcCs|js|s|jr|�||�}|s$dS|jo,|}|js<|rD|rD|��}|jsN|rV|j}n|j}|rjtd�}	ntd�}	|jd}
|D�]z}|jr�|j�|��	||�}n|j�
|�}t�|�r�q�|�rD|�
�}
|r�|�|||�}nL|j�r,t|
�dk�r,|
D]0}||vr�||�||�s�||��}�q,q�|�||||j�\}}n$|j�rX|�|�}nt||j�\}}|r�|j�|	|�|jj|ddd�}|�|�|��|�r�|
|��}|j}|j}t�|�}|||f}|jj �!||�q�|jr�|jj j"|dd�q�dS)	z7Overwrites selected files expanding/shrinking keywords.Ns"overwriting %s expanding keywords
s"overwriting %s shrinking keywords
rZswbT)Z
atomictemp)Z
p1_tracked)#rDrErqZmanifestrXrYrrIr[�read�wreadrri�parentsrh�len�cmprgrd�subn�searchr0r+�note�wvfs�write�close�lstat�st_mode�st_sizerZmtime_of�dirstateZ	set_cleanZupdate_file_p1)rHr`�
candidates�lookuprlrXZkwcmdZmfZre_kw�msg�wctxr3rcrt�p�found�fp�s�mode�size�mtimeZ
cache_datar r r!�	overwrite9s^








zkwtemplater.overwritecCs&|�|�r"t�|�s"t||jj�S|S)z4Returns text with all keyword substitutions removed.)rrrir0rYrj)rH�fnamer.r r r!�shrinkrszkwtemplater.shrinkcCs6|�|�r2d�|�}t�|�s2t||jj��d�S|S)z1Returns lines with keyword substitutions removed.r&T)rrQrrir0rYrj�
splitlines)rHr��linesr.r r r!�shrinklinesxs



zkwtemplater.shrinklinescCs|jr|�||�S|S)z]If in restricted mode returns data read from wdir with
        keyword substitutions removed.)rDr�)rHr�rcr r r!rs�szkwtemplater.wreadN)F)�__name__�
__module__�__qualname__�__doc__rM�propertyrIrZ
propertycacherTrXrYrdrhrlrqr�r�r�rsr r r r!r;�s$





9r;csFeZdZdZ�fdd�Z�fdd�Zd�fdd�	Z�fd	d
�Z�ZS)�	kwfilelogz�
    Subclass of filelog to hook into its read, add, cmp methods.
    Keywords are "stored" unexpanded, and processed on reading.
    cs"tt|��||�||_||_dSrN)�superr�rM�kwtra)rH�openerr�ra��	__class__r r!rM�szkwfilelog.__init__cs0tt|��|�}|�|�r|S|j�|j||�S)z&Expands keywords when reading filelog.)r�r�rrZrenamedr�rlra)rHrkrcr�r r!rr�s
zkwfilelog.readNcs*|j�|j|�}tt|��||||||�S)z5Removes keyword substitutions when adding to filelog.)r�r�rar�r��add)rHr.�meta�tr�linkZp1Zp2r�r r!r��sz
kwfilelog.addcs"|j�|j|�}tt|��||�S)z-Removes keyword substitutions for comparison.)r�r�rar�r�rv)rHrkr.r�r r!rv�sz
kwfilelog.cmp)NN)	r�r�r�r�rMrrr�rv�
__classcell__r r r�r!r��s
r�cOsb|r8t�|�}|jt�|||�d|�d�p2|�d�d�S|�d�rPt�t	d���t�t	d���dS)	z\Bails out if [keyword] configuration is not active.
    Returns status of working directory.T�unknown�all)r�clean�unknown�keywords[keyword] patterns cannot matchs no [keyword] patterns configuredN)
r�byteskwargs�statusrr�getrFr	�Abortr)r+rIr�r��pats�optsr r r!�_status�s
�
r�cOs�|d}t|���dkr&t�td���t|dd�}|���dt||||g|�Ri|��}|jsp|j	sp|j
sp|jr~t�td���|�||j
d|�Wd�n1s�0YdS)z7Selects files and passes them to kwtemplater.overwrite.NrZsoutstanding uncommitted merge�_keywordkwtsoutstanding uncommitted changesT)rurtr	r�rr�wlockr�r7r8Zremoved�deletedr�r�)r+rIrlr�r�r�r�r�r r r!�	_kwfwrite�s
r�skwdemo�dsdefaults"show default keyword template maps�f�rcfilesread maps from rcfilesFILEs+hg kwdemo [-d] [-f RCFILE] [TEMPLATEMAP]...T)ZoptionalrepocsN�fdd�}d}t�dd�}��td�|�|dur<�}n|j}tj||dd	�}��d
|dd
���dd�}��dd|d
���	d
�}	|s�|�
d��rH��td��|	r���td��|�
d�s�|	s�|rڈ�td��n��td��|�
d��r��|�
d��|�r8dd�
|�}
|j�d|
���|j�
d��t��	d
��}n�|�
d��r�|�rj��td��n��td��t��}|	�r��td��t�|�D]\}}
��d
||
d
��q�n&��td��|	�r�t|	�}nt��}t��t�|���d�|d
��	d
��|d��	d��|d
t�|��dd�
t|����d}|j�||�|d�|g���td �|���|�|���|j�d!�Wd�n1�s�0Y��	d"�D]8\}}|�d#d$�d%�d&�d'k�r�|j�d"|dd
��q�td(�}��d)|�|j |d*���td+����|�!|��|j�"|j#�dS),a�print [keywordmaps] configuration and an expansion example

    Show current, custom, or default keyword template maps and their
    expansions.

    Extend the current configuration by specifying maps as arguments
    and using -f/--rcfile to source an external hgrc file.

    Use -d/--default to disable current configuration.

    See :hg:`help templates` for information on templates and filters.
    csJ��d|�t|�D].\}}t|t�r2t�|�}��d||f�qdS)Ns[%s]
s%s = %s
)r{�sorted�
isinstance�boolrZpprint)�section�items�k�v�r+r r!�	demoitems�s


zdemo.<locals>.demoitemssdemo.txtr&skwdemo.s$creating temporary repository at %s
NT)Zcreater�rrr<Zrcfiles3
	configuration using custom keyword template maps
s!	extending current template maps
rs#	overriding default svn keywordset
s#	overriding default cvs keywordset
r�s[keywordmaps]
%s
�
shgrcs-
	configuration using default svn keywordset
s-
	configuration using default cvs keywordset
s!	disabling current template maps
s4
	configuration using current keyword template maps
s[extensions]
keyword =
�$s$
$s$
s
keywords written to %s:
s
demobranchshooks�.rZrscommit���s.hg keyword configuration and expansion exampleshg ci -m '%s'
)r.s
	keywords expanded
)$rZmkdtempryr�baseuir�instanceZ	setconfigr*rFr�r�Z
readconfigrQZvfsr{rGr-Z	iteritems�uisetup�	reposetupZwritenoi18nr�rSrzr�r�r�Z	setbranchrC�findr+�commitrs�rmtreer@)r+rI�argsr�r��fnZtmpdirr��svnZuikwmapsZrcmapsrLr�r��keywords�name�cmdr�r r�r!�demo�s|





,r�skwexpands!hg kwexpand [OPTION]... [FILE]...)Z	inferrepocOst||dg|�Ri|��dS)z�expand keywords in the working directory

    Run after (re)enabling keyword expansion.

    kwexpand refuses to run if given files contain local changes.
    TN�r��r+rIr�r�r r r!rl'srl�kwfiles�Ar�s&show keyword status flags of all files�i�ignores"show files excluded from expansion�ur�s%only show unknown (not tracked) filess hg kwfiles [OPTION]... [FILE]...c	s�t|dd�}|d}t||||g|�Ri|��}|r>|��}nd}g}t�|�}|�d�rd|�d�rzt|j|j|j	�}|�
||��|�
|j|�}	|�
|j|��|�d�r�|�d�rˆ|	�f}
n
gggf}
|�d�s�|�d��r|
�fdd�|D��fd	d�|jD�f7}
d
�
�}t|t�d�|
�}|�d|�}
d
}|�d��sJ|j�rNd}|D]T\}}}d|}|D]:}|
��|
j||d�|
j|||�||�f|d��qh�qR|
��dS)ashow files configured for keyword expansion

    List which files in the working directory are matched by the
    [keyword] configuration patterns.

    Useful to prevent inadvertent keyword expansion and to speed up
    execution by including only files that are actual candidates for
    expansion.

    See :hg:`help keyword` on how to construct patterns both for
    inclusion and exclusion of files.

    With -A/--all and -v/--verbose the codes used to show the status
    of files are::

      K = keyword expansion candidate
      k = keyword expansion candidate (not tracked)
      I = ignored
      i = ignored (not tracked)
    r�Nr&r�r�r�csg|]}|�vr|�qSr r r1)�kwfilesr r!r6lr&zfiles.<locals>.<listcomp>csg|]}|�vr|�qSr r r1)�	kwunknownr r!r6mr&s5enabled deleted enabledunknown ignored ignoredunknownsK!kIir�s%.0s%s
s%s %s
skwfiles.)Zkwstatusra)�label)rr��getcwdrr�r�r�r7r8r�rqr�r�rC�zipZbytestr�	formatter�verboseZ	startitemrcZplainZpathto�end)r+rIr�r�r�r�r��cwd�filesZ	kwdeletedZ	showfilesZkwlabelsZkwstatesZfmZfmtZkwstate�char�	filenamesr�r3r )r�r�r!r�8sD 


�&r�skwshrinks!hg kwshrink [OPTION]... [FILE]...cOst||dg|�Ri|��dS)z�revert expanded keywords in the working directory

    Must be run before changing/disabling active keywords.

    kwshrink refuses to run if given files contain local changes.
    FNr�r�r r r!r�~sr�cCs@|||||||�tt|dd�dd�}|r<|�|j|j�|_dS)ztMonkeypatch/wrap patch.patchfile.__init__ to avoid
    rejects or conflicts due to expanded keywords in working dir.rINr�)rr�r�r�)�origrHr+ZgpZbackend�storeZeolmoder�r r r!�kwpatchfile_init�sr�cos^t|dd�}|r|j}d|_z0||g|�Ri|��D]
}|Vq4W|rZ||_n|rX||_0dS)z*Monkeypatch patch.diff to avoid expansion.r�NT)rrD)r�rIr��kwargsr�rD�chunkr r r!�kwdiff�s
�r�ccsTt|jdd�}|r |j}tj|_z"||�D]
}|Vq*W|rP||_n|rN||_0dS)z2Wraps webcommands.x turning off keyword expansion.r�N)rrIrr�never)r�Zwebr�Z	origmatchr�r r r!�
kwweb_skip�s
�r�c
	Cs�t|dd�}|dur&|||||||�S|����|j���nd|_|||||||�}||��kr�||}	d|_|�|	|	��dd�d|_|Wd�Wd�S1s�0YWd�n1s�0YdS)z3Wraps cmdutil.amend expanding keywords after amend.r�NTF)	rr�r��parentchangerErkrDr�r�)
r�r+rI�oldZextrar�r�r�Znewidr`r r r!�kw_amend�sr�cs�t�dd���dur$||�|||�S�����||�|||�|�d�rXWd�dS�d���������fdd����fdd��j��D�}���|dd�Wd�n1s�0YdS)	a�Wraps cmdutil.copy so that copy/rename destinations do not
    contain expanded keywords.
    Note that the source of a regular file destination may also be a
    symlink:
    hg cp sym x                -> x is symlink
    cp sym x; hg cp -A sym x   -> x is file (maybe expanded keywords)
    For the latter we have to follow the symlink to find out whether its
    target is configured for expansion and we therefore must unexpand the
    keywords in the destination.r�Nsdry_runcs<�j�|�}d��|�vr2t��j�tj�|��}��	|�S)z�Returns true if dest is a regular file and configured for
            expansion or a symlink which points to a file configured for
            expansion.rn)
r�ZcopiedrorZ	canonpathr@�osra�realpathr)�dest�source)r�r�rIr�r r!�haskwsource�s�zkw_copy.<locals>.haskwsourcecs&g|]}d��|�vr�|�r|�qSrm)ror1)r�r�r r!r6�s�zkw_copy.<locals>.<listcomp>F)rr�r�r�r�Zcopiesr�)r�r+rIr�r��renamer�r )r�r�r�rIr�r!�kw_copy�s


�r�c
	Os
t|dd�}|dur.||||g|�Ri|��S|����d|_|d}|��}||||g|�Ri|��}	|d}
||
kr�t||
���\}}d|_|j���2|�	|
|dd�|�	|
|ddd�Wd�n1s�0Yd|_|	Wd�S1�s�0YdS)z9Wraps record.dorecord expanding keywords after recording.r�NTr�F)
rr�rEr�r:r�rDr�r�r�)
r�r+rIZ
commitfuncr�r�r�r`r9�retZrecctxr7r8r r r!�kw_dorecord�s"
0r�cCs�|jr|�|�St|jdd�}|dur0|||�S|jdurp|jjs�|�|���r\d|��vs�|�	�d|�	�ks�|�	�|�	�kr�|j
�|j|���SdS)Nr�rn�T)Z
_customcmprvrr?Z	_filenodeZ_encodefilterpatsrraror�Z_filelogrc)r�rHZfctxr�r r r!�
kwfilectx_cmps&

���
���
r�cCs�dd�}t�td|�t�tjdt�t�tjdt�t�tdt	�t�t
dt�t�t
dt�t�t
d	t
�t��D]}t�t|t�qvd
S)a Monkeypatches dispatch._parse to retrieve user command.
    Overrides file method to return kwfilelog instead of filelog
    if file matches user configuration.
    Wraps commit to overwrite configured files with updated
    keyword substitutions.
    Monkeypatches patch and webcommands.cSs*|||�\}}}}}|td<|||||fS)z9Monkeypatch dispatch._parse to obtain running hg command.r%)rA)r�r+r�r��func�optionsZ
cmdoptionsr r r!�kwdispatch_parse$sz!uisetup.<locals>.kwdispatch_parses_parsescmps__init__sdiffsamendscopysdorecordN)r
Zwrapfunctionrrrfr�rZ	patchfiler�r�rr�r�r��nokwwebcommandsrCrr�)r+r��cr r r!r�sr�cs�z>|��r6tdt��vs6dt�|j�vs6|j�d�r<WdSWnt	yPYn0gdg}}|�
d�D]&\}}|dkr�|�|�qh|�|�qh|s�dSt||||��G��fdd	�d	|j
���|_
�|_dS)
z0Sets up repo as kwrepo for keyword substitution.r%s.hgsbundle:Ns.hg*r�r�cs^eZdZ�fdd�Z���fdd�Z��fdd�Zd
���fd	d
�	Zd���fdd�	Z�ZS)zreposetup.<locals>.kwrepocs&|ddkr|dd�}t|j�|�S)Nr�/rZ)r�Zsvfs)rHr3)r�r r!r[Pszreposetup.<locals>.kwrepo.filecst�|��|�}��||�SrN)r�rs)rH�filenamerc�r��kwrepor�r r!rsUszreposetup.<locals>.kwrepo.wreadcs0|j|_zt�|�j|i|��W|`S|`0dSrN)�kwcommitctx�	commitctxr�r�)rHr�r�)r�rr r!r�Ys�z reposetup.<locals>.kwrepo.commitFNcsTt�|��|||�}�jsP�j}d�_��||t|��|���dd�|�_|S)NTF)r�rrErDr�r�r8r7)rHr`r	Zorigctx�nrDrr r!rbs�z%reposetup.<locals>.kwrepo.kwcommitctxc		s�|�����j}z�|s"|d��}t�|��||�}|sx|d}t|��|�\}}d�_��||dd���||dd�|W|�_Wd�S|�_0Wd�n1s�0YdS)Nr�FT)r�rDr�r��rollbackr:r�r�)	rHZdryrun�forceZorigrestrictr5r�r`r7r8rr r!rns 
�z"reposetup.<locals>.kwrepo.rollback)FN)FF)	r�r�r�r[rsr�rrr�r �rr�r�r!rOs
	r)�localrA�nokwcommandsrCrZ	splitpathr@Z_url�
startswith�AttributeErrorrF�appendr;r�r�)r+rIrJrK�pat�optr rr!r�6s.���
�
0r�)N)F)Ir�Z
__future__rr�rVr=Zmercurial.i18nrZmercurial.pycompatrZmercurial.hgwebrZ	mercurialrrrr	r
rrr
rrrrrrrrrZmercurial.utilsrrZmercurial.dirstateutilsrZcmdtableZcommandZ
testedwithr	r�rBZrecordextensionsZ
colortableZtemplatefilterZconfigtableZ
configitemrr"r#r$rAr-r0r:�objectr;r�r�r�r�Zwalkoptsrlr�r�r�r�r�r�r�r�r�r�r�r r r r!�<module>s�9L
���
�


		
��	
]�
���
;�



'

Youez - 2016 - github.com/yon3zu
LinuXploit