Plan 9 from Bell Labs’s /usr/web/sources/contrib/jas/root/sys/lib/python2.7/site-packages/mercurial/transaction.pyc

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


�t�c@sxddlmZddlZddlZddlZddlZd�Zed�Zde	fd��YZ
d�ZdS(i�(t_Ncs�fd�}|S(Ncs7|jdkr'tjtd���n�|||�S(Nis;cannot use transaction when it is already committed/aborted(tcountterrortAbortR(tselftargstkwds(tfunc(s9/sys/lib/python2.7/site-packages/mercurial/transaction.pyt_actives	((RR((Rs9/sys/lib/python2.7/site-packages/mercurial/transaction.pytactivescCs�x�D]�\}}}|s#|r{y*||d�}|j|�|j�Wq�tk
rw|td�|��q�Xqy0||�}|j}	|j�tj|	�Wqttfk
r�}
|
jtj	kr��q�qXqWtj|�dS(Ntasfailed to truncate %s
(
ttruncatetclosetIOErrorRtnametutiltunlinktOSErrorterrnotENOENT(tjournaltreporttopenertentriesRtftotignoretfptfntinst((s9/sys/lib/python2.7/site-packages/mercurial/transaction.pyt	_playbacks$



	
ttransactioncBs�eZd
d
d�Zd�Zed��Zed��Zed
d��Zed��Z	ed
d��Z
ed��Zd�Zd	�Z
ed
��Zed��Zd�ZRS(cCs�d|_d|_||_||_||_g|_i|_||_g|_t	j
|jd�|_|dk	r�t
j|j|d@�ndS(Nitwi�(RtusagesRRtafterRtmapRt_queueRt	posixfiletfiletNonetostchmod(RRRRR"t
createmode((s9/sys/lib/python2.7/site-packages/mercurial/transaction.pyt__init__0s									cCs|jr|j�ndS(N(Rt_abort(R((s9/sys/lib/python2.7/site-packages/mercurial/transaction.pyt__del__?s	cCs|jjg�dS(N(R$tappend(R((s9/sys/lib/python2.7/site-packages/mercurial/transaction.pyt
startgroupCscCst|jj�}djg|D]}d|d|df^q�}|jj|�|jj|�|jj�dS(Nts%s%d
ii(R$tpoptjoinRtextendR&twritetflush(Rtqtxtd((s9/sys/lib/python2.7/site-packages/mercurial/transaction.pytendgroupGs
4cCs�||jkrdS|jr=|jdj|||f�dS|jj|||f�t|j�d|j|<|jjd||f�|jj�dS(Ni�is%s%d
(R#R$R.RtlenR&R4R5(RR&toffsettdata((s9/sys/lib/python2.7/site-packages/mercurial/transaction.pytaddOs	cCs%||jkr!|j|j|SdS(N(R#RR'(RR&((s9/sys/lib/python2.7/site-packages/mercurial/transaction.pytfind]scCsl||jkrt|��n|j|}|||f|j|<|jjd||f�|jj�dS(sn
        replace can only replace already committed entries
        that are not pending in the queue
        s%s%d
N(R#tKeyErrorRR&R4R5(RR&R;R<tindex((s9/sys/lib/python2.7/site-packages/mercurial/transaction.pytreplacecs
cCs"|jd7_|jd7_|S(Ni(RR!(R((s9/sys/lib/python2.7/site-packages/mercurial/transaction.pytnestqscCsP|jdkr!|jd8_n|jdkrL|jdkrL|j�ndS(Nii(RR!R,(R((s9/sys/lib/python2.7/site-packages/mercurial/transaction.pytreleasewscCs
|jdkS(Ni(R(R((s9/sys/lib/python2.7/site-packages/mercurial/transaction.pytrunning~scCs�|jd8_|jdkr"dS|jj�g|_|jrN|j�ntjj|j�rvt	j
|j�nd|_dS(scommit the transactioniiN(RR&RRR"R(tpathtisfileRRRR'(R((s9/sys/lib/python2.7/site-packages/mercurial/transaction.pyR�s
		
cCs|j�dS(s�abort the transaction (generally called on error, or when the
        transaction is not explicitly committed before going out of
        scope)N(R,(R((s9/sys/lib/python2.7/site-packages/mercurial/transaction.pytabort�scCs�d|_d|_|jj�z�|jsK|jrGtj|j�ndS|jt	d��y9t
|j|j|j|jt�|jt	d��Wn$t
k
r�|jt	d��nXWdd|_XdS(Nistransaction abort!
srollback completed
s(rollback failed - please run hg recover
(RR!R&RRRRRRRRRtFalset	ExceptionR'(R((s9/sys/lib/python2.7/site-packages/mercurial/transaction.pyR,�s 		
		

N(t__name__t
__module__R'R+R-R	R/R9R=R>RARBRCRDRRGR,(((s9/sys/lib/python2.7/site-packages/mercurial/transaction.pyR/s	

		c	Cs�g}tj|�}|j�}|j�x?|D]7}|jd�\}}|j|t|�df�q2Wt||||�dS(Nt(	RR%t	readlinesRtsplitR.tintR'R(	RR&RRRtlinestlRR((s9/sys/lib/python2.7/site-packages/mercurial/transaction.pytrollback�s

 (ti18nRR(RRRR	tTrueRtobjectRRR(((s9/sys/lib/python2.7/site-packages/mercurial/transaction.pyt<module>s	~

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.