changeset 6044:9360a58a09e6

convert: do not skip some lines in gnu arch summaries
author Aleix Conchillo Flaque <aleix@member.fsf.org>
date Thu, 07 Feb 2008 12:31:29 +0100
parents 6283316bcfd4
children 012ad48a07fa
files hgext/convert/gnuarch.py
diffstat 1 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/gnuarch.py	Wed Feb 06 20:00:35 2008 -0800
+++ b/hgext/convert/gnuarch.py	Thu Feb 07 12:31:29 2008 +0100
@@ -197,6 +197,8 @@
         while len(contents) > 0:
             c = contents.pop()
             p = os.path.join(path, c)
+            # os.walk could be used, but here we avoid internal GNU
+            # Arch files and directories, thus saving a lot time.
             if not self._exclude(p):
                 if os.path.isdir(p):
                     contents += [os.path.join(c, f) for f in os.listdir(p)]
@@ -217,22 +219,20 @@
         return changes, copies
 
     def _parsecatlog(self, data, rev):
-        readingsummary = False
+        summary = []
         for l in data:
             l = l.strip()
-            if l.startswith('Standard-date:'):
+            if summary:
+                summary.append(l)
+            elif l.startswith('Summary:'):
+                summary.append(l[len('Summary: '):])
+            elif l.startswith('Standard-date:'):
                 date = l[len('Standard-date: '):]
                 strdate = util.strdate(date, '%Y-%m-%d %H:%M:%S')
                 self.changes[rev].date = util.datestr(strdate)
-
-            if l.startswith('Creator:'):
+            elif l.startswith('Creator:'):
                 self.changes[rev].author = l[len('Creator: '):]
-
-            if not readingsummary and l.startswith('Summary:'):
-                readingsummary = True
-                self.changes[rev].summary = l[len('Summary: '):]
-            elif not l.startswith('Keywords:'):
-                self.changes[rev].summary += '\n%s' % l
+        self.changes[rev].summary = '\n'.join(summary)
 
     def _parsedelta(self, data, rev):
         for l in data: