ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ ]c@sDdZddlZddlmZddlmZyddlmZWn!ek riddlmZnXddlZddl Z dddd d d gZ de fd YZ defd YZ de fdYZd efdYZddedZedZdddZdddZdZdZdS(s Module to find differences over time in a filesystem Basically this takes a snapshot of a directory, then sees what changes were made. The contents of the files are not checked, so you can detect that the content was changed, but not what the old version of the file was. iN(tfnmatch(tdatetime(tIterableUserDicttDifftSnapshottFiletDirtreport_expected_diffst show_diffcBs8eZdZdZdZdZeedZRS(s9 Represents the difference between two snapshots cCs ||_||_|jdS(N(tbeforetaftert _calculate(tselfR R ((sC/opt/alt/python27/lib/python2.7/site-packages/paste/debug/fsdiff.pyt__init__s  cCs|jj}|jj}i|_i|_|j|_xm|jD]_\}}||krq||j|\}}}|ro|jd||j }|j d}x|D]\}} dt ||dd d t } |}|r| j d kr| d | j 7} n|rg} |jj|rJ| j|j|jn|jj|rv| j|j|jn| d djtt| 7} n|j| qWqoqoWt|dkr|jdndj|S(NsDifference in %s from %s to %s:RRRs-- %s: -------------------ts %stindentit include_sepsN/As (%s bytes)s (mtime: %s)s->is (no changes)s (tappendR t base_patht calculatedR RtTrueRRRtsortt _space_prefixtFalsetsizetgetRtjointmaptreprtlen( R theadertdateststnametfilest show_sizetlastRRtttparts((sC/opt/alt/python27/lib/python2.7/site-packages/paste/debug/fsdiff.pyR5s@   "   #( t__name__t __module__t__doc__R R RRR"R(((sC/opt/alt/python27/lib/python2.7/site-packages/paste/debug/fsdiff.pyRs    cBszeZdZd d d edZdZdZdZdZdZ e j d d e dZ dZd ZRS( sx Represents a snapshot of a set of files. Has a dictionary-like interface, keyed relative to ``base_path`` cCsY||_||_||_||_d|_|p6i|_|dkrU|jndS(N(Rtignore_wildcardst ignore_hiddent ignore_pathstNoneRRt find_files(R RR-R5R7R6((sC/opt/alt/python27/lib/python2.7/site-packages/paste/debug/fsdiff.pyR ^s      cCs&|jd|jtj|_dS(s_ Find all the files under the base path, and put them in ``self.data`` RN(t_find_traverseRRtnowR(R ((sC/opt/alt/python27/lib/python2.7/site-packages/paste/debug/fsdiff.pyR9mscCsf||jkrtS|jr;tjj|jdr;tSx$|jD]}t||rEtSqEWt S(Nt.( R7RR6tosRtbasenamet startswithR5RR"(R tfntpat((sC/opt/alt/python27/lib/python2.7/site-packages/paste/debug/fsdiff.pyt _ignore_fileus$cCs?||jkrtS|jr;tjj|jdr;tStS(NR<(R7RR6R=RR>R?R"(R R@((sC/opt/alt/python27/lib/python2.7/site-packages/paste/debug/fsdiff.pyRBs $cCstjj|j|}tjj|r|rIt|j|||s(no calculation done)(t __class__R2RR(R ((sC/opt/alt/python27/lib/python2.7/site-packages/paste/debug/fsdiff.pyt__repr__sc CsAi}x4|D],}|}|jd}||jkrb|rL||} nd} | ||d|GH|GH||ks>tndS(NsCould not find %r in:(RRKtAssertionError(R R+t__tracebackhide__RK((sC/opt/alt/python27/lib/python2.7/site-packages/paste/debug/fsdiff.pyt mustcontains    cCsd|jj|j|jfS(Ns <%s %s:%s>(RGR2RR(R ((sC/opt/alt/python27/lib/python2.7/site-packages/paste/debug/fsdiff.pyRHs (R2R3R4RRTR"tdirR RctpropertyRKRdRgRH(((sC/opt/alt/python27/lib/python2.7/site-packages/paste/debug/fsdiff.pyRs    cBsAeZdZeZeZdZdZdZ e e Z RS(s6 Represents a directory created by a command. cCs@||_||_tjj|||_d|_d|_dS(NsN/A(RRR=R%RFR#R(R RR((sC/opt/alt/python27/lib/python2.7/site-packages/paste/debug/fsdiff.pyR s    cCsd|jj|j|jfS(Ns <%s %s:%s>(RGR2RR(R ((sC/opt/alt/python27/lib/python2.7/site-packages/paste/debug/fsdiff.pyRHs cCstd|dS(Ns!Directory %r doesn't have content(tNotImplementedError(R ((sC/opt/alt/python27/lib/python2.7/site-packages/paste/debug/fsdiff.pyRc!s( R2R3R4R"RTRRhR RHRcRiRK(((sC/opt/alt/python27/lib/python2.7/site-packages/paste/debug/fsdiff.pyR s   cCs|dkrtjj}n|j|}|j|}g}x|r|r|d|dkr|dkr|jdt|dt|n|jd||jd|jdqBW|r |rdj|||j|Sdj||j|Sn |j|SdS(s Anything shared by pref and full will be replaced with spaces in full, and full returned. Example:: >>> _space_prefix('/foo/bar', '/foo') ' /bar' it RN( R8R=RtseptsplitRR(tpopR%(tprefRFRlRRtpadding((sC/opt/alt/python27/lib/python2.7/site-packages/paste/debug/fsdiff.pyR!(s # ( c Cs|s dS|j}|jg}d}xZ|D]R\}}t||dddt}|rrt|d}n|}t|jdkrjttjd|j d }t |d |}|rY|d 7}x|jD]q}|j j d rt|d }n6|j j dr5t|d}nt|d}||d 7}qWqx|d |7}n|d|7}|j |q3W|j dt|d j|S(sh Takes the output of compare_expected, and returns a string description of the differences. sNo differencesRRiRi is^[ ]*iis t+i t-i iRksFiles with differences: %s(RR R!R"t color_lineR(t splitlinestretsearchtgroupRRJR?RR%( tdiffstcolorizeR+R/RtdescR0t cur_indenttline((sC/opt/alt/python27/lib/python2.7/site-packages/paste/debug/fsdiff.pyRFs8  ! cCs|d kr|d krdSg}|d kr>|jdnF|dkro|jd|jdd|n|jdd||d kr|jdn|jdd |d d j|S( s 0 black 1 red 2 green 3 yellow 4 blue 5 magenta (purple) 6 cyan 7 white (gray) Add 8 to get high-intensity ss[39mis[1ms[%imiis[49mi(sN(R8RR%(t foregroundt backgroundtcodes((sC/opt/alt/python27/lib/python2.7/site-packages/paste/debug/fsdiff.pyt color_codeks     cCsAtjd|}|jdt||||jtS(Ns^(\s*)i(RuRvRwRtend(R|R}R~tmatch((sC/opt/alt/python27/lib/python2.7/site-packages/paste/debug/fsdiff.pyRsscCs.djg|jD]}d||^qS(Ns Rk(R%Rt(Rttexttl((sC/opt/alt/python27/lib/python2.7/site-packages/paste/debug/fsdiff.pyRscCsg|jD]}|jr |j^q }g|jD]}|jr>|j^q>}t|t|kodknrd|d|dfS|sd|Sddl}dj|j||S(Nis %r not %risEmpty; should have: is (RtRJR(tdifflibR%tndiff(RURSRt actual_linestexpected_linesR((sC/opt/alt/python27/lib/python2.7/site-packages/paste/debug/fsdiff.pyRs( (R4R=RRtUserDictRt ImportErrortpaste.util.UserDict24RYRut__all__tobjectRRRRR8RR!R"RRRsRR(((sC/opt/alt/python27/lib/python2.7/site-packages/paste/debug/fsdiff.pyt s*     >y< %