69 base_dir =
'deps/github_hashes/' 70 for dirname, _, files
in os.walk(base_dir):
71 for filename
in files:
72 path = os.path.join(dirname, filename)
74 m_proj = re.match(
'^' + base_dir +
'(.*)-rev\.txt$', path)
76 raise RuntimeError(
'Not a hash file? {0}'.
format(path))
77 m_hash = re.match(
'^Subproject commit ([0-9a-f]+)\n$', f.read())
79 raise RuntimeError(
'No hash in {0}'.
format(path))
80 yield m_proj.group(1), m_hash.group(1)
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
def _read_project_github_hashes()