³ò
{'ïMc        	   @   s™   d  Z  d d k Z d d k Td d k Z d d k Z d d k l Z l Z d d k l	 Z	 d Z
 d „  Z d e f d	 „  ƒ  YZ d
 e f d „  ƒ  YZ d S(   s   Contains library functionsiÿÿÿÿN(   t   *(   t   GitCmdObjectDBt   GitDB(   t   Repot   GIT_PYTHON_TEST_GIT_REPO_BASEc         C   s9   y t  i |  SWn# t j
 o t d |  ƒ ‚ n Xd S(   s@   :return: resolved environment variable or raise EnvironmentErrors0   Please set the %r envrionment variable and retryN(   t   ost   environt   KeyErrort   EnvironmentError(   t   env_var(    (    s=   /home/byron/projects/git-python03/git/test/performance/lib.pyt   resolve_or_fail   s    t   TestBigRepoRc           B   s)   e  Z d  Z d Z d Z e d „  ƒ Z RS(   s  TestCase providing access to readonly 'big' repositories using the following 
	member variables:
	
	* gitrorepo
	
	 * Read-Only git repository - actually the repo of git itself
	 
    * puregitrorepo
    
     * As gitrepo, but uses pure python implementation
    t(   235d521da60e4699e5bd59ac658b5b48bd76ddcat(   32347c375250fd470973a5d76185cac718955fd5c         C   sM   t  t |  ƒ i ƒ  t t ƒ } t | d t ƒ|  _ t | d t ƒ|  _	 d  S(   Nt   odbt(
   t   superR   t   setUpAllR
   t   k_env_git_repoR   R   t	   gitrorepoR   t   puregitrorepo(   t   clst	   repo_path(    (    s=   /home/byron/projects/git-python03/git/test/performance/lib.pyR   5   s    (   t   __name__t
   __module__t   __doc__t   head_sha_2kt   head_sha_50t   classmethodR   (    (    (    s=   /home/byron/projects/git-python03/git/test/performance/lib.pyR   #   s   t   TestBigRepoRWc           B   s,   e  Z d  Z e d „  ƒ Z e d „  ƒ Z RS(   sw   As above, but provides a big repository that we can write to.
	
	Provides ``self.gitrwrepo`` and ``self.puregitrwrepo``c         C   sl   t  t |  ƒ i ƒ  t i ƒ  } t i | ƒ |  i i | d t	 d t	 d t
 ƒ|  _ t | d t ƒ|  _ d  S(   Nt   sharedt   bareR   (   R   R   R   t   tempfilet   mktempR   t   mkdirR   t   clonet   TrueR   t	   gitrwrepoR   R   t   puregitrwrepo(   R   t   dirname(    (    s=   /home/byron/projects/git-python03/git/test/performance/lib.pyR   B   s
    'c         C   s   t  i |  i i ƒ d  S(   N(   t   shutilt   rmtreeR$   t   working_dir(   R   (    (    s=   /home/byron/projects/git-python03/git/test/performance/lib.pyt   tearDownAllJ   s    (   R   R   R   R   R   R*   (    (    (    s=   /home/byron/projects/git-python03/git/test/performance/lib.pyR   =   s   (   R   R   t   git.test.libR'   R   t   git.dbR   R   t   gitR   R   R
   t   TestBaseR   R   (    (    (    s=   /home/byron/projects/git-python03/git/test/performance/lib.pys   <module>   s   
	