message = ""
filesFound = False
files = ""
- commitCmd = os.popen("git describe "+re.split(' ', line, 1)[1])
- commit = commitCmd.read()
- commitCmd.close()
+ commitCmd = os.popen("git describe "+re.split(' ', line, 1)[1])
+ commit = commitCmd.read()
+ commitCmd.close()
commit = commit[0:len(commit)-1]
continue
# Match the author line and extract the part we want
author = re.split('<', authorList[1], 1)[0]
author = "[" + author[0:len(author)-1]+"]"
authorFound = True
+ continue
# Match the date line
elif re.match('^Date:', line) >= 0:
dateList = re.split(': ', line, 1)
date = dateList[1]
date = date[0:len(date)-1]
dateFound = True
+ continue
# The svn-id lines are ignored
elif re.match(' git-svn-id:', line) >= 0:
continue
else:
message = message + " " + line.strip()
# If this line is hit all of the files have been stored for this commit
- elif re.search('files changed', line) >= 0:
+ elif re.search('file(s)? changed', line) >= 0:
filesFound = True
continue
# Collect the files for this commit. FIXME: Still need to add +/- to files
# author on this day
authorLine = date + " " + author
if len(prevAuthorLine) != 0:
- fout.write("\n");
- fout.write(authorLine + " " + commit + "\n\n")
+ fout.write("\n");
+ fout.write(authorLine + " " + commit + "\n\n")
# Assemble the actual commit message line(s) and limit the line length
# to 80 characters.
i = i+71
# Write out the commit line
- fout.write(files + "\t\t" + commit + "\n")
+ fout.write(files + "\t\t" + commit + "\n")
#Now reset all the variables ready for a new commit block.
authorFound = False