changeset 10950:278d45703ac2 stable

cvs: skip bad tags If the CVS repo somehow has a symbolic name that references a revision consisting of a single number (e.g. BAD_TAG: 1), convert will fail when attempting to find the branches, preventing the initial import from working. This patch skips those symbolic names--without warning.
author Brandon Parsons <parsonsb@rsn.hp.com>
date Thu, 04 Mar 2010 14:32:01 -0600
parents d703906d02ab
children 5dc09507b90e
files hgext/convert/cvsps.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/cvsps.py	Wed Apr 07 00:35:38 2010 +0300
+++ b/hgext/convert/cvsps.py	Thu Mar 04 14:32:01 2010 -0600
@@ -402,6 +402,8 @@
             branchpoints = set()
             for branch, revision in branchmap.iteritems():
                 revparts = tuple([int(i) for i in revision.split('.')])
+                if len(revparts) < 2: # bad tags
+                    continue
                 if revparts[-2] == 0 and revparts[-1] % 2 == 0:
                     # normal branch
                     if revparts[:-2] == e.revision: