Commit 7691e487 authored by Christophe Dumez's avatar Christophe Dumez

- fixed regex to prevent utf8 problem (reported by vincent)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6655 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a260c43c
......@@ -155,10 +155,10 @@ class DiffFile:
# Getting revisions in header
for line in self.header.split('\n'):
if line.startswith('--- '):
tmp = re.search('\\([\w\s]+\\)$', line)
tmp = re.search('\\([^)]+\\)$', line)
self.old_revision = tmp.string[tmp.start():tmp.end()][1:-1].strip()
if line.startswith('+++ '):
tmp = re.search('\\([\w\s]+\\)$', line)
tmp = re.search('\\([^)]+\\)$', line)
self.new_revision = tmp.string[tmp.start():tmp.end()][1:-1].strip()
# Splitting the body from the header
self.body = '\n'.join(raw_diff.strip().split('\n')[4:])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment