19
19
this is a common interim step for teams looking to adopt Bazaar but
20
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://wiki.bazaar.canonical.com/BzrForeignBranches/Subversion.
30
27
GNOME project like **beagle**. Firstly, setup a local shared repository
31
28
for storing your branches in and checkout the trunk::
33
bzr init-repo beagle-repo
30
bzr init-repo --rich-root-pack beagle-repo
35
32
bzr checkout svn+ssh://svn.gnome.org/svn/beagle/trunk beagle-trunk
37
Next, create a feature branch and hack away::
34
Note that using the ``rich-root-pack`` option to ``init-repo`` is
35
important as bzr-svn requires some extra metadata not yet supported in Bazaar's
36
default repository format. Next, create a feature branch and hack away::
39
38
bzr branch beagle-trunk beagle-feature1
42
41
bzr commit -m "blah blah blah"
44
43
bzr commit -m "blah blah blah"
46
45
When the feature is cooked, refresh your trunk mirror and merge
63
62
to import the Subversion repository into a Bazaar one once and for all
64
63
for your project, and then branch from that native Bazaar repository
65
64
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
65
repository-to-repository conversion. See ``bzr help svn-import`` for details.
70
67
Here's the recipe from above updated to use a central Bazaar mirror::
72
bzr init-repo beagle-repo
69
bzr init-repo --rich-root-pack beagle-repo
74
bzr branch bzr+ssh://bzr.gnome.org/beagle.bzr/trunk beagle-trunk
71
bzr branch bzr+ssh://bzr.gnome.org/bzr/beagle/trunk beagle-trunk
75
72
bzr branch beagle-trunk beagle-feature1
78
75
bzr commit -m "blah blah blah"
80
77
bzr commit -m "blah blah blah"
83
80
bzr merge ../beagle-feature1
84
81
bzr commit -m "Complete comment for SVN commit"
87
84
In this case, committing to the trunk only commits the merge locally.
88
85
To commit back to the master Subversion trunk, an additional command
89
(``bzr push``) is required.
86
(``bzr svn-push``) is required.
91
Note: You'll need to give ``pull`` and ``push`` the relevant URLs
88
Note: You'll need to give ``pull and ``svn-push`` the relevant URLs
92
89
the first time you use those commands in the trunk branch. After that,
93
90
bzr remembers them.
104
101
Bazaar and Subversion are different tools with different capabilities
105
102
so there will always be some limited interoperability issues.
106
Here are some examples current as of bzr-svn 0.5.4:
103
Here are some examples current as of bzr-svn 0.49:
108
105
* Bazaar doesn't support versioned properties
110
* Bazaar doesn't support tracking of file copies.
107
* Renames are not correctly communicated.
112
109
See the bzr-svn web page,
113
http://wiki.bazaar.canonical.com/BzrForeignBranches/Subversion,
110
http://bazaar-vcs.org/BzrForeignBranches/Subversion,
114
111
for the current list of constraints.