³ò ø$•Jc@slddklZddkZddkZddkZd„Zed„Zdefd„ƒYZ d„Z dS(iÿÿÿÿ(t_Ncs‡fd†}|S(Ncs9|idjotitdƒƒ‚nˆ|||ŽS(Nis;cannot use transaction when it is already committed/aborted(tcountterrortAbortR(tselftargstkwds(tfunc(s(/sys/lib/python/mercurial/transaction.pyt_actives ((RR((Rs(/sys/lib/python/mercurial/transaction.pytactivesc CsËx·|D]¯\}}}|p| o?y||dƒi|ƒWq¶|tdƒ|ƒ‚q¶Xqy ||ƒi}ti|ƒWqtj o#} | itijo‚q¶qXqWti|ƒdS(Ntasfailed to truncate %s (ttruncateRtnametostunlinktIOErrorterrnotENOENT( tjournaltreporttopenertentriesRtftotignoretfntinst((s(/sys/lib/python/mercurial/transaction.pyt _playbacks t transactioncBs°eZd d d„Zd„Zed„ƒZed„ƒZed d„ƒZed„ƒZ ed d„ƒZ ed„ƒZ d„Z ed „ƒZ ed „ƒZd „ZRS( cCs’d|_d|_||_||_||_g|_h|_||_g|_t |idƒ|_ |dj ot i |i|d@ƒndS(Nitwi¶( tNoneRRRRtafterRtmapt_queuetopentfileR tchmod(RRRRRt createmode((s(/sys/lib/python/mercurial/transaction.pyt__init__,s          cCs7|io)|io|iƒn|iiƒndS(N(RRt_abortR#tclose(R((s(/sys/lib/python/mercurial/transaction.pyt__del__<s cCs|iigƒdS(N(R!tappend(R((s(/sys/lib/python/mercurial/transaction.pyt startgroupAscCs||iiƒ}dig}|D]}|d|d|dfq ~ƒ}|ii|ƒ|ii|ƒ|iiƒdS(Nts%s%d ii(R!tpoptjoinRtextendR#twritetflush(Rtqt_[1]txtd((s(/sys/lib/python/mercurial/transaction.pytendgroupEs <cCs¥||ijodSn|io%|idi|||fƒdSn|ii|||fƒt|iƒd|i|<|iid||fƒ|iiƒdS(Niÿÿÿÿis%s%d (R R!R*RtlenR#R0R1(RR#toffsettdata((s(/sys/lib/python/mercurial/transaction.pytaddMs cCs*||ijo|i|i|SndS(N(R RR(RR#((s(/sys/lib/python/mercurial/transaction.pytfind[scCsn||ijot|ƒ‚n|i|}|||f|i|<|iid||fƒ|iiƒdS(sn replace can only replace already committed entries that are not pending in the queue s%s%d N(R tKeyErrorRR#R0R1(RR#R8R9tindex((s(/sys/lib/python/mercurial/transaction.pytreplaceas  cCs|id7_|S(Ni(R(R((s(/sys/lib/python/mercurial/transaction.pytnestoscCs |idjS(Ni(R(R((s(/sys/lib/python/mercurial/transaction.pytrunningtscCsr|id8_|idjodSn|iiƒg|_|io|iƒnti|iƒd|_dS(scommit the transactioniiN( RR#R(RRR RRR(R((s(/sys/lib/python/mercurial/transaction.pyR(ws   cCs|iƒdS(sabort the transaction (generally called on error, or when the transaction is not explicitly committed before going out of scope)N(R'(R((s(/sys/lib/python/mercurial/transaction.pytabort…sc Cs¦d|_|iiƒ|ipdSn|itdƒƒzZy9t|i|i|i|it ƒ|itdƒƒWn|itdƒƒnXWdd|_XdS(Nistransaction abort! srollback completed s(rollback failed - please run hg recover ( RR#R(RRRRRRtFalseR(R((s(/sys/lib/python/mercurial/transaction.pyR'Œs  "N(t__name__t __module__RR&R)R R+R6R:R;R>R?R@R(RAR'(((s(/sys/lib/python/mercurial/transaction.pyR+s    cCskg}xKt|ƒiƒD]7}|idƒ\}}|i|t|ƒdfƒqWt||||ƒdS(Nt(R"t readlinestsplitR*tintRR(RR#RRtlRR((s(/sys/lib/python/mercurial/transaction.pytrollbackžs  ( ti18nRR RRR tTrueRtobjectRRJ(((s(/sys/lib/python/mercurial/transaction.pyss    s