translations += format % (lang, authors)
return translations
+ def get_bug_author(self, bug_number):
+ cmd = 'git log %s.. | grep -B 20 -E "(bug %s|#%s)"' \
+ ' | tac | grep ^Author: | head -1' \
+ % (self.last_tag, bug_number, bug_number)
+ line = self.exec_cmd (cmd)
+ p1 = line.find(" ")
+ p2 = line.find("<")
+
+ return line[p1:p2].strip()
+
def get_bugs(self):
commit_str = self.exec_cmd('git show %s' % (self.last_tag))
for line in commit_str.splitlines():
for row in reader:
bug_number = row[col_bug_id]
description = row[col_description]
- bugs += ' - Fixed #%s, %s\n' % (bug_number, description)
+ author = self.get_bug_author(bug_number)
+ bugs += ' - Fixed #%s, %s' % (bug_number, description)
+ if author != '':
+ bugs += ' (%s)' % (author)
+ bugs += '\n'
return bugs
def generate_news(self):
- translations = self.get_translations("ls -l po/*.po", "Updated %s Translation (%s)\n")
- help_translations = self.get_translations("ls -l help/*/*.po", "Updated %s Documentation translation (%s)\n")
+ translations = self.get_translations("ls -l po/*.po", \
+ " - Updated %s Translation (%s)\n")
+ help_translations = self.get_translations("ls -l help/*/*.po", \
+ " - Updated %s Documentation translation (%s)\n")
bugs = self.get_bugs()
news = 'NEW in '+ self.package_version + '\n==============\n'