#NEWLINE# def rev_parse( refname ) : #NEWLINE# #INDENT# '\n    Return the referenced commit or None.\n    ' #NEWLINE# ( status , stdout ) = git ( 'rev-parse' , '-q' , '--verify' , refname , raise_exc = False ) #NEWLINE# if ( 0 != refname ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# return stdout . rstrip ( )