-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/mercurial/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/mercurial/transaction.pyc

ó
Ì\,Tc@slddlmZddlZddlZddlZd„Zed„Zdefd„ƒYZ	d„Z
dS(iÿÿÿÿ(t_Ncs‡fd†}|S(Ncs7|jdkr'tjtdƒƒ‚nˆ|||ŽS(Nis;cannot use transaction when it is already committed/aborted(tcountterrortAbortR(tselftargstkwds(tfunc(s9/usr/lib/python2.7/dist-packages/mercurial/transaction.pyt_actives	((RR((Rs9/usr/lib/python2.7/dist-packages/mercurial/transaction.pytactivescCs¦xÁ|D]¹\}}}|s#|r{y*||dƒ}	|	j|ƒ|	jƒWqÀtk
rw|tdƒ|ƒ‚qÀXqy|j|ƒWqttfk
r¿}
|
jtjkrÀ‚qÀqXqWg}x|D]y\}}}|j|ƒ}
|j|ƒ}y!t	j
||
ƒ|j|ƒWqÑtk
rI|tdƒ|ƒ‚qÑXqÑW|j|ƒd|}|j|ƒr„|j|ƒnx|D]}|j|ƒq‹WdS(Ntasfailed to truncate %s
sfailed to recover %s
s%s.backupfiles(
ttruncatetclosetIOErrorRtunlinktOSErrorterrnotENOENTtjointutiltcopyfiletappendtexists(tjournaltreporttopenertentriest
backupentriesRtftotignoretfptinsttbackupfilestbtfilepatht
backuppath((s9/usr/lib/python2.7/dist-packages/mercurial/transaction.pyt	_playbacks<







ttransactioncBsÑeZddddd„Zd„Zed„ƒZed„ƒZedd„ƒZee	d„ƒZ
ed„ƒZedd„ƒZed„ƒZ
d	„Zd
„Zed„ƒZed„ƒZd
„ZRS(cCsüd|_d|_||_||_||_||_||_g|_g|_i|_	i|_
||_g|_i|_
d||_|j|jdƒ|_|j|jdƒ|_|dk	rø|j|j|d@ƒ|j|j|d@ƒndS(sÞBegin a new transaction

        Begins a new transaction that allows rolling back writes in the event of
        an exception.

        * `after`: called after the transaction has been committed
        * `createmode`: the mode of the journal file that will be created
        * `onclose`: called as the transaction is closing, but before it is
        closed
        * `onabort`: called as the transaction is aborting, but before any files
        have been truncated
        is%s.backupfilestwi¶N(RtusagesRRtaftertonclosetonabortRRtmapt	backupmapRt_queuethookargst
backupjournaltopentfiletbackupsfiletNonetchmod(RRRRR)t
createmodeR*R+((s9/usr/lib/python2.7/dist-packages/mercurial/transaction.pyt__init__>s(														
cCs|jr|jƒndS(N(Rt_abort(R((s9/usr/lib/python2.7/dist-packages/mercurial/transaction.pyt__del__cs	cCs|jjggfƒdS(N(R.R(R((s9/usr/lib/python2.7/dist-packages/mercurial/transaction.pyt
startgroupgsc	CsG|jjƒ}|jj|dƒ|jj|dƒg}g}x.|dD]"\}}}|j||fƒqNWx.|dD]"\}}}|j||fƒqWdjg|D]\}}d||f^q²ƒ}|jj|ƒ|jj	ƒdjg|D]\}}d||f^qƒ}|j
j|ƒ|j
j	ƒdS(Niits%s%d
s%s%s(R.tpopRtextendRRRR2twritetflushR3(	RtqtoffsetstbackupsRRRR"td((s9/usr/lib/python2.7/dist-packages/mercurial/transaction.pytendgroupks2
2cCs®||jks||jkr"dS|jrP|jddj|||fƒdS|jj|||fƒt|jƒd|j|<|jjd||fƒ|jjƒdS(Niÿÿÿÿiis%s%d
(	R,R-R.RRtlenR2R>R?(RR2toffsettdata((s9/usr/lib/python2.7/dist-packages/mercurial/transaction.pytadds	!cCs||jks||jkr"dSd|}|jj|ƒr{|jj|ƒ}|jj|ƒ}tj||d|ƒn|j|dƒdS|jrº|jddj	||fƒdS|j
j	||dfƒt|j
ƒd|j|<|j
jd||fƒ|j
jƒdS(sWAdds a backup of the file to the transaction

        Calling addbackup() creates a hardlink backup of the specified file
        that is used to recover the file in the event of the transaction
        aborting.

        * `file`: the file path, relative to .hg/store
        * `hardlink`: use a hardlink to quickly create the backup
        Ns
journal.%sthardlinkiiÿÿÿÿis%s%s(R,R-RRRRt	copyfilesRHR.RRR4RER3R>R?(RR2RIt
backupfileR#R$((s9/usr/lib/python2.7/dist-packages/mercurial/transaction.pyt	addbackups 
	cCsF||jkr!|j|j|S||jkrB|j|j|SdS(N(R,RR-RR4(RR2((s9/usr/lib/python2.7/dist-packages/mercurial/transaction.pytfind¯s
cCsl||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,tKeyErrorRR2R>R?(RR2RFRGtindex((s9/usr/lib/python2.7/dist-packages/mercurial/transaction.pytreplace·s
cCs"|jd7_|jd7_|S(Ni(RR((R((s9/usr/lib/python2.7/dist-packages/mercurial/transaction.pytnestÅscCsP|jdkr!|jd8_n|jdkrL|jdkrL|jƒndS(Nii(RR(R8(R((s9/usr/lib/python2.7/dist-packages/mercurial/transaction.pytreleaseËscCs
|jdkS(Ni(R(R((s9/usr/lib/python2.7/dist-packages/mercurial/transaction.pytrunningÒscCs|jdkr+|jdk	r+|jƒn|jd8_|jdkrMdS|jjƒ|jjƒg|_|jr†|jƒn|jj	|j
ƒr±|jj|j
ƒn|jj	|jƒr	|jj|jƒx-|j
D]\}}}|jj|ƒqãWng|_
d|_
dS(scommit the transactioniiN(RR*R4R2RR3RR)RtisfileRRR0R(RRR"R((s9/usr/lib/python2.7/dist-packages/mercurial/transaction.pyRÕs$


		
	cCs|jƒdS(sabort the transaction (generally called on error, or when the
        transaction is not explicitly committed before going out of
        scope)N(R8(R((s9/usr/lib/python2.7/dist-packages/mercurial/transaction.pytabortìscCs,d|_d|_|jjƒ|jjƒ|jdk	rH|jƒnzÓ|jr¡|jr¡|j	r~|j
j|j	ƒn|jr|j
j|jƒndS|j
tdƒƒy?t|j	|j
|j
|j|jtƒ|j
tdƒƒWn$tk
r|j
tdƒƒnXWdd|_	XdS(Nistransaction abort!
srollback completed
s(rollback failed - please run hg recover
(RR(R2RR3R+R4RRRRRR0RRR%tFalset	Exception(R((s9/usr/lib/python2.7/dist-packages/mercurial/transaction.pyR8ós*		


		
N(t__name__t
__module__R4R7R9R	R:RDRHtTrueRLRMRPRQRRRSRRUR8(((s9/usr/lib/python2.7/dist-packages/mercurial/transaction.pyR&=s$$	

		cCsdg}g}|j|ƒ}|jƒ}|jƒxk|D]c}y5|jdƒ\}}	|j|t|	ƒdfƒWq8tk
rš|tdƒ|ƒq8Xq8Wd|}
|j	|
ƒrJ|j|
ƒ}|j
ƒ}t|ƒdkrJ|jdƒ}xPtdt|ƒdƒD]3}
||
|
d!\}}|j||dfƒq
WqJnt
|||||ƒdS(säRolls back the transaction contained in the given file

    Reads the entries in the specified file, and the corresponding
    '*.backupfiles' file, to recover from an incomplete transaction.

    * `file`: a file containing a list of entries, specifying where
    to truncate each file.  The file should contain a list of
    fileoffset pairs, delimited by newlines. The corresponding
    '*.backupfiles' file should contain a list of filebackupfile
    pairs, delimited by .
    ts couldn't read journal entry %r!
s%s.backupfilesiiiN(R1t	readlinesRtsplitRtintR4t
ValueErrorRRtreadREtxrangeR%(RR2RRRRtlinestlRRR0RGtpartstiR"((s9/usr/lib/python2.7/dist-packages/mercurial/transaction.pytrollbacks*

 

 (ti18nRRRRR	RZR%tobjectR&Rf(((s9/usr/lib/python2.7/dist-packages/mercurial/transaction.pyt<module>s	#Ó

Copyright © 2017 || Recoded By Mr.Bumblebee