def ver():
 global _ver
 if (not _ver):
  p = subprocess.Popen(['git', '--version'], stdout=subprocess.PIPE)
  gvs = p.stdout.read()
  _git_wait('git --version', p)
  m = re.match('git version (\\S+.\\S+)', gvs)
  if (not m):
   raise GitError(('git --version weird output: %r' % gvs))
  _ver = tuple(m.group(1).split('.'))
 needed = ('1', '5', '3', '1')
 if (_ver < needed):
  raise GitError(('git version %s or higher is required; you have %s' % ('.'.join(needed), '.'.join(_ver))))
 return _ver

def ver ( ) : global _ver if ( not _ver ) : p = subprocess . Popen ( [ 'git' , '--version' ] , stdout = subprocess . PIPE ) gvs = p . stdout . read ( ) _git_wait ( 'git --version' , p ) m = re . match ( 'git version (\\S+.\\S+)' , gvs ) if ( not m ) : raise GitError ( ( 'git --version weird output: %r' % gvs ) ) _ver = tuple ( m . group ( 1 ) . split ( '.' ) ) needed = ( '1' , '5' , '3' , '1' ) if ( _ver < needed ) : raise GitError ( ( 'git version %s or higher is required; you have %s' % ( '.' . join ( needed ) , '.' . join ( _ver ) ) ) ) return _ver
get gits version and ensure a usable version is installed .