# HG changeset patch # User Mads Kiilerich # Date 1418647656 -3600 # Node ID 97ed7d05d3d2c5d03ebf027f62105288e0b06bfa # Parent 11d6d1cec6674bbb9c31716693643eedba50e236 diff: eat trailing tabs in ---/+++ lines of diffs There is usually no date in the diffs we parse but there might still be the tab that was used as separator between filename and date. The a_file and b_file entries are usually not used ... but nice to have them right. diff -r 11d6d1cec667 -r 97ed7d05d3d2 kallithea/lib/diffs.py --- a/kallithea/lib/diffs.py Mon Dec 15 13:47:36 2014 +0100 +++ b/kallithea/lib/diffs.py Mon Dec 15 13:47:36 2014 +0100 @@ -170,8 +170,8 @@ (?:^index[ ](?P[0-9A-Fa-f]+) \.\.(?P[0-9A-Fa-f]+)[ ]?(?P.+)?(?:\n|$))? (?:^(?PGIT[ ]binary[ ]patch)(?:\n|$))? - (?:^---[ ](a/(?P.+)|/dev/null)(?:\n|$))? - (?:^\+\+\+[ ](b/(?P.+)|/dev/null)(?:\n|$))? + (?:^---[ ](a/(?P.+?)|/dev/null)\t?(?:\n|$))? + (?:^\+\+\+[ ](b/(?P.+?)|/dev/null)\t?(?:\n|$))? """, re.VERBOSE | re.MULTILINE) _hg_header_re = re.compile(r""" # has already been split on this: @@ -189,8 +189,8 @@ (?:^index[ ](?P[0-9A-Fa-f]+) \.\.(?P[0-9A-Fa-f]+)[ ]?(?P.+)?(?:\n|$))? (?:^(?PGIT[ ]binary[ ]patch)(?:\n|$))? - (?:^---[ ](a/(?P.+)|/dev/null)(?:\n|$))? - (?:^\+\+\+[ ](b/(?P.+)|/dev/null)(?:\n|$))? + (?:^---[ ](a/(?P.+?)|/dev/null)\t?(?:\n|$))? + (?:^\+\+\+[ ](b/(?P.+?)|/dev/null)\t?(?:\n|$))? """, re.VERBOSE | re.MULTILINE) #used for inline highlighter word split