Support "blah (closes: #1234)" message format.
authorXavier Claessens <xclaesse@src.gnome.org>
Mon, 1 Sep 2008 06:24:27 +0000 (06:24 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Mon, 1 Sep 2008 06:24:27 +0000 (06:24 +0000)
svn path=/trunk/; revision=1411

release.py

index ec6b0f9b8e271c691f7335c8b90afd121808930a..a31dc864a3bdc6cc60ec88c5a6ce32dc5b6c9a99 100755 (executable)
@@ -137,19 +137,28 @@ class Project:
        def parse_commit(self, ref, author, date, message):
                p1 = message.rfind('(')
                p2 = message.rfind (')')
-               if len(message) - p2 <= 2:
+               if len(message) - p2 <= 2 and \
+                  message[p1+1:].find('#') == -1:
                        author = message[p1+1:p2]
                        message = message[:p1]
 
+               print message
+               print message.find('#')
+
                msg = message.lower()
-               if msg.find('translation') != -1 and\
-                  msg.find('updated') != -1:
+               if msg.find('translation') != -1 and \
+                  (msg.find('added') != -1 or \
+                   msg.find('updated') != -1):
                        self.translations += ' - ' + message + ' (' + author + ').\n' 
                elif message.find('#') != -1:
+                       print message
                        p1 = message.find('#')
                        while p1 != -1:
                                bug = Bug()
-                               p2 = message.find(' ', p1)
+                               p2 = p1 + 1
+                               while message[p2].isdigit():
+                                       p2 = p2 + 1
+                               print message[p1+1:p2]
                                bug.number = message[p1+1:p2]
                                bug.author = author
                                self.bug_commits.append(bug)