From 2d3f820ede8a0746f1fd17402a9ea2d279164f5c Mon Sep 17 00:00:00 2001 From: Erik Osheim Date: Tue, 8 Nov 2011 22:31:30 -0500 Subject: [PATCH] more robust git blame parsing --HG-- branch : pmacs2 --- method/git.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/method/git.py b/method/git.py index 56794d8..95652e8 100644 --- a/method/git.py +++ b/method/git.py @@ -176,7 +176,8 @@ class GitBlame(VcBlame): '''show blame output for the current version in Git''' # rev, user, date, [time], [timezone], [date-str], content 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:*]' pretest_err_msg = 'Git is not installed' _is_method = True