Hacked By AnonymousFox
�
��Yc @@ s� d d l m Z d d l Z y d d l Z Wn e k
rE d Z n Xd d l m Z d d l m
Z
d
Z d d � Z d � Z
d S( i ( t absolute_importN( t text_typei ( t InvalidGitRepositoryt
fetch_git_shat fetch_package_versionc
C@ s? | s� t j j | d d � } t j j | � sF t d | f � � n t | d � � } t | j � � j � } Wd QX| j d � r� | d } t j j | d | j
d � � } q� | Sn t j j | d d d
| � } t j j | � st j j t j j | d � � s!t d | f � � n t j j | d d � } t j j | � r�t | d � �� } x� | D]} } | j � } | s�qdn | d
d k r�qdn y | j
d d
� \ } } Wn t k
r�qdn X| | k rdt | � SqdWWd QXn t d | f � � n t | d � } z t | j � � j � SWd | j
� Xd S( s6
>>> fetch_git_sha(os.path.dirname(__file__))
s .gitt HEADs- Cannot identify HEAD for git repository at %st rNs ref: i t /t refst headss3 %s does not seem to be the root of a git repositorys packed-refsi t #t ^t s- Unable to find ref to head "%s" in repository( R
R ( t ost patht joint existsR t openR t readt stript
startswitht splitt rstript
ValueErrort close(
R t headt head_patht fpt
revision_filet packed_filet fht linet revisiont ref( ( sA /opt/alt/python27/lib/python2.7/site-packages/raven/versioning.pyR sL
!
c C@ s1 t d k r t d � � n t j | � } | j S( s-
>>> fetch_package_version('sentry')
s5 pkg_resources is not available on this Python installN( t
pkg_resourcest Nonet NotImplementedErrort get_distributiont version( t dist_namet dist( ( sA /opt/alt/python27/lib/python2.7/site-packages/raven/versioning.pyR I s ( R R ( t
__future__R t os.pathR
R"