more robust git blame parsing

--HG--
branch : pmacs2
This commit is contained in:
Erik Osheim 2011-11-08 22:31:30 -05:00
parent 88fe0a35da
commit 2d3f820ede
1 changed files with 2 additions and 1 deletions

View File

@ -176,7 +176,8 @@ class GitBlame(VcBlame):
'''show blame output for the current version in Git''' '''show blame output for the current version in Git'''
# rev, user, date, [time], [timezone], [date-str], content # rev, user, date, [time], [timezone], [date-str], content
num_fields = 3 num_fields = 3
line_re = re.compile(r'^\^*([0-9a-f]+) \(([a-zA-Z0-9_ ]+|Not Committed Yet) +([-0-9]+) [:0-9]+ +[-\+]\d{4} +\d+\) (.*)\n$') #line_re = re.compile(r'^\^*([0-9a-f]+) \(([a-zA-Z0-9_ ]+|Not Committed Yet) +([-0-9]+) [:0-9]+ +[-\+]\d{4} +\d+\) (.*)\n$')
line_re = re.compile(r'^\^*([0-9a-f]+) .+ +\(([a-zA-Z0-9_ ]+|Not Committed Yet) +([-0-9]+) [:0-9]+ +[-\+]\d{4} +\d+\) (.*)\n$')
prefix_fmt = '[g:d:*]%*s [c:d:*]%-*s [b:d:*]%*s[d:d:*]' prefix_fmt = '[g:d:*]%*s [c:d:*]%-*s [b:d:*]%*s[d:d:*]'
pretest_err_msg = 'Git is not installed' pretest_err_msg = 'Git is not installed'
_is_method = True _is_method = True