~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to doc/en/user-guide/svn_plugin.txt

Implement version 3 of the network protocol. (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
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.
21
21
 
22
 
For installation instructions, see the bzr-svn home page:
23
 
http://wiki.bazaar.canonical.com/BzrForeignBranches/Subversion.
24
 
 
25
22
 
26
23
A simple example
27
24
----------------
30
27
GNOME project like **beagle**. Firstly, setup a local shared repository
31
28
for storing your branches in and checkout the trunk::
32
29
 
33
 
  bzr init-repo beagle-repo
 
30
  bzr init-repo --rich-root-pack beagle-repo
34
31
  cd beagle-repo
35
32
  bzr checkout svn+ssh://svn.gnome.org/svn/beagle/trunk beagle-trunk
36
33
 
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::
38
37
 
39
38
  bzr branch beagle-trunk beagle-feature1
40
39
  cd beagle-feature1
41
 
  (hack, hack, hack)
 
40
  *changes*
42
41
  bzr commit -m "blah blah blah"
43
 
  (hack, hack, hack)
 
42
  *changes*
44
43
  bzr commit -m "blah blah blah"
45
44
 
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::
67
 
 
68
 
  bzr svn-import svn+ssh://svn.gnome.org/svn/beagle
 
65
repository-to-repository conversion. See ``bzr help svn-import`` for details.
69
66
 
70
67
Here's the recipe from above updated to use a central Bazaar mirror::
71
68
 
72
 
  bzr init-repo beagle-repo
 
69
  bzr init-repo --rich-root-pack beagle-repo
73
70
  cd 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
76
73
  cd beagle-feature1
77
 
  (hack, hack, hack)
 
74
  *changes*
78
75
  bzr commit -m "blah blah blah"
79
 
  (hack, hack, hack)
 
76
  *changes*
80
77
  bzr commit -m "blah blah blah"
81
78
  cd ../beagle-trunk
82
79
  bzr pull
83
80
  bzr merge ../beagle-feature1
84
81
  bzr commit -m "Complete comment for SVN commit"
85
 
  bzr push
 
82
  bzr svn-push
86
83
 
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.
90
87
 
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.
94
91
 
103
100
 
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:
107
104
 
108
105
 * Bazaar doesn't support versioned properties
109
106
 
110
 
 * Bazaar doesn't support tracking of file copies.
 
107
 * Renames are not correctly communicated.
111
108
 
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.