[PATCH 1 of 1] convert: better support for CVS branchpoints (issue1447)
Henrik Stuart
hg at hstuart.dk
Mon Jun 8 01:26:30 CDT 2009
Henrik Stuart skrev:
> # HG changeset patch
> # User Henrik Stuart <hg at hstuart.dk>
> # Date 1244377202 -7200
> # Node ID 380cc5b161441d5ec10b0759379f44f55856c424
> # Parent 6e41d3c5619f3d981f7c444a0f01619cb10932fd
> convert: better support for CVS branchpoints (issue1447)
>
> This records the branches starting at individual CVS file revisions,
> using the symbolic names map rather than just the branches
> information. This information is used to generate Mercurial
> changesets. Despite the changes, the CVS conversion still suffers
> heavily from cvsps' deficiencies in generating a correct
> representation of the CVS repository history.
> + # find the branches starting from this revision
> + branchpoints = set()
> + for branch, revision in branchmap.iteritems():
> + revparts = tuple([int(i) for i in revision.split('.')])
> + if revparts[-1] % 2 == 0: # normal branch
> + if revparts[:-2] == e.revision:
> + branchpoints.add(branch)
> + elif revparts == (1,1,1): # vendor branch
> + if revparts in e.branches:
> + branchpoints.add(branch)
> + e.branchpoints = branchpoints
> +
> log.append(e)
Forgot a test for the magic branch marker here. Revised patch coming in
a few.
--
Kind regards,
Henrik Stuart
More information about the Mercurial-devel
mailing list