ó
+oÐNc           @   s2   d  Z  d d l m Z m Z d „  Z d „  Z d S(   s(   
Helper functions for dealing with Git.
iÿÿÿÿ(   t   shellt   utilc           C   s   t  j d d d d t ƒS(   sA   Finds the output of git describe --tags of the current directory.t   gitt   describes   --tagst   strip(   R    t   safeCallt   True(    (    (    s8   /afs/athena.mit.edu/contrib/scripts/wizard/wizard/git.pyR      s    c          C   s_   d t  j ƒ  }  y |  d t  j ƒ  7}  Wn t  j k
 r> n Xt j d d d d d |  ƒ d S(	   s|   
    Performs a commit of changes performed during configuration of an install
    with an appropriate logfile message.
    s   Autoinstall configuration.

%ss   
Configured-by: R   t   commits   --allow-emptys   -as   -mN(   R   t   get_git_footert   get_operator_gitt   NoOperatorInfoR    t   call(   t   message(    (    s8   /afs/athena.mit.edu/contrib/scripts/wizard/wizard/git.pyt   commit_configure   s    N(   t   __doc__t   wizardR    R   R   R   (    (    (    s8   /afs/athena.mit.edu/contrib/scripts/wizard/wizard/git.pyt   <module>   s   	