CVS conversion: making it look like merges happened

Martin Pool mbp at sourcefrog.net
Tue Mar 24 23:55:53 GMT 2009


2009/3/24 Greg Ward <greg-bzr at gerg.ca>:
> Right now I'm playing with this technique to create fake merge revisions:
>
>  # go to second-oldest release branch that I care about
>  cd <repo>/3-7-1
>  # merge from oldest release branch and throw away the results
>  bzr merge ../3-6-1
>  bzr revert .
>  # check that there really is a pending merge
>  bzr status -v
>  # commit it
>  bzr commit -m"Fake merge from branch 3-6-1 to 3-7-1."
>
> Repeat, fake merging branch n-1 onto n, up until n=trunk.
>
> (This hack is occasionally recommended on the Mercurial mailing list.
> I haven't been hanging around here long enough to know if it's
> something Bazaar users do, but I thought I'd give it a try.)
>
> Is this a completely stupid idea?  Is there a cleaner way to do it?

No, it's not a bad idea at all.  Unless doing it this way was too much
work it's probably what I'd try first.

I thought there was a bug related to this but I couldn't find one, so
I filed https://bugs.edge.launchpad.net/bzr/+bug/348227 asking for a
way to do it in one step.

> (Mercurial's CVS convertor supports regex detection of CVS merges,
> which I think might work for us in 80% of cases.  I haven't tried it,
> and strongly suspect I will still need to do a fake "whole-branch"
> merge right after conversion.  But it might result in a clearer/more
> accurate DAG.  I think if I want that for my Bazaar repo, I should be
> talking to the cvs2{svn,git} maintainers, since I'm using cvs2git ->
> bzr fast-import for the conversion.)

I believe that the fast-import stream can represent merges and we will
handle them correctly (imbw), so it might be worth either adding that
feature to the cvs fastexport generator, or doing it yourself as a
postprocessing step.

-- 
Martin <http://launchpad.net/~mbp/>



More information about the bazaar mailing list