Mercurial > kallithea
changeset 8767:817dcce30d67
diff: slightly better error message for "diff not recognized as valid"
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Sat, 14 Nov 2020 15:18:05 +0100 |
parents | c3b6ad713a0f |
children | fd61f678577f |
files | kallithea/lib/diffs.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/diffs.py Thu Dec 03 11:16:44 2020 +0100 +++ b/kallithea/lib/diffs.py Sat Nov 14 15:18:05 2020 +0100 @@ -567,7 +567,7 @@ elif vcs == 'hg': match = _hg_header_re.match(diff_chunk) if match is None: - raise Exception('diff not recognized as valid %s diff' % vcs) + raise Exception('diff not recognized as valid %s diff: %r' % (vcs, safe_str(bytes(diff_chunk[:1000])))) meta_info = {k: None if v is None else safe_str(v) for k, v in match.groupdict().items()} rest = diff_chunk[match.end():] if rest: