\x89\x50\x4E\x47\x0D\x0A\x1A\x0A PNG  \x89\x50\x4E\x47\x0D\x0A\x1A\x0A  13\c@@s|ddlmZddlmZddlmZmZdZdZ dZ dZ d d d Z d Zd Zd S( i(tabsolute_importi(thex(tutiltvfst logexchangec c@stj|jjt}|j|s.dS||}d}x}|D]u}|j}|seqGn|dkr~|d7}ny*|jd\}}}|||fVWqGtk rqGXqGW|jdS(s reads a file from .hg/logexchange/ directory and yields it's content filename: the file to be read yield a tuple (node, remotepath, name) Niis( tvfsmodRtjoint remotenamedirtexistststriptsplitt ValueErrortclose( trepotfilenameRtftlinenotlinetnodetremotetrname((s;/usr/lib64/python2.7/site-packages/mercurial/logexchange.pytreadremotenamefiles"      cc@sBxt|dD] }|VqWxt|dD] }|Vq/WdS(s read the details about the remotenames stored in .hg/logexchange/ and yields a tuple (node, remotepath, name). It does not yields information about whether an entry yielded is branch or bookmark. To get that information, call the respective functions. t bookmarkstbranchesN(R(R tbmentryt branchentry((s;/usr/lib64/python2.7/site-packages/mercurial/logexchange.pytreadremotenames0s c C@s8tj|jjt}||ddt}|jdtt||}xFt|D]8\}}} ||kr_|jd||| fq_q_Wxt|j D]x\} }|dkrx]|D] } |jd| || fqWq|dkr|r&|jd||| fq&qqW|j dS(Ntwt atomictemps0 s %s%s%s RR( RRRRtTruetwritetsetRtsortedt iteritemsR ( R t remotepathtnamestnametypeRRtolddataRtoldpathRtnametn((s;/usr/lib64/python2.7/site-packages/mercurial/logexchange.pytwriteremotenamefile=s  !  ! $cC@sZ|j}z<|r+t|||dn|rGt|||dnWd|jXdS(s save remotenames i.e. remotebookmarks and remotebranches in their respective files under ".hg/logexchange/" directory. RRN(twlockR)trelease(R R"RRR*((s;/usr/lib64/python2.7/site-packages/mercurial/logexchange.pytsaveremotenamesTs cC@sd}|j}|}|r6tj|jj}nt|tsQ|j}nxu|j j dD]a\}}tj |}tjt|}tj|}||ks||krd|}PqdqdW|S(sreturns remote pathtpathsN( tNonetlocalRtpconvertt_repotroott isinstancetbytest_urltuit configitemst removeauth(R RR/trpathtpathturlt noauthurl((s;/usr/lib64/python2.7/site-packages/mercurial/logexchange.pyt activepathbs  c C@st||}|j&}|jdidd6j}WdQXi}|j}|j}|jdij}WdQXxl|jD]^\}} g|| s