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.
This commit is contained in:
Brandon Parsons 2010-03-04 14:32:01 -06:00
parent 5ce3768204
commit dc54791a49

View File

@ -402,6 +402,8 @@ def createlog(ui, directory=None, root="", rlog=True, cache=None):
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: