changeset 7441:4fecd17f2de9

convert cvs: Fix branch name parsing cvsps version 2.2b1 as found in Fedora 10 outputs the following format: --------------------- PatchSet 1 Date: 2008/11/26 00:59:46 Author: mk Branch: HEAD Tag: (none) Branches: INITIAL Log: Initial revision Members: a:INITIAL->1.1 b/c:INITIAL->1.1 --------------------- The parser overwrote the Branch value with noise from the misparsed Branches value.
author Mads Kiilerich <mads@kiilerich.com>
date Thu, 27 Nov 2008 22:04:51 +0100
parents d2a917b27152
children a14ce129cfcd
files hgext/convert/cvs.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/cvs.py	Thu Nov 27 11:14:43 2008 -0800
+++ b/hgext/convert/cvs.py	Thu Nov 27 22:04:51 2008 +0100
@@ -103,18 +103,18 @@
                             if maxrev and int(id) > maxrev:
                                 # ignore everything
                                 state = 3
-                        elif l.startswith("Date"):
+                        elif l.startswith("Date:"):
                             date = util.parsedate(l[6:-1], ["%Y/%m/%d %H:%M:%S"])
                             date = util.datestr(date)
-                        elif l.startswith("Branch"):
+                        elif l.startswith("Branch:"):
                             branch = l[8:-1]
                             self.parent[id] = self.lastbranch.get(branch, 'bad')
                             self.lastbranch[branch] = id
-                        elif l.startswith("Ancestor branch"):
+                        elif l.startswith("Ancestor branch:"):
                             ancestor = l[17:-1]
                             # figure out the parent later
                             self.parent[id] = self.lastbranch[ancestor]
-                        elif l.startswith("Author"):
+                        elif l.startswith("Author:"):
                             author = self.recode(l[8:-1])
                         elif l.startswith("Tag:") or l.startswith("Tags:"):
                             t = l[l.index(':')+1:]