Changeset - 817dcce30d67
[Not reviewed]
default
0 1 0
Mads Kiilerich (mads) - 5 years ago 2020-11-14 15:18:05
mads@kiilerich.com
diff: slightly better error message for "diff not recognized as valid"
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/diffs.py
Show inline comments
 
@@ -567,7 +567,7 @@ def _get_header(vcs, diff_chunk):
 
    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:
0 comments (0 inline, 0 general)