‡Æ
%Nö9c       s®     d  Z    d k Z  d k Z  d k Z  d k Z  d k T
 d f  d „  ƒ  YZ – d „  Z £ d „  Z ± d „  Z	 º d „  Z
 È e d	 j o É e
 ƒ  n d S(
   s)   A class to build directory diff tools on.N(   s   *s   dircmpc      s†   
 d  Z    d „  Z  d „  Z ! d „  Z 0 d „  Z T d „  Z Y d „  Z g d „  Z m d „  Z  d	 „  Z	  d
 „  Z
 RS(   s   Directory comparison class.c    sS      | |  _   | |  _  t i t i g |  _  d d g |  _  |  Sd S(   s   Initialize.s   RCSs   tagsN(   s   as   selfs   bs   oss   curdirs   pardirs   hides   ignore(   s   selfs   as   bs+   /mit/python/lib/python2.0/lib-old/dircmp.pys   new s   c    s™      t  t i |  i ƒ |  i ƒ |  _  t  t i |  i ƒ |  i ƒ |  _  |  i i	 ƒ   |  i i	 ƒ   |  i
 ƒ   |  i ƒ   |  i ƒ  d S(   s0   Compare everything except common subdirectories.N(   s   filters   dircaches   listdirs   selfs   as   hides   a_lists   bs   b_lists   sorts   phase1s   phase2s   phase3(   s   selfs+   /mit/python/lib/python2.0/lib-old/dircmp.pys   run s   $$c    sÍ   ! " # g  |  _ $ g  |  _ % xS |  i d % rC } & | |  i j o ' |  i i | ƒ n ) |  i i | ƒ q- W+ g  |  _ , x@ |  i d , r0 } - | |  i j o . |  i i | ƒ n q’ Wd S(   s   Compute common names.i    N(   s   selfs   a_onlys   commons   a_lists   xs   b_lists   appends   b_only(   s   selfs   xs+   /mit/python/lib/python2.0/lib-old/dircmp.pys   phase1! s    	 	c 
   sØ  0 1 2 g  |  _ 3 g  |  _ 4 g  |  _ 6 x¤|  i d 6 r”} 7 t i i |  i	 | ƒ } 8 t i i |  i | ƒ } : d } ; y < t i | ƒ } Wn$ = t i j
 o } ? d } n X@ y A t i | ƒ } Wn$ B t i j
 o } D d } n XF | o² G t | t ƒ } H t | t ƒ }	 I | |	 j o J |  i i | ƒ nb K t | ƒ o L |  i i | ƒ n; M t | ƒ o N |  i i | ƒ n P |  i i | ƒ n R |  i i | ƒ q9 Wd S(   s(   Distinguish files, directories, funnies.i    i   N(   s   selfs   common_dirss   common_filess   common_funnys   commons   xs   oss   paths   joins   as   a_paths   bs   b_paths   oks	   statcaches   stats   a_stats   errors   whys   b_stats   S_IFMTs   ST_MODEs   a_types   b_types   appends   S_ISDIRs   S_ISREG(
   s   selfs   xs   a_paths   b_paths   oks   a_stats   whys   b_stats   a_types   b_types+   /mit/python/lib/python2.0/lib-old/dircmp.pys   phase20 s8    		
c    sC   T U V t  |  i |  i |  i ƒ } W | \ |  _ |  _ |  _ d S(   s*   Find out differences between common files.N(	   s   cmpfiless   selfs   as   bs   common_filess   xxs
   same_filess
   diff_filess   funny_files(   s   selfs   xxs+   /mit/python/lib/python2.0/lib-old/dircmp.pys   phase3T s   c    s¶   Y ] ^ h  |  _ _ xš |  i d _ rŠ } ` t i i |  i | ƒ } a t i i |  i	 | ƒ } b t ƒ  i | | ƒ |  i | <} c |  i | _ d |  i | _ e | i ƒ  q! Wd S(   sü   Find out differences between common subdirectories.
        A new dircmp object is created for each common subdirectory,
        these are stored in a dictionary indexed by filename.
        The hide and ignore properties are inherited from the parent.i    N(   s   selfs   subdirss   common_dirss   xs   oss   paths   joins   as   a_xs   bs   b_xs   dircmps   news   newdds   hides   ignores   run(   s   selfs   xs   a_xs   b_xs   newdds+   /mit/python/lib/python2.0/lib-old/dircmp.pys   phase4Y s    	#c    sM   g h i |  i ƒ  j x0 |  i i ƒ  d j r } k |  i | i ƒ  q( Wd S(   s,   Recursively call phase4() on subdirectories.i    N(   s   selfs   phase4s   subdirss   keyss   xs   phase4_closure(   s   selfs   xs+   /mit/python/lib/python2.0/lib-old/dircmp.pys   phase4_closureg s
    	c    s  m n q d G|  i G|  i GHr |  i o s d G|  i Gd G|  i GHn t |  i o u d G|  i Gd G|  i GHn v |  i o w d G|  i GHn x |  i o y d G|  i GHn z |  i o { d G|  i GHn | |  i o } d G|  i GHn ~ |  i	 o  d G|  i	 GHn d	 S(
   s2   Print a report on the differences between a and b.s   diffs   Only ins   :s   Identical files :s   Differing files :s   Trouble with common files :s   Common subdirectories :s   Common funny cases :N(
   s   selfs   as   bs   a_onlys   b_onlys
   same_filess
   diff_filess   funny_filess   common_dirss   common_funny(   s   selfs+   /mit/python/lib/python2.0/lib-old/dircmp.pys   reportm s    c    s„    ƒ „ |  i ƒ  … y † |  i } Wn ‡ t j
 o ˆ d Sn X‰ x4 |  i i ƒ  d ‰ r } Š H‹ |  i | i ƒ  q[ Wd S(   si   Print reports on self and on subdirs.
        If phase 4 hasn't been done, no subdir reports are printed.Ni    (   s   selfs   reports   subdirss   xs   AttributeErrors   keyss   report_closure(   s   selfs   xs+   /mit/python/lib/python2.0/lib-old/dircmp.pys   report_closure s    	c    s^    Ž  |  i ƒ   |  i ƒ  ‘ x4 |  i i ƒ  d ‘ r } ’ H“ |  i | i ƒ  q5 Wd S(   s"   Report and do phase 4 recursively.i    N(   s   selfs   reports   phase4s   subdirss   keyss   xs   report_phase4_closure(   s   selfs   xs+   /mit/python/lib/python2.0/lib-old/dircmp.pys   report_phase4_closure s    	(   s   __doc__s   news   runs   phase1s   phase2s   phase3s   phase4s   phase4_closures   reports   report_closures   report_phase4_closure(    s+   /mit/python/lib/python2.0/lib-old/dircmp.pys   dircmp
 s   	

$c    sw   – ›  g  g  g  f } ž xN | d ž rA } Ÿ | t t i i |  | ƒ t i i | | ƒ ƒ i	 | ƒ q$ W  | Sd S(   s¦   Compare common files in two directories.
    Return:
        - files that compare equal
        - files that compare different
        - funny cases (can't stat etc.)i    N(
   s   ress   commons   xs   cmps   oss   paths   joins   as   bs   append(   s   as   bs   commons   ress   xs+   /mit/python/lib/python2.0/lib-old/dircmp.pys   cmpfiles– s    	?c    s\   £ ¨ ª y, « t  i |  | ƒ o « d Sn ¬ d SWn  ­ t i j
 o ® d Sn Xd S(   sw   Compare two files.
    Return:
        0 for equal
        1 for different
        2 for funny cases (can't stat, etc.)i    i   i   N(   s   cmpcaches   cmps   as   bs   oss   error(   s   as   bs+   /mit/python/lib/python2.0/lib-old/dircmp.pys   cmp£ s    c    sW   ± ² ´ g  } µ x7 |  d µ r* } ¶ | | j o ¶ | i | ƒ n q W· | Sd S(   s4   Return a copy with items that occur in skip removed.i    N(   s   results   lists   items   skips   append(   s   lists   skips   results   items+   /mit/python/lib/python2.0/lib-old/dircmp.pys   filter± s   	 	 c     sÎ   º » ½ d k  }  ¾ d k } ¿ | i |  i d d ƒ \ } } À t | ƒ d j o À | i d ‚ n Á t ƒ  i | d | d ƒ } Â | i
 ƒ  Ã d d f | j o Ä | i ƒ  n Æ | i ƒ  d S(	   s   Demonstration and testing.Ni   s   ri   s   need exactly two argsi    s   -rs    (   s   syss   getopts   argvs   optionss   argss   lens   errors   dircmps   news   dds   runs   report_phase4_closures   report(   s   syss   getopts   optionss   argss   dds+   /mit/python/lib/python2.0/lib-old/dircmp.pys   demoº s   "  s   __main__(   s   __doc__s   oss   dircaches   cmpcaches	   statcaches   stats   dircmps   cmpfiless   cmps   filters   demos   __name__(    s+   /mit/python/lib/python2.0/lib-old/dircmp.pys   ? s   
Œ	