fix git blame

--HG--
branch : pmacs2
This commit is contained in:
Erik Osheim 2012-05-04 09:50:35 -04:00
parent 07f5e5e8f1
commit cbba3b1917
1 changed files with 2 additions and 1 deletions

View File

@ -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':