Hacked By AnonymousFox

Current Path : /opt/alt/python27/lib/python2.7/site-packages/raven/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/raven/versioning.pyc

�
��Yc@@s�ddlmZddlZyddlZWnek
rEdZnXddlmZddl	m
Z
d
Zdd�Zd	�Z
dS(i(tabsolute_importN(t	text_typei(tInvalidGitRepositoryt
fetch_git_shatfetch_package_versionc
C@s?|s�tjj|dd�}tjj|�sFtd|f��nt|d��}t|j��j�}WdQX|j	d�r�|d}tjj|d|j
d��}q�|Sntjj|dd	d
|�}tjj|�stjjtjj|d��s!td|f��ntjj|dd�}tjj|�r�t|d���}x�|D]}}|j�}|s�qdn|d
 dkr�qdny|j
dd
�\}}	Wntk
r�qdnX|	|krdt|�SqdWWdQXntd|f��nt|d�}zt|j��j�SWd|j
�XdS(s6
    >>> fetch_git_sha(os.path.dirname(__file__))
    s.gittHEADs-Cannot identify HEAD for git repository at %strNsref: it/trefstheadss3%s does not seem to be the root of a git repositoryspacked-refsit#t^t s-Unable to find ref to head "%s" in repository(R
R(tostpathtjointexistsRtopenRtreadtstript
startswithtsplittrstript
ValueErrortclose(
Rtheadt	head_pathtfpt
revision_filetpacked_filetfhtlinetrevisiontref((sA/opt/alt/python27/lib/python2.7/site-packages/raven/versioning.pyRsL
	!

cC@s1tdkrtd��ntj|�}|jS(s-
    >>> fetch_package_version('sentry')
    s5pkg_resources is not available on this Python installN(t
pkg_resourcestNonetNotImplementedErrortget_distributiontversion(t	dist_nametdist((sA/opt/alt/python27/lib/python2.7/site-packages/raven/versioning.pyRIs(RR(t
__future__Rtos.pathR
R"tImportErrorR#traven.utils.compatRt
exceptionsRt__all__RR(((sA/opt/alt/python27/lib/python2.7/site-packages/raven/versioning.pyt<module>s

8

Hacked By AnonymousFox1.0, Coded By AnonymousFox