How to work with external sources
John Arbash Meinel
john at arbash-meinel.com
Mon Dec 12 14:00:10 GMT 2005
Noam Raphael wrote:
> Hello,
>
> I now downloaded bazaar-ng. I want to use it to track changes I make
> to an external project, which is not using bazaar-ng (it uses svn).
>
> I haven't found instructions in the wiki on how to do this. It seems
> to me that it should include some sort of equivalent to svn_load_dirs.
> Can you give me a hint on this?
>
> Thanks,
> Noam Raphael
>
>
There is a tool for converting SVN repositories:
http://bazaar.canonical.com/svn2bzr
There is also Tailor which converts between a bunch of different formats:
http://www.darcs.net/DarcsWiki/Tailor
In the future, bzr might actually support reading from an svn
repository. (Someone is looking into it).
I believe both svn2bzr and Tailor support doing a conversion, and then
comming back later, and updating the conversion. (Older versions of
tailor did not)
If it was a cvs repository, there is "cscvs". Originally converting to
Gnu Arch, improved by the Canonical people, and now it should convert to
bzr. However, I don't know where the latest version is. I know for a
while it was an internal project, but I do believe it was planned to be
released to the public.
This was the wiki for it:
http://wiki.gnuarch.org/cscvs
There is also this page, which details tracking an upstream project with
Gnu Arch. However, it is pretty Gnu Arch specific, so it probably will
confuse you more than help you. I just include it here for completeness.
http://wiki.gnuarch.org/Tracking_20a_20project_20that_20doesn_27t_20use_20Arch
In general, the steps would be:
1) If you have access to the raw storage mechanism (svn, cvs), use a
tool to convert that repository to a bzr branch.
2) Don't make changes in the new branch, but create a new branch off of
it where you do you work.
3) Use the tool to keep up-to-date against the SVN/CVS repository, and
merge back and forth between the converted branch, and your development
branch.
As an example, you could also do the easy way, "Keep the working tree
up-to-date":
svn co <whatever you care about> svn-conduit
cd svn-conduit
bzr init
bzr add .
bzr commit -m "Initial bzr repository for project foo, starting at svn
revno = ????"
cd ..
bzr branch svn-conduit my-branch
cd my-branch
<hack hack hack do bzr stuff>
cd ../svn-conduit
svn update
bzr commit -m "update from SVN".
cd ../my-branch
bzr merge ../svn-conduit
bzr commit -m "[merge] from svn-conduit"
This is the easiest way to do it. But it is very lossy. You don't keep
any history, and all changes from the SVN side get rolled up into a
single bzr commit. But it is easy, and doesn't require you to install
and learn any new tools. For a lot of people, it is sufficient.
I hope I haven't given so much information that you are lost. Certainly
if you can streamline things, put it on the wiki for future generations. :)
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051212/3e471999/attachment.pgp
More information about the bazaar
mailing list