converting cvs to bzr branches

John A Meinel john at arbash-meinel.com
Wed May 10 16:08:55 BST 2006


Reinhard Tartler wrote:
> Hi folks,
> 
> I've been googling a bit around about converting a cvs checkout into a
> bzr branch. My results were a bit confusing. Some recommend using cscvs
> to convert to gnu/arch, and then from there to bzr, and some are
> recommending setting up tailor to do this job. 
> 
> I don't have access to the CVS Repository itself, I only have access to
> checkout it. I'd also like to continously import changes from the cvs
> tree (actually, I need to import 3 cvs modules, which I'd like to have
> in 3 different bzr branches). 
> 
> What do you guys recommend nowadays?
> 
> Greetings,
> 	Reinhard
> 

Well, it depends on what you really need. At one point, Tailor didn't
support resuming a conversion. It was a one time deal only.

For some reason I thought Tailor fixed that. Which means that I would
recommend using Tailor for your conversion.
If Tailor has not fixed that, then the only routes I know of which do
support updating is either

1) Bulk import with Tailor, manual after that
2) cvs => (cscvs) => Arch => (bzr baz-import) => bzr

It really depends on what you need. I've followed CVS branches before,
and I used (1) to handle new updates.

Basically, you use Tailor to do the main conversion, and from then
onward, you just use:

cvs co project
bzr get project bzr-project
cd project
mv ../bzr-project/.bzr/ .

At this point, you should have a working directory with both CVS and
.bzr controlling it.

Then if someone makes a change in CVS that you want, you do:

cd project
cvs update
bzr commit -m "updated from cvs ..."

If you want to maintain your own branch, you just use

bzr branch project my-bzr-project

If you want to commit something back into cvs from your bzr changes, it
is simply

bzr merge ../my-bzr-project
# review
cvs commit -m "foo"
bzr commit -m "[merge] foo"


The downsides of this is that you lose whatever changesets existed in
CVS, and annotations, and commit log messages, etc. Which is why it is
best if Tailor supports resuming a conversion.

I know cscvs supports resuming, as does 'baz-import'. So (2) should be
fairly lossless. Just a lot of hassle.

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060510/b94f1bfc/attachment.pgp 


More information about the bazaar mailing list