def get_vcs_root(path):
 previous_path = path
 while (get_vcs_info(path) is None):
  path = abspardir(path)
  if (path == previous_path):
   return
  else:
   previous_path = path
 return osp.abspath(path)

def get_vcs_root ( path ) : previous_path = path while ( get_vcs_info ( path ) is None ) : path = abspardir ( path ) if ( path == previous_path ) : return else : previous_path = path return osp . abspath ( path )
return vcs root directory path return none if path is not within a supported vcs repository .