Migrate sha -> rev

This commit is contained in:
Anthony Sottile 2018-02-24 18:42:51 -08:00
parent 184e22e81f
commit 5651c66995
19 changed files with 215 additions and 107 deletions

View file

@ -78,11 +78,11 @@ def config_with_local_hooks():
))
def make_config_from_repo(repo_path, sha=None, hooks=None, check=True):
def make_config_from_repo(repo_path, rev=None, hooks=None, check=True):
manifest = load_manifest(os.path.join(repo_path, C.MANIFEST_FILE))
config = OrderedDict((
('repo', 'file://{}'.format(repo_path)),
('sha', sha or git.head_sha(repo_path)),
('rev', rev or git.head_rev(repo_path)),
(
'hooks',
hooks or [OrderedDict((('id', hook['id']),)) for hook in manifest],