\x89\x50\x4E\x47\x0D\x0A\x1A\x0A PNG  \x89\x50\x4E\x47\x0D\x0A\x1A\x0A  13\c@@sddlmZddlZddlZddlZddlmZddlmZm Z m Z m Z m Z ddl mZmZmZe jZdefdYZdefd YZd Zed eed Zd efdYZdeedZdZdS(i(tabsolute_importN(t_(tencodingterrorthooktpycompattutil(tdateutiltprocutilt stringutiltlogentrycB@s eZdZdZdZRS(sClass logentry has the following attributes: .author - author name as CVS knows it .branch - name of branch this revision is on .branches - revision tuple of branches starting at this revision .comment - commit message .commitid - CVS commitid or None .date - the commit date as a (time, tz) tuple .dead - true if file revision is dead .file - Name of file .lines - a tuple (+lines, -lines) or None .parent - Previous revision of this entry .rcs - name of file as returned from CVS .revision - revision number as tuple .tags - list of tags on the file .synthetic - is this a synthetic "file ... added on ..." revision? .mergepoint - the branch that has been merged from (if present in rlog output) or None .branchpoints - the branches that start at the current entry or empty cK@st|_|jj|dS(N(tFalset synthetict__dict__tupdate(tselftentries((s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pyt__init__1s c@s?fdtjD}dtjdj|fS(Nc3@s&|]}d|j|fVqdS(s%s=%rN(R (t.0tk(R(s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pys 6ss%s(%s)s, (tsortedR ttypet__name__tjoin(Rtitems((Rs9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pyt__repr__5s(Rt __module__t__doc__RR(((s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pyR s tlogerrorcB@seZRS((RR(((s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pyR9scC@s_|jd}|djd}d}|dkr=|}n|d|djd|}|S(s^Return the repository path from a CVS path. >>> getrepopath(b'/foo/bar') '/foo/bar' >>> getrepopath(b'c:/foo/bar') '/foo/bar' >>> getrepopath(b':pserver:10/foo/bar') '/foo/bar' >>> getrepopath(b':pserver:10c:/foo/bar') '/foo/bar' >>> getrepopath(b':pserver:/foo/bar') '/foo/bar' >>> getrepopath(b':pserver:c:/foo/bar') '/foo/bar' >>> getrepopath(b':pserver:truc@foo.bar:/foo/bar') '/foo/bar' >>> getrepopath(b':pserver:truc@foo.bar:c:/foo/bar') '/foo/bar' >>> getrepopath(b'user@server/path/to/repository') '/path/to/repository' t:it@it/(tsplittfind(tcvspathtpartst atpositiontstarttrepopath((s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pyt getrepopath<s  tc>@s ifd}|jtdg}tjd}tjd}tjd} tjd} tjd} tjd} tjd } tjd }tjd }tjd }tjd }tjd}tjd}d}|dhkryIttjjdddj j }|}|dkrKd}nWn#t k rqt tdnX|r|j tj r|tj7}ny.ttjjdddj j }Wqt k rqXn|stjjdd}ng}dh}|rtjjd}tjj|sDtj|n|jd|dg}g|D]'}|rddjtjd|^qd}tjj|djg|D]}|r|^q}n|dkry|jtd|tjt|d}xa|D]Y}tj|doItj|d oItj|d!s|jtd"g}PqqW|jtd#t|Wn*tk r}|jtd$|nX|r|d%j}t j!|d&}qnd'd(g}|r\|j"d)|tj#t$|}|j d*s7|d*7}n|rS|tj#|}q\|}n|j"d+d,g||r|j"d-|n|j"|i}i}i}d.} t%}!g|D]}"t&j'|"^q}|jtd/d0j||j(d1|||ft&j)d0j|d}#tj*|#j+}$x t,r%|$}%|%dkrcPntj*|#j+}$|%j d2r|%d% }%n| d.kr|j-|%}&|&rg|&j.d3}'i}|r[tj#|'d4 }(|(j/|r|(t|}(n|(j/d*r!|(d3}(n|(j/d5r=|(d6}(n|(j0d7d*}(d8} qGnd3} qGn|j-|%}&|&rt |&j.d3n| j-|%}&|&rt |&j.d8n| j-|%r t |%q n| d3kr6| j-|%}&|&st1td9tj#|&j.d3}(d8} nX| d8krc| j-|%r i}d:} q n+| d:kr| j-|%}&|&r`g|&j.d8jdD]})t2|)^q}*t|*}+|+d:kr|+d8d.kr|*d4d.kr|*d4 |*d%}*nt3|*}*|*|kr'g||*t4d?||'d@||(dAt3g|&j.d3jdD]})t2|)^qI dBgdCdhd dhd!dhdt5}d6} n| d6kr |j-|%}&|&s t1tdD|&j.d3},|,d8d*kr dE|,},nt|,jd:kr |,dF},nt j6|,dGdHdIg|_||&j.d8|_7|&j.d:j8dJk|_9|&j.d;r |&j.d6r t2|&j.d;t2|&j.d6f|_:q t2|&j.d;d.f|_:n9|&j.d6r d.t2|&j.d6f|_:n dh|_:|&j.dKr5 |&j.dL|_;n|&j.dMr |&j.dNjd}-t|-d8krz dO|_<q dj|-d4 dP|-d4g}-g|D]}.||.|-kr |.^q }/t|/d3ks t1dQ|j<|/d.|_<ng|_=dK} n| dKkr |j-|%}0|0r g|0j.d3jdRD]:})t3g|)j jdD]}1t2|1^qd ^qE |_>dL} q |j-|%r |j-|$r d;} t,}!q |j-|%r d.} t,}!q |j=j"|%n| dLkr |j-|%r] |$}2|2j d2r, |2d% }2n|j-|2rJ d;} t,}!q |j=j"|%q |j-|%r{ d.} t,}!q |j=j"|%n|!r|j9r|j?d%d3krt|j=d3kr|j-|j=d.r|j(dS|j@|j=d.ft,|_An|!rGt%}!tBg|j|j?gD]})||)^q-|_C|d2j|j=|_=t|j?}+|+d:kr|+d8d.kr|j|j?d% dhgd.|_Dn dh|_Dt5}3x|jED]\}4}5t3g|5jdD]}6t2|6^q}7t|7d8kr(qn|7d4d.krr|7d%d8d.krr|7d4 |j?kr|3jF|4qq|7dikr|7|j>kr|3jF|4qqqW|3|_G|j"||j@||j@j0d7d*(Cannot access.+CVSROOT)|(can't create temporary directory.+)$sWorking file: (.+)$ssymbolic names:s (.+): ([\d.]+)$s----------------------------$sN=============================================================================$s(revision ([\d.]+)(\s+locked by:\s+.+;)?$sdate:\s+(.+);\s+author:\s+(.+);\s+state:\s+(.+?);(\s+lines:\s+(\+\d+)?\s+(-\d+)?;)?(\s+commitid:\s+([^;]+);)?(.*mergepoint:\s+([^;]+);)?sbranches: (.+);$s+file [^/]+ was (initially )?added on branchR(tCVSt Repositorytrbt.snot a CVS sandboxtRoottCVSROOTs ~/.hg.cvspsRtcachet-s\w+Rsreading cvs log cache %s t branchpointstcommitidt mergepointsignoring old cache scache has %d log entries serror reading cache: %r is%Y/%m/%d %H:%M:%S %1%2tcvss-qs-d%sRtlogtrlogs-d>%sis running %s t sprefix=%r directory=%r root=%r s iisAttic/is/Attic/is)RCS file must be followed by working fileiiis!must have at least some revisionssexpected revision numbertrcstfiletrevisiontbranchestparents&revision must be followed by date linet19s UTCs%y/%m/%d %H:%M:%Ss%Y/%m/%d %H:%M:%Ss%Y-%m-%d %H:%M:%Stdeadiii i tHEADt0sunknown branch: %st;s#found synthetic revision in %s: %r ids%d %siPtkeycS@s|j|jfS(N(R<R>(tx((s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pytscS@s|j|jfS(N(R<R>(RG((s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pyRHscS@s|jS(N(tdate(RG((s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pyRHss>log cache overlaps with new log entries, re-run without cache.swriting cvs log cache %s twbs%d log entries tconvertscvsps.logencodingcS@sdjtjtj|S(NR0(RRtmaplisttbytestr(tr((s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pytrevstrssutf-8stranscoding by %s: %s of %s thints-check convert.cvsps.logencoding configurations6no encoding can transcode CVS log message for %s of %stcvslogN(iii(XtstatusRtretcompiletNonetopentostpathRtreadtstriptIOErrorRtendswithRtossepRtenvirontgett expandusertexiststmkdirR tfindalltnotetpickletloadRt safehasattrtlent ExceptionRIRtdatestrtappendtnormpathR'R Rt shellquotetdebugtpopent fromnativeeoltreadlinetTruetmatchtgroupt startswithtreplacetAssertionErrortintttupleR tsett parsedatetauthortlowerRBtlinesR6R7tcommentR?R>R<R Rttagstbrancht iteritemstaddR5R tellipsisR=tsortR@tdumpt configlisttdecodetsysstrtencodet debugflagtUnicodeDecodeErrort LookupErrorRtAbortR(>tuit directorytrootR:R3R,R9tre_00tre_01tre_02tre_03tre_10tre_20tre_30tre_31tre_32tre_50tre_60tre_70t file_added_retprefixtoldlogRItcachedirt cachefileR*tetcmdtpRt branchmaptrcsmaptstatetstoretargtpfptpeektlineRsR<tfilenameRGtrevtrevntdtmyrevtbR?tmtytcpeekR5RR>titrevpartstversionst encodingsROtentryRtinst((R+s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pyt createlogcsV *   .  4 .  !     "            1 ,       %  1      0!!  !)    Y           7&  .$   (                  t changesetcB@s eZdZdZdZRS(sClass changeset has the following attributes: .id - integer identifying this changeset (list index) .author - author name as CVS knows it .branch - name of branch this changeset is on, or None .comment - commit message .commitid - CVS commitid or None .date - the commit date as a (time,tz) tuple .entries - list of logentry objects in this changeset .parents - list of one or two parent changesets .tags - list of tags on this changeset .synthetic - from synthetic revision "file ... added on branch ..." .mergepoint- the branch that has been merged from or None .branchpoints- the branches that start at the current entry or empty cK@s&d|_t|_|jj|dS(N(RUtidR R R R(RR((s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pyR(s  c@s?fdtjD}dtjdj|fS(Nc3@s&|]}d|j|fVqdS(s%s=%rN(R (RR(R(s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pys .ss%s(%s)s, (RR RRR(RR((Rs9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pyR-s(RRRRR(((s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pyRs i<c@s|jtdix\|D]T}|jr |jkrQ|j|jR<R_RUR@RwRRhR=R5(RRNRtleRRStc(todd(s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pytcscmps:  $D$c3@s%|]}|kr|VqdS(N((Rttag(Rt globaltags(s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pys ss{{mergetobranch ([-\w]+)}}s{{mergefrombranch ([-\w]+)}}s0synthetic changeset cannot have multiple parentsRCsBwarning: CVS commit message references non-existent branch %r: %s s&convert-repo: CVS merge from branch %sRtparentsis)changeset %d is both before and after %d s%d changeset entries t cvschangesetst changesetsN(/RRRR6RIRRRzRUt enumerateR5RR|RR=RR7RkRhtreprR RRRR t functoolst cmp_to_keyRRRRSRTR<R>RtxrangeRRwtsearchRttKeyErrortwarnRMtgroupstinsertRRRr(RR9tfuzzt mergefromtmergetoRRtfilesRttRRRRRR?RtfRt candidateRtccRRN((RRRRs9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pytcreatechangeset1s  ' !$  &# ,    0   &                   %           c O@s&tj|}|dr"d}n|dr5d}nd }|d}yc|rg}xP|D])}|t||d|dd|7}q[Wnt|d|dd|}Wn%tk r}|jd|d SXt|||d }~t|} i} i} x|D]} |d r| j| kru| j ru| j d j ru|| j d j d j| j d j f| | j|rp| |\}}|jd!|p[d|| |fq3W|r|jd"dj|qn|jd#|jd$| j|jd%x| jD]}|j}|j|d&r|t|d&}n|jd'|d(jg|jD]}d|^q$p@d)d(jg|jD]}d|^qPdd*g|jfqW|jd+n|r| r|d d| j ks|d | jkrt} qnt|d kr| r|d d| j ks|d | jkrPqqqWd S(,sRead CVS rlog for current directory or named path in repository, and convert the log to changesets based on matching commit log entries and dates. t new_cachetwritet update_cacheRt revisionsRR3s%r NRt ancestorsiiR?RCs--------------------- s PatchSet %d s Date: %s s%Y/%m/%d %H:%M:%S %1%2s Author: %s s Branch: %s s Tag%s: %s R(R*t,s(none)sBranchpoints: %s s, Rs Parents: %s s%ds Parent: %d s%s:%d:%dsAncestors: %s sLog: s%s s Members: Rs %s:%s->%s%s R0tINITIALs(DEAD)s (Rt byteskwargsRURRRRRhRRRRRjRIR|RRR5RRkRRR=RuR@R>RBR (RtargstoptsR3RR9RRRtoffR?RtcsRRRNRRtfnRG((s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pyt debugcvspsas      *    (#  %   1   (     ,&  (t __future__RRRWRStmercurial.i18nRt mercurialRRRRRtmercurial.utilsRRR RetobjectR RiRR'RURrRRRR(((s9/usr/lib64/python2.7/site-packages/hgext/convert/cvsps.pyts    (  '1