Mercurial > hg
comparison hgext/convert/cvsps.py @ 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 | 9f6731b03906 |
children | 2114e44b08f6 |
comparison
equal
deleted
inserted
replaced
10949:d703906d02ab | 10950:278d45703ac2 |
---|---|
400 | 400 |
401 # find the branches starting from this revision | 401 # find the branches starting from this revision |
402 branchpoints = set() | 402 branchpoints = set() |
403 for branch, revision in branchmap.iteritems(): | 403 for branch, revision in branchmap.iteritems(): |
404 revparts = tuple([int(i) for i in revision.split('.')]) | 404 revparts = tuple([int(i) for i in revision.split('.')]) |
405 if len(revparts) < 2: # bad tags | |
406 continue | |
405 if revparts[-2] == 0 and revparts[-1] % 2 == 0: | 407 if revparts[-2] == 0 and revparts[-1] % 2 == 0: |
406 # normal branch | 408 # normal branch |
407 if revparts[:-2] == e.revision: | 409 if revparts[:-2] == e.revision: |
408 branchpoints.add(branch) | 410 branchpoints.add(branch) |
409 elif revparts == (1, 1, 1): # vendor branch | 411 elif revparts == (1, 1, 1): # vendor branch |