From cbba3b1917bdb4f8607732b5fa3e1da8b8ee56f7 Mon Sep 17 00:00:00 2001 From: Erik Osheim Date: Fri, 4 May 2012 09:50:35 -0400 Subject: [PATCH] fix git blame --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 b118988..ac6e861 100644 --- a/method/git.py +++ b/method/git.py @@ -177,7 +177,7 @@ class GitBlame(VcBlame): # 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 @@ -187,6 +187,7 @@ class GitBlame(VcBlame): raise VcException("couldn't parse %r" % line) groups = m.groups() fields = list(groups[:-1]) + del fields[1] if fields[1] == 'Not Committed Yet': fields[1] = '' if fields[0] == '00000000':