Skip to content
Snippets Groups Projects
Commit 4fecd17f authored by kiilerix's avatar kiilerix
Browse files

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.
parent d2a917b2
No related branches found
No related tags found
No related merge requests found
......@@ -103,6 +103,6 @@
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)
......@@ -107,6 +107,6 @@
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
......@@ -110,7 +110,7 @@
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]
......@@ -114,7 +114,7 @@
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:]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment