Multiple CVS module conversion
Mads Kiilerich
mads at kiilerich.com
Tue Jul 13 18:10:26 UTC 2010
Michael Malone wrote, On 07/12/2010 10:46 PM:
> Hi,
>
> My workplace is currently investigating how we can convert our current
> CVS repository to Mercurial. In CVS we used several modules as the
> theory is that each of these modules should have defined interfaces
> and could be swapped out for a different implementation/version. In
> practice we only have one implementation and our architecture isn't
> defined as well as it ought to be. We know that there is at least one
> module which needs breaking apart, and we'd rather not create merge
> hell when we do this.
What do you mean by breaking apart, and why should that be hard to
merge? What is the problem you are trying to avoid?
> So my question is this:
>
> Is there a way to convert multiple CVS modules into a single Mercurial
> repository?
>
> I have tried converting each module separately, then doing a pull -f,
> but that doesn't leave the modules separated into their own
> directories (Ideally, I'd like to be able to specify a sub-tree
> destination when I do the pull -f), and unfortunately our code base is
> a little too complicated to perform a 'hg mv' after each pull.
A simple solution would be to rename each CVS repository during the
conversion so it just ends up in the right subdirectory when you merge
them together.
But if you want to preserve the relationship between the CVS modules and
their version then you probably want something else. Perhaps you can do
some brain surgery on the CVS repositories and convert it as one repository?
If yo want to preserve the modules as independent building blocks then
you might want to check Mercurials subrepo functionality.
> A second and secondary question is, I have heard rumours that the
> history retaining is more accurate if I use a svn repo as an
> intermediate step - do you know of the validity of this rumour?
That is probably true.
/Mads
More information about the Mercurial
mailing list