# HG changeset patch # User Mads Kiilerich # Date 2008-11-27 21:04:51 # Node ID 4fecd17f2de93f995d0bda46c50de13b3330151a # Parent d2a917b271524d0aeb2e3b76f52c552dd47da536 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. diff --git a/hgext/convert/cvs.py b/hgext/convert/cvs.py --- a/hgext/convert/cvs.py +++ b/hgext/convert/cvs.py @@ -103,18 +103,18 @@ class convert_cvs(converter_source): 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:]