³ò ÷$•Jc @s³ddklZlZlZddklZddkZddkZddkZddk Z d„Z d„Z d„Z de fd„ƒYZd „Zd eifd „ƒYZdS( iÿÿÿÿ(tbinthextnullid(t_NcCs:|iddƒiddƒiddƒ}|iddƒS( s >>> d = {'nl': chr(10), 'bs': chr(92), 'cr': chr(13), 'nul': chr(0)} >>> s = "ab%(nl)scd%(bs)s%(bs)sn%(nul)sab%(cr)scd%(bs)s%(nl)s" % d >>> s 'ab\ncd\\\\n\x00ab\rcd\\\n' >>> res = _string_escape(s) >>> s == res.decode('string_escape') True s\s\\s s\ns s\rts\0(treplace(ttext((s&/sys/lib/python/mercurial/changelog.pyt_string_escape s *cCsZh}xM|idƒD]<}|o/|idƒiddƒ\}}|||((R=R<R!R;s&/sys/lib/python/mercurial/changelog.pyt delayopenerZst changelogcBsYeZd„Zd„Zd„Zd„Zd„Zdd„Zd„Z dhd„Z RS( cCs5tii||dƒ||_t|_t|_dS(Ns 00changelog.i(trevlogR"t _realopenertFalset_delayedt_divert(R R<((s&/sys/lib/python/mercurial/changelog.pyR"es  cCsOt|_t|ƒdj|_g|_t|i|i|i|iƒ|_dS(s2delay visibility of index updates to other readersiN( tTrueRDR$REt _delaybufR?RBt indexfileR<(R ((s&/sys/lib/python/mercurial/changelog.pyt delayupdateks   cCs°t|_|i|_|io1|i|idƒi}ti||d ƒnP|i oE|i|idƒ}|i di |i ƒƒ|i ƒg|_ n|i |ƒdS(sfinalize index updatess.aiþÿÿÿR7R#N(RCRDRBR<RERHR9RtrenameRGR2RR'tcheckinlinesize(R ttrtnR((s&/sys/lib/python/mercurial/changelog.pytfinalizess      cCs=ti|i|ƒ}|i|_|i|_|i|_dS(N(RAR<tindextnodemapt _chunkcache(R tfileR6((s&/sys/lib/python/mercurial/changelog.pyt readpendingƒs  cCs—|iow|i|iƒ}|i|iddƒ}|i|iƒƒ|idi|iƒƒ|iƒg|_t|_n|iotSnt S(sDcreate a file containing the unfinalized state for pretxnchangegroups.aR8R#( RGRBRHR2R*RR'RFRERC(R tfp1tfp2((s&/sys/lib/python/mercurial/changelog.pyt writepending‰s     cCs(|iptii|||ƒndS(N(RDRARK(R RLR((s&/sys/lib/python/mercurial/changelog.pyRKœs c Csy|i|ƒ}|p#tdd gdhdds0   3