7
bzr-svn lets developers use Bazaar as their VCS client on projects
8
still using a central Subversion repository. Access to Subversion
9
repositories is largely transparent, i.e. you can use most ``bzr``
10
commands directly on Subversion repositories exactly the same
11
as if you were using ``bzr`` on native Bazaar branches.
13
Many bzr-svn users create a local mirror of the central Subversion
14
trunk, work in local feature branches, and submit their
15
overall change back to Subversion when it is ready
16
to go. This lets them gain many of the advantages of distributed
17
VCS tools without interrupting existing team-wide processes and
18
tool integration hooks currently built on top of Subversion. Indeed,
19
this is a common interim step for teams looking to adopt Bazaar but
20
who are unable to do so yet for timing or non-technical reasons.
22
For installation instructions, see the bzr-svn home page:
23
http://bazaar-vcs.org/BzrForeignBranches/Subversion.
29
Here's a simple example of how you can use bzr-svn to hack on a
30
GNOME project like **beagle**. Firstly, setup a local shared repository
31
for storing your branches in and checkout the trunk::
33
bzr init-repo beagle-repo
35
bzr checkout svn+ssh://svn.gnome.org/svn/beagle/trunk beagle-trunk
37
Next, create a feature branch and hack away::
39
bzr branch beagle-trunk beagle-feature1
42
bzr commit -m "blah blah blah"
44
bzr commit -m "blah blah blah"
46
When the feature is cooked, refresh your trunk mirror and merge
51
bzr merge ../beagle-feature1
52
bzr commit -m "Complete comment for SVN commit"
54
As your trunk mirror is a checkout, committing to it implicitly
55
commits to the real Subversion trunk. That's it!
58
Using a central repository mirror
59
---------------------------------
61
For large projects, it often makes sense to tweak the recipe given above.
62
In particular, the initial checkout can get quite slow so you may wish
63
to import the Subversion repository into a Bazaar one once and for all
64
for your project, and then branch from that native Bazaar repository
65
instead. bzr-svn provides the ``svn-import`` command for doing this
66
repository-to-repository conversion. Here's an example of how to use it::
68
bzr svn-import svn+ssh://svn.gnome.org/svn/beagle
70
Here's the recipe from above updated to use a central Bazaar mirror::
72
bzr init-repo beagle-repo
74
bzr branch bzr+ssh://bzr.gnome.org/beagle.bzr/trunk beagle-trunk
75
bzr branch beagle-trunk beagle-feature1
78
bzr commit -m "blah blah blah"
80
bzr commit -m "blah blah blah"
83
bzr merge ../beagle-feature1
84
bzr commit -m "Complete comment for SVN commit"
87
In this case, committing to the trunk only commits the merge locally.
88
To commit back to the master Subversion trunk, an additional command
89
(``bzr push``) is required.
91
Note: You'll need to give ``pull`` and ``push`` the relevant URLs
92
the first time you use those commands in the trunk branch. After that,
95
The final piece of the puzzle in this setup is to put scripts in
96
place to keep the central Bazaar mirror synchronized with the Subversion
97
one. This can be done by adding a cron job, using a Subversion hook,
98
or whatever makes sense in your environment.
101
Limitations of bzr-svn
102
----------------------
104
Bazaar and Subversion are different tools with different capabilities
105
so there will always be some limited interoperability issues.
106
Here are some examples current as of bzr-svn 0.5.4:
108
* Bazaar doesn't support versioned properties
110
* Bazaar doesn't support tracking of file copies.
112
See the bzr-svn web page,
113
http://bazaar-vcs.org/BzrForeignBranches/Subversion,
114
for the current list of constraints.