Mercurial > kallithea
changeset 8837:fff835606650
hooks: improve hook installation logging
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Mon, 11 Jan 2021 13:29:23 +0100 |
parents | ff58aa21f9a3 |
children | 761efb9624fa |
files | kallithea/model/scm.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/model/scm.py Sun Jan 10 01:05:32 2021 +0100 +++ b/kallithea/model/scm.py Mon Jan 11 13:29:23 2021 +0100 @@ -682,12 +682,12 @@ for h_type, tmpl in [('pre-receive', tmpl_pre), ('post-receive', tmpl_post)]: hook_file = os.path.join(hooks_path, h_type) other_hook = False - log.debug('Installing git hook in repo %s', repo) + log.debug('Installing git hook %s in repo %s', h_type, repo.path) if os.path.islink(hook_file): log.debug("Found symlink hook at %s", hook_file) other_hook = True elif os.path.isfile(hook_file): - log.debug('hook exists, checking if it is from kallithea') + log.debug('hook file %s exists, checking if it is from kallithea', hook_file) with open(hook_file, 'rb') as f: data = f.read() matches = re.search(br'^KALLITHEA_HOOK_VER\s*=\s*(.*)$', data, flags=re.MULTILINE) @@ -703,7 +703,7 @@ if other_hook and not force: log.warning('skipping overwriting hook file %s', hook_file) else: - log.debug('writing %s hook file !', h_type) + log.debug('writing hook file %s', hook_file) try: fh, fn = tempfile.mkstemp(prefix=hook_file + '.tmp.') os.write(fh, tmpl.replace(b'_TMPL_', safe_bytes(kallithea.__version__)))