[Zope3-checkins] SVN: Zope3/trunk/src/z3checkins/ Changed the Zope3 checkin processing code to drop the mailing list name and

Gintautas Miliauskas gintas at pov.lt
Thu May 27 10:29:23 EDT 2004


Log message for revision 25047:
Changed the Zope3 checkin processing code to drop the mailing list name and
the first log line from the subject.



-=-
Modified: Zope3/trunk/src/z3checkins/message.py
===================================================================
--- Zope3/trunk/src/z3checkins/message.py	2004-05-27 13:41:07 UTC (rev 25046)
+++ Zope3/trunk/src/z3checkins/message.py	2004-05-27 14:29:22 UTC (rev 25047)
@@ -211,7 +211,7 @@
 
         checkin_info = self.tryToParseCheckinMessage(subject, m)
         if checkin_info is not None:
-            directory, log_message, branch = checkin_info
+            subject, directory, log_message, branch = checkin_info
             return CheckinMessage(message_id=message_id,
                                   author_name=author_name,
                                   author_email=author_email, subject=subject,
@@ -248,7 +248,10 @@
             if len(parts) < 2:
                 return None
             subject = parts[1]
-            directory = subject.split(" ", 1)[0]
+            directory = subject.split(None, 1)[0]
+            # Remove the mailing list name and the trailing note, which
+            # is shown on the next line anyway.
+            subject = "SVN: " + directory
         elif "rev " in subject:
             # [foo-bar] rev 42 - trunk/foofoofoo
             parts = subject.split(' - ')
@@ -264,7 +267,7 @@
         except FormatError:
             return None
 
-        return directory, log_message, branch
+        return subject, directory, log_message, branch
 
     def extract_log(self, lines):
         log_message = []

Modified: Zope3/trunk/src/z3checkins/tests/svn_msg4.txt
===================================================================
--- Zope3/trunk/src/z3checkins/tests/svn_msg4.txt	2004-05-27 13:41:07 UTC (rev 25046)
+++ Zope3/trunk/src/z3checkins/tests/svn_msg4.txt	2004-05-27 14:29:22 UTC (rev 25047)
@@ -3,7 +3,7 @@
 From: Albertas Agejevas <alga at pov.lt>
 To: zope3-checkins at zope.org
 Subject: [Zope3-checkins]
-        SVN: zope/app/traversing/interfaces.py
+        SVN: zope/app/traversing/interfaces.py Changed a comment
 
 Log message for revision 24872:
 

Modified: Zope3/trunk/src/z3checkins/tests/test_message.py
===================================================================
--- Zope3/trunk/src/z3checkins/tests/test_message.py	2004-05-27 13:41:07 UTC (rev 25046)
+++ Zope3/trunk/src/z3checkins/tests/test_message.py	2004-05-27 14:29:22 UTC (rev 25047)
@@ -272,6 +272,7 @@
         self.assertEquals(msg.author_email, "alga at pov.lt")
         self.assertEquals(msg.date, datetime(2004, 5, 21, 21, 57, 07,
                                              tzinfo=FixedTimezone(-4*60)))
+        self.assertEquals(msg.subject, "SVN: zope/app/traversing/interfaces.py")
         self.assertEquals(msg.directory, "zope/app/traversing/interfaces.py")
         self.assertEquals(msg.branch, None)
         self.assertEquals(msg.log_message, """Changed a comment.""")




More information about the Zope3-Checkins mailing list