HEX
Server: Apache
System: Linux p102.lithium.hosting 4.18.0-553.141.1.el8_10.x86_64 #1 SMP Fri Jul 10 17:48:02 UTC 2026 x86_64
User: bvzmoamr (9955)
PHP: 8.1.34
Disabled: syslog
Upload Files
File: //proc/thread-self/root/lib64/python2.7/site-packages/hgext/shelve.pyo
�
1�3\c@@s�dZddlmZddlZddlZddlZddlZddlmZddl	m
Z
mZmZm
Z
mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z#ddl$m%Z%ddl&m'Z'm(Z(iZ)ej*e)�Z*d	Z+iZ,ej-e,�Z-e-d
ddd
�dZ.dZ/ddd
gZ0dZ1dZ2de3fd��YZ4de3fd��YZ5d�Z6d�Z7d�Z8d�Z9d�Z:d�Z;e<d�Z=d�Z>d�Z?d �Z@d!�ZAd"�ZBd#�ZCd$�ZDd%�ZEd&�ZFd'�ZGd(�ZHd)�ZId*�ZJd+�ZKd,�ZLd-�ZMd.�ZNd/�ZOd0�ZPd1�ZQd2�ZRd3�ZSd4�ZTd5�ZUd6�ZVd7�ZWe*d8d9d:ded;�fd<d=ded>�fd?d@dedA�fdBdCdDedE�edF�fdGdHdDedI�fdDdJdDedK�edL�fgedM�dNe*jY�dO��ZZdP�Z[e*d
dQdRdedS�fdTdUdedV�fdDdWdedX�fdDdJdDedY�edL�fdZd[ded\�fd]d^e<ed_�fd`dadedb�fdcdddDede�edf�fdBdCdDedg�edF�fdhddedi�fdjdkdedl�fdDdmdedn�fgej\edo�dNe*jY�dp��Z]dq�Z^dS(rs@save and restore changes to the working directory

The "hg shelve" command saves changes made to the working directory
and reverts those changes, resetting the working directory to a clean
state.

Later on, the "hg unshelve" command restores the changes saved by "hg
shelve". Changes can be restored even after updating to a different
parent, in which case Mercurial's merge machinery will resolve any
conflicts if necessary.

You can have more than one shelved change outstanding at a time; each
shelved change has a distinct name. For details, see the help for "hg
shelve".
i(tabsolute_importN(t_(t	bookmarkstbundle2t
bundlerepotchangegrouptcmdutilt	discoveryterrortexchangethgtlocktmdifftmerget
narrowspectnodetpatchtphasestpycompatt	registrartrepairtscmutilttemplatefilterstutiltvfsi(trebase(tdateutilt
stringutilsships-with-hg-coretshelvet
maxbackupstdefaulti
s
shelve-backuptshelvedR
Rsshelve@localhosttshelvedfilecB@s�eZdZdd�Zd�Zd�Zd�Zd�Zd�Z	dd�Z
d	�Zd
�Zd�Z
d�Zd
�ZRS(s~Helper for the file storing a single shelve

    Handles common functions on shelve files (.hg/.patch) using
    the vfs layercC@s�||_||_tj|jjt��|_tj|jjt��|_|jj|_|rw|d||_	n	||_	dS(Nt.(
trepotnametvfsmodRtjoint	shelvedirt	backupdirt	backupvfstuitfname(tselfR"R#tfiletype((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyt__init___s		cC@s|jj|j�S(N(RtexistsR*(R+((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyR.jscC@s|jj|j�S(N(RR%R*(R+((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pytfilenamemscC@sOd�}|jj|j�}x*||�D]}|jj|�s+|Sq+WdS(Ncs@sM|V|jdd�\}}x)tjd�D]}d|||fVq-WdS(NR!is%s-%d.%s(trsplitt	itertoolstcount(tbasetextti((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pytgennamesqs(R(R%R*R.(R+R6R#tn((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pytbackupfilenameps
	cC@s?|jj�s|jj�ntj|j�|j��dS(N(R(tisdirtmakedirRtrenameR/R8(R+((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pytmovetobackup|scC@s|jj|j�S(N(RtstatR*(R+((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyR=�strbcC@sey|j|j|�SWnGtk
r`}|jtjkrA�ntjtd�|j��nXdS(Nsshelved change '%s' not found(	RR*tIOErrorterrnotENOENTRtAbortRR#(R+tmodeterr((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pytopener�sc
C@s|j�}z�tj}tj|j�s6tj}ntj|jj||j	|j
�}|jd}|jj�}tj
|j||dddd|j
j|j	�d|�|jd}||kr�|jdd}|j|}n|SWd|j�XdS(	Nttiptsourcetunshelveturlsbundle:ttargetphaset
revduplicatesi����(RERtinternaltsupportinternalR"tsecretR	t
readbundleR)R*RtcurrenttransactionRtapplybundleR%tchangestclose(R+tfpRJtgentpretipttrt	shelvectxt	shelverev((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyRQ�s$	$

cC@s;|jj|j�}tj|jjd|jj|f�S(Nsbundle://%s+%s(RR%R*RtinstanceR"tbaseuitroot(R+tpath((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyR�sc	C@s�tj|j�}|dkr-d}d}nd}d}|jj�}tj|d|d|g�}tj|||d�}tj	|j
||j||jd|�dS(	Nt01tHG10BZtHG20tBZtmissingrootstmissingheadsRtcompression(
RtsafeversionR"tNonet
unfilteredRtoutgoingtmakechangegroupRtwritebundleR)R*R(	R+tbasesRt	cgversiontbtypeRdR"Rhtcg((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyRj�s	!cC@s#tj|j|j�j|�dS(N(RtsimplekeyvaluefileRR*twrite(R+tinfo((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyt	writeinfo�scC@stj|j|j�j�S(N(RRoRR*tread(R+((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pytreadinfo�sN(t__name__t
__module__t__doc__RfR-R.R/R8R<R=RERQRRjRrRt(((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyR Zs									tshelvedstatecB@s�eZdZdZdZdZdZdZed��Z	ed��Z
ed��Zed	��Zee
d
d��Zed��ZRS(
s�Handle persistence during unshelving operations.

    Handles saving and restoring a shelved state. Ensures that different
    versions of a shelved state are possible and handles them appropriately.
    iRxtkeeptnokeeps:no-active-bookmarkcC@s�y�tj|d�|d<tj|d�|d<g|djd�D]}tj|�^qE|d<g|djd�D]}tj|�^qx|d<Wn4tttfk
r�}tjtj	|���nXdS(s@Some basic shelvestate syntactic verification and transformationtoriginalwctxt
pendingctxtparentst t
nodestoremoveN(
tnodemodtbintsplitt
ValueErrort	TypeErrortKeyErrorRtCorruptedStateRtbytestr(tclstdthRD((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyt_verifyandtransform�s04cC@sr|j|j�}zNyt|j�j��}Wn+tk
r^}tjtj	|���nXWd|j
�X|S(s.Read version information from shelvestate fileN(Rt	_filenametinttreadlinetstripR�RR�RR�RS(R�R"RTtversionRD((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyt_getversion�s c	C@svddddddddd	g	}|j|j�}i}z+x$|D]}|j�j�||<qCWWd
|j�X|S(s9Read the old position-based version of a shelvestate fileR�R#R{R|R}RtbranchtorestoreRyt
activebookN(RR�R�R�RS(R�R"tkeysRTR�tkey((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyt_readold�s
cC@s�|j|�}||jkr0|j|�}nK||jkrftj|j|j�jdt�}nt	j
td���|j|�y�|�}|d|_
||d|_||d|_|d|_|d|_|jdd	�|_|jd
�|jk|_d	|_|jdd	�|jkrI|jdd	�|_nWn4t	jtfk
r�}t	jtj|���nX|S(NtfirstlinenonkeyvalsIthis version of shelve is incompatible with the version used in this repoR#R{R|R}RR�tRyR�(R�t_versionR�RRoRR�RstTrueRRBRR�R#twctxR|R}RtgetR�t_keepRytactivebookmarkt
_noactivebooktRepoLookupErrorR�R�RR�(R�R"R�R�tobjRD((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pytload�s.
	


	R�c	C@s�i|d6tj|j��d6tj|j��d6djg|jj�D]}	tj|	�^qL�d6djg|D]}
tj|
�^qx�d6|d6|r�|jn|jd6|p�|jd	6}t	j
|j|j�j
|d
d|j�dS(NR#R{R|R~R}RR�RyR�t	firstlines%d(R�thexRR%tdirstateR}R�t_nokeepR�RRoRR�RpR�(R�R"R#R{R|RR�RyR�tpR7Rq((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pytsaves	,	#cC@s|jj|jdt�dS(Nt
ignoremissing(Rt
unlinkpathR�R�(R�R"((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pytclear's(RuRvRwR�R�R�R�R�tclassmethodR�R�R�R�tFalseR�R�(((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyRx�s
c	C@sCtj|jjt��}|jjdd�}g|j�D]}|jdt�r=|^q=}t	g|D]"}|j
|�t
j|f^ql�}|dkr�|t|�kr�||d}nd}xo|t|�| D]Y\}}||krq�n|dtt� }x#tD]}|j|d|�qWq�WdS(NRRR!ii(R$RR%R'R)t	configinttlistdirtendswithtpatchextensiontsortedR=tST_MTIMEtlenRftshelvefileextensionst	tryunlink(	R"RRtfthgfilestbordermtimetmtimeR3R4((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pytcleanupoldbackups+s5!
cC@s#|j}|rtj|�n|S(N(t_activebookmarkRt
deactivate(R"R�((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyt_backupactivebookmark=s	cC@s|rtj||�ndS(N(Rtactivate(R"tmark((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyt_restoreactivebookmarkCscC@sl|j�}d}d}|jj||�tj||�|j�tj||�|jjd|�dS(sEAbort current transaction for shelve/unshelve, but keep dirstate
    sdirstate.shelvesnarrowspec.shelveN(RPR�t
savebackupRtabortt
restorebackupRf(R"RWtdirstatebackupnametnarrowspecbackupname((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyt_aborttransactionGs
c@sX�fd�}|jd�}|jp6|j�p6d��jdd���jdd���jd�r��jddd��n|rt||t�j�r�td	�|}t	j
|��nd|ks�d|kr�t	j
td
���n|jd�rTt	j
td���qTn6x3|�D](}t||t�j�s(|}Pq(q(W|S(s/Decide on the name this shelve is going to havec3@s2�Vx&tjd�D]}d�|fVqWdS(Nis%s-%02d(R1R2(R5(tlabel(s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyR6UsR#Rt/Rs\R!is*a shelved change named '%s' already existss,shelved change names can not contain slashess+shelved change names can not start with '.'(R�R�tbranchtreplacet
startswithR R�R.RRRB(R"tparenttoptsR6R#teR7((R�s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyt
getshelvenameSs(cc@s�tjh}tj�}|j|�x||r�|j�}|j�VxX|j�D]J}|j�}||krR|j	|�|j
�r�|j|�q�qRqRWq(WdS(sireturn all mutable ancestors for ctx (included)

    Much faster than the revset ancestors(ctx) & draft()N(R�tnullrevtcollectionstdequetappendtpopleftRR}trevtaddtmutable(tctxtseentvisitR�R�((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pytmutableancestorsus
	
c@s/��fd���fd�}|r+|S�S(Nc

@s�tj|d�}|r4|jjt}|j_ntj}tj|�sXtj}ni|d	6}zut}	�r�t	j
ddtj|��}	n|j
j|��0|j|t|jd�|d|	d��SWdQXWd|r�||j_nXdS(
NtmqRs
new-committeditforms
shelve.shelvetdateteditortextra(Rs
new-commit(RtsafehasattrR�tcheckappliedR�RRLRMRNRtgetcommiteditorRt	strkwargsR)tconfigoverridetcommitt
shelveuserR�(
R)R"tmessagetmatchR�thasmqtsavedRJt	overridesteditor_(R�R�(s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyt
commitfunc�s"	
c@sHtj|�}tj|d|i�}|d}�|||||�S(NR!R�(RtbyteskwargsRR�(R)R"tpatsR�R�R�(R�(s2/usr/lib64/python2.7/site-packages/hgext/shelve.pytinteractivecommitfunc�s
((R�tinteractiveR�R�((R�R�R�s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyt
getcommitfunc�scC@sh|jdtj|d||��}|jrQ|jtd�t|j��n|jtd��dS(NR�s4nothing changed (%d missing files, see 'hg status')
snothing changed
(tstatusRR�RftdeletedRR�(R)R"R�R�R=((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyt_nothingtoshelvemessaging�s
%	cC@s�itj|�d6}t||d�j|�tt||��}t||d�j||�t||t�jd��/}t	j
||g|dtjdt
��WdQXdS(NRRR
twbR�tgit(R�R�R RrtlistR�RjR�RERt
exportfileRtdiffoptsR�(R"RR#RqRkRT((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyt_shelvecreatedcommit�scC@se|jdtj|d||�dt�}|jradj|j�|d<|dj|j�ndS(NR�tunknownstshelve_unknown(R�RR�RfR�R�R%R�(R"R�R�R�ts((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyt_includeunknownfiles�s
"		cC@sbtj|�rTd}|j�}|jj||�|j�|jjd|�n
t|�dS(Nsdirstate.shelve(	RRMRPR�R�RSR�RfR�(R"t
backupnameRW((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyt
_finishshelve�s
c	C@s7|j��%tj|�t||||�SWdQXdS(s$subcommand that creates a new shelveN(twlockRtcheckunfinishedt_docreatecmd(R)R"R�R�((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyt	createcmd�s

c
C@s�|d}|j�}t|�dkr@tjtd���n|d}|j�}|j�tj	kr�d|j
�jdd�d}nd}|jd�s�||d<nd}	}
}z|j
�}	|jdd	d
��}
|jdt�}|jdt�o|jd
t�}
t|||�}t|�}idd6}|
rct||||�nt|�r�t||�r�|jj|dj��nt||dt�}|s�tj|||||�}n0tj|||dttj|tj|��}|s"t||||�dSt |||�|j!�rYt"j#||j$��}n|j%td�|�t&j'||j��||dj�kr�t||�r�|jj|�nt(|�Wdt)||�t*j+|
|	�XdS(Niscannot shelve while mergingischanges to: %ss
s(changes in empty repository)R�R�treportcS@sdS(N(Rf(tx((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyt<lambda>�R�R�R�t	addremoveRRLR!R�sshelved as %s
(,RfR}R�RRBRR�RR�tnullidtdescriptionR�R�RttransactionR�R�R�Rt_iswctxonnewbrancht
_isbareshelveR�t	setbranchR�R�RR�tdorecordtrecordfilterRR�R�R�t	formattedRtellipsist	termwidthR�R
tupdateRR�tlockmodtrelease(R)R"R�R�R�R}R�t
origbranchtdescRRWR�R�tincludeunknownR#R�R�R((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyR�sX

#

&
cC@s>|o=|jdt�o=|jdt�o=|jdt�S(NR�tincludetexclude(R�R�(R�R�((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyRscC@s|dj�|dj�kS(NR!(RfR�(R"((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyRscC@s||j��jxb|jjt�D]N\}}|jdd�d}|tkrdt||�j�nt|�q WWdQXdS(s#subcommand that deletes all shelvesR!ii����N(	RRtreaddirR&R0R�R R<R�(R)R"R#t_typetsuffix((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyt
cleanupcmds
c
C@s�|stjtd���n|j���ygxV|D]N}xEtD]=}t|||�}|j�sr|tkrB|j�qBqBWq5Wt	|�WnDt
k
r�}|jtjkr��ntjtd�|��nXWdQXdS(s)subcommand that deletes a specific shelvesno shelved changes specified!sshelved change '%s' not foundN(
RRBRRR�R R.R�R<R�tOSErrorR@RA(R)R"R�R#R!tshfileRD((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyt	deletecmds


c	C@s�y|jjt�}Wn,tk
rD}|jtjkr@�ngSXg}x�|D]{\}}|jdd�\}}|sR|tkr�qRnt||�j	�}|j
|t	jt||�j�f�qRWt
|dt�S(s6return all shelves in repo as list of (time, filename)R!itreverse(RRR&R#R@RAR0R�R R=R�R�R/R�R�(	R"tnamesRDRqR#R tpfxtsfxtst((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pytlistshelves4s-c
C@s�t|�}d}|j�s-|j�}nd}|jd�xKt|�D]=\}}tj|�d}|r�||kr�qMn|j|d|�d}|jr�|jd�qMn|jdd	t	|��d	}	t
j|�}
d
tj
|
dt�}|j|dd�|jdd
t	|��|	d
7}	t|dtd��7}xqtr�|j�}
|
ssPn|
jd�sW|
j�}|j�r�tj|||	�}n|j|�PqWqWW|jd�|dp�|ds�wMn|j�}|dr>x6tjt|�D]\}}|j|d|�qWn|dr�x9tj|d|�D]\}}|j|d|�q^WnWdQXqMWdS(s,subcommand that displays the list of shelvesiPs
shelve.newestRiR�sshelve.names
R~is(%s)tabbrevs
shelve.ageiR!R>t#RR=twidthN(tsettplainRtpagerR+RR�RptquietR�RtmakedateRtageR�topenR�R�R�trstripRRRt	readlinesRt	difflabeltitert
diffstatui(R)R"R�R�R.t	namelabelR�R#tsnametusedR�R4RTtlineRt	difflinestchunkR�((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pytlistcmdEsV
	

	



"c	C@s�t|�dkrkt|�}|s<tjtd���n|d\}}tj|�d}|g}nxB|D]:}t||t�j	�srtjtd�|��qrqrWt
||||�dS(s subcommand that displays shelvesisthere are no shelves to showiscannot find shelf %sN(R�R+RRBRRR�R R�R.RA(	R)R"R�R�tshelvesR�R#R<t	shelfname((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyt	patchcmdsss
 cC@s4|j|jj�kr0tjtd���ndS(s'check parent while resuming an unshelves5working directory parents do not match unshelve stateN(R}R�RRBR(R"tstate((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pytcheckparents�scC@s/|j�}g|D]}|j||�^qS(N(tgetcwdtpathto(R"tfilestcwdR�((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pytpathtofiles�scC@s%|j��z�t||�tj||jdtdt�|jrm|j|jkrmt	j
||j�n|jjd�r�|jj
dd�tj|�nt|||j|j�tj|�s�tj|||jdtdd�nWdtj|�|jtd	�|j�XWdQXdS(
s-subcommand that abort an in-progress unshelvetbranchmergetforcetunshelverebasestatetrebasestatetbackupttopicRNsunshelve of '%s' aborted
(RRFR
RR|R�R�R�t
_bookmarksRR�RR.R;Rtclearstatust
mergefilesR�RRMRR�RRxR�twarnRR#(R)R"RER�((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyt
unshelveabort�s 

	
c
C@s|jitd6���tj||j��g}|j|j��|j|j�dj��xK|jdt�j	D]4}||kryt
j|tj
|||��qyqyW|jt�tj||||jj�t||�itd6�|j�WdQXdS(sLupdates to wctx and merges the changes from shelvectx into the
    dirstate.R)R2iR�t	no_backupN(R)R2(R�R�R
RRtextendRIR}R�R�RR;Rtorigpatht
pushbufferRtrevertR�RKt	popbuffer(R)R"R�RXRItfile((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyRT�s&
cC@sI|rE||jj�krE|jj|�|jtd�|�ndS(Ns&marked working directory as branch %s
(R�R�RR�R(R)R"R�((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyt
restorebranch�scC@s\|jd�sXx9tD]1}t|||�}|j�r|j�qqWt|�ndS(s&remove related files after an unshelveRyN(R�R�R R.R<R�(R)R"R#R�R,R$((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pytunshelvecleanup�s
cC@s�|j���t||�tjj|�}t|j��rbtjt	d�dt	d���n||j
d}|j}|jj
��7|j|jj�tj�|jj|j��WdQXtj}tj|�s�tj}ni|d6}|jj|d��q|jj
��[|j|j
d	tj�|jd
|j�d|j�d|j�d
|j��}	WdQXWdQX|	dkr�tjj |�|j}t	d�}
|j!|
�n|j"j#|	�||	}t$j%||j�dt&�|j'j(d�r)|j'j)dd�t*j+|�nt,|||j-|�t.|||j/�tj|�s�t0j1|||j"dt&dd�nt2||j3�t4j5|�t6|||j7|�|j!t	d�|j7�WdQXdS(s.subcommand to continue an in-progress unshelves$unresolved conflicts, can't continuethints/see 'hg resolve', then 'hg unshelve --continue'iNRs
new-commitRHittextR�tuserR�s<note: unshelved changes already existed in the working copy
t	overwriteRNRORPRQRsunshelve of '%s' complete
(Rs
new-commit(8RRFR
t
mergestateRsR�t
unresolvedRRBRR}R|R�tparentchanget
setparentsRR�RRpRPRRLRMRNR)R�R�R
R�RbR�RftcleanR�RR�R
t
updaterepoR�RR.R;RRSRTR�R^R�RR�R�R�RxR�R_R#(R)R"RER�tmsRXR|RJR�tnewnodetmsg((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pytunshelvecontinue�sV

		
	


c

C@s�|j�}t|j�}|jp3|jp3|js@||fS|jtd��idd6}td|dtdt�}i}d|d<|jd	�|d	<|j	it
d
6�� tj|||g|�}	WdQX||	}||fS(sETemporarily commit working copy changes before moving unshelve commitsLtemporarily committing pending changes (restore with 'hg unshelve --abort')
RRLR�R�R�s pending changes temporary commitR�R�R)R2N(R)R2(
R�t	frozensettaddedtmodifiedtremovedRR�R�R�R�R�RR�(
R)R"R�ttmpwctxRtaddedbeforeR�R�ttempoptsR((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyt_commitworkingcopychangess

	
!
cC@s�|j�}d}t||d�j�rIt||d�j�d}n|dksa||kr�|jitd6��t||d�j�}WdQX|dkr�itj	|j
��d6}t||d�j|�q�n
||}||fS(s5Recreate commit in the repository during the unshelveRRR)R2R
N(R)R2(RgRfR R.RtR�R�RQR�R�RRr(R)R"tbasenameRRXRq((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyt_unshelverestorecommits
cC@s|j�|j�dj�kr&|Si|jdd�d6tjd6}|jj|d���|jtd	��t	j
|||j�d
ddgd
t�}|j
r,|j�gtj|t|��D]}
|jj|
�^q�}tj||||||	|jd�|
�tjtd���n|jj��Z|j|j�tj�|jd|j�d|j�d|j�d|j ��}WdQX|dkr�t	j"j#|�|}td�}|j|�n#||}t$j%||j�t&�WdQX|S(sBRebase restored commit from its original location to a destinationittoolR�R)t
forcemergeRs
new-commitRHsrebasing shelved changes
tlabelsRsworking-copytkeepconflictparentRysFunresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')RaR�RbR�Ns<note: unshelved changes already existed in the working copy
(R)Ry(Rs
new-commit('RR}R�RRNR)R�R�RR
tgrafttp1R�tunresolvedcountRSRtxrangeR�t	changelogRxR�RtInterventionRequiredR�RfRgR�RR�R
R�RbR�RfRdRhR
RiR�(R)R"R�RWt	oldtiprevRvtpctxRrRXR�R�R�tstatsR�RRkRl((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyt_rebaserestoredcommit,s@"
		
4
cC@sl|j�jd�}|sdSt|jd��}t|j�j�}||@|}|dj|�dS(NR�s(R�R�RnR�R�RoRftforget(R"RXRst
shelveunknownt
addedafterttoforget((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyt_forgetunknownfiles_scC@s4t||�|j�jj||�t|�dS(N(R�RgR�R�R�(R"R�RWR�((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyt_finishunshelvejs
cC@spt|j�j�}t|j��}|j|�}|rltd�}td�}tj|d|��ndS(sYCheck potential problems which may result from working
    copy having untracked changes.s$shelved change touches missing filess,run hg status to see which files are missingR`N(R/R�R�RItintersectionRRRB(R)R"RXt	wcdeletedt
shelvetouchedR�tmR`((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyt_checkunshelveuntrackedproblemsssRHtaR�s&abort an incomplete unshelve operationtctcontinues)continue an incomplete unshelve operationtkRyskeep shelve after unshelvingR7R#R�s&restore shelved change with given nametNAMEttRxsspecify merge toolR�s+set date for temporary commits (DEPRECATED)tDATEshg unshelve [[-n] SHELVED]thelpcategoryc	O@s*|j��t||||�SWdQXdS(s+restore a shelved change to the working directory

    This command accepts an optional name of a shelved change to
    restore. If none is given, the most recent shelved change is used.

    If a shelved change is applied successfully, the bundle that
    contains the shelved changes is moved to a backup location
    (.hg/shelve-backup).

    Since you can restore a shelved change on top of an arbitrary
    commit, it is possible that unshelving will result in a conflict
    between your changes and the commits you are unshelving onto. If
    this occurs, you must resolve the conflict, then use
    ``--continue`` to complete the unshelve operation. (The bundle
    will not be moved until you successfully complete the unshelve.)

    (Alternatively, you can use ``--abort`` to abandon an unshelve
    that causes a conflict. This reverts the unshelved changes, and
    leaves the bundle in place.)

    If bare shelved change(when no files are specified, without interactive,
    include and exclude option) was done on newly created branch it would
    restore branch information to the working directory.

    After a successful unshelve, the shelved changes are stored in a
    backup directory. Only the N most recent backups are kept. N
    defaults to 10 but can be overridden using the ``shelve.maxbackups``
    configuration option.

    .. container:: verbose

       Timestamp in seconds is used to decide order of backups. More
       than ``maxbackups`` backups are kept, if same timestamp
       prevents from deciding exact order of them, for safety.
    N(Rt_dounshelve(R)R"RR�((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyRH~s2
cO@s�tj|�}|jd�}|jd�}|rK|rKtj|�nt|�}|jd�rz|j|d�n|s�|r<|r�|r�tjt	d���n|r�tjt	d���n|r�|jdt
�r�|jt	d��ny8tj
|�}|jd�dkr-|j|d<nWn�tk
rq}|jtjkrX�ntj|t	d	��n�tjk
r}|jtj|�d
�|r�t	d�}t	d�}	tj|d
|	��n/|rt	d�}|j|�tj|�ndSX|r t||||�S|r�t||||�Sn�t|�dkrftjt	d���no|s�t|�}|s�tjt	d���ntj|dd�d}
|jt	d�|
�n
|d}
t||
t �j!�s	tjt	d�|
��n|j"�}d}}z�|j#�}|j$d	dd��}t|�}
|d}|}t%|�}t&||||�\}}t'|||
�\}}t(|||�d}|j)�|j*�j)�kr�|j)�}nt+|||||
|
|||||�}i|jdd�d6}|j,|d	��t-||||�WdQXt.|||�t/|||�tj|�t0||
||�t1|||
|�Wd|r�|j2�nt3j2|�XdS(NR�R�R#s"cannot use both abort and continues:cannot combine abort/continue with naming a shelved changeRxstool option will be ignored
RyRHs
scorrupted shelved state files:please run hg unshelve --abort to abort unshelve operationR`spcould not read shelved state file, your working copy may be in an unexpected state
please update to some commit
is&can only unshelve one change at a timesno shelved changes to apply!isunshelving change '%s'
sshelved change '%s' not foundRcS@sdS(N(Rf(R	((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyR
�R�R!R�R)Ry(R)Ry(4RR�R�RRR�R�RRBRR�RURxR�RfRyR?R@RAtwrongtooltocontinueR�tdebugR�R�RVRmR�R+RR�R�R R�R.RgRRR�RuRwR�R�R}R�R�RTR^R�R�R_RR(R)R"RR�tabortft	continuefRERDRlR`RvRRWR�R�RrR�RsRXR�R�((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyR��s�



		

tARs7mark new/missing files as added/removed before shelvingtuR�s!store unknown files in the shelvetcleanupsdelete all shelved changess%shelve with the specified commit dateR�tdeletes"delete the named shelved change(s)R�tedits invoke editor on commit messagestlR�slist current shelvesR�R�suse text as shelve messagetTEXTs)use the given name for the shelved commitR�s]output patches for changes (provide the names of the shelved changes as positional arguments)R5R�s4interactive mode, only works while creating a shelveR=skoutput diffstat-style summary of changes (provide the names of the shelved changes as positional arguments)shg shelve [OPTION]... [FILE]...c@sYtj���ddhfddhfddhfddhfddhfddhfddhfd	dhfd
d
dhfdddhfg
���fd�}|d�r�|r�tjtd
���nt||�S|d�r�t|||�S|d�rt|||��S|d
�s/|d�rBt|||��St	|||��SdS(s�save and set aside changes from the working directory

    Shelving takes files that "hg status" reports as not clean, saves
    the modifications to a bundle (a shelved change), and reverts the
    files so that their state in the working directory becomes clean.

    To restore these changes to the working directory, using "hg
    unshelve"; this will work even if you switch to a different
    commit.

    When no files are specified, "hg shelve" saves all not-clean
    files. If specific files or directories are named, only changes to
    those files are shelved.

    In bare shelve (when no files are specified, without interactive,
    include and exclude option), shelving remembers information if the
    working directory was on newly created branch, in other words working
    directory was on different branch than its first parent. In this
    situation unshelving restores branch information to the working directory.

    Each shelved change has a name that makes it easier to find later.
    The name of a shelved change defaults to being based on the active
    bookmark, or if there is no active bookmark, the current named
    branch.  To specify a different name, use ``--name``.

    To see a list of existing shelved changes, use the ``--list``
    option. For each shelved change, this will print its name, age,
    and description; use ``--patch`` or ``--stat`` for more details.

    To delete specific shelved changes, use ``--delete``. To delete
    all shelved changes, use ``--cleanup``.
    RtcreateR�R�R�R�R�R�R#RR=c@sf�j|�rbxL�D]D\}}�|r||krtjtd�||f��qqWtSdS(Ns2options '--%s' and '--%s' may not be used together(R�RRBRR�(toptR5t	allowable(t
allowablesR�(s2/usr/lib64/python2.7/site-packages/hgext/shelve.pytcheckoptfss+cannot specify names when using '--cleanup'N(
RR�RRBRR"R%RARDR(R)R"R�R�R�((R�R�s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyt	shelvecmds.?
cC@sQtjjtjtttd�td�g�tjjtjtd�g�dS(Nsunshelve already in progresss5use 'hg unshelve --continue' or 'hg unshelve --abort'shg unshelve --continue(RtunfinishedstatesR�RxR�R�Rtafterresolvedstates(R)((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pytextsetupzs			(_Rwt
__future__RR�R@R1R=tmercurial.i18nRt	mercurialRRRRRRRR	R
RRRR
RRR�RRRRRRRRRR$R�Rtmercurial.utilsRRtcmdtabletcommandt
testedwithtconfigtablet
configitemR'R&R�R�R�tobjectR RxR�R�R�R�R�R�R�R�R�R�RRRRRRR"R%R+RARDRFRKRVRTR^R_RmRuRwR�R�R�R�RftCATEGORY_WORKING_DIRECTORYRHR�twalkoptsR�R�(((s2/usr/lib64/python2.7/site-packages/hgext/shelve.pyt<module>s��dm					"					
		@			
			.									>			3									(	f												D