/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
brz-svn
=======

Overview
--------

brz-svn lets developers use Breezy as their VCS client on projects
still using a central Subversion repository. Access to Subversion
repositories is largely transparent, i.e. you can use most ``brz``
commands directly on Subversion repositories exactly the same
as if you were using ``brz`` on native Breezy branches.

Many brz-svn users create a local mirror of the central Subversion
trunk, work in local feature branches, and submit their
overall change back to Subversion when it is ready
to go. This lets them gain many of the advantages of distributed
VCS tools without interrupting existing team-wide processes and
tool integration hooks currently built on top of Subversion. Indeed,
this is a common interim step for teams looking to adopt Breezy but
who are unable to do so yet for timing or non-technical reasons.

For installation instructions, see the brz-svn home page:
http://wiki.bazaar.canonical.com/BzrForeignBranches/Subversion.


A simple example
----------------

Here's a simple example of how you can use brz-svn to hack on a
GNOME project like **beagle**. Firstly, setup a local shared repository
for storing your branches in and checkout the trunk::

  brz init-repo beagle-repo
  cd beagle-repo
  brz checkout svn+ssh://svn.gnome.org/svn/beagle/trunk beagle-trunk

Next, create a feature branch and hack away::

  brz branch beagle-trunk beagle-feature1
  cd beagle-feature1
  (hack, hack, hack)
  brz commit -m "blah blah blah"
  (hack, hack, hack)
  brz commit -m "blah blah blah"

When the feature is cooked, refresh your trunk mirror and merge
your change::

  cd ../beagle-trunk
  brz update
  brz merge ../beagle-feature1
  brz commit -m "Complete comment for SVN commit"

As your trunk mirror is a checkout, committing to it implicitly
commits to the real Subversion trunk. That's it!


Using a central repository mirror
---------------------------------

For large projects, it often makes sense to tweak the recipe given above.
In particular, the initial checkout can get quite slow so you may wish
to import the Subversion repository into a Breezy one once and for all
for your project, and then branch from that native Breezy repository
instead. brz-svn provides the ``svn-import`` command for doing this
repository-to-repository conversion. Here's an example of how to use it::

  brz svn-import svn+ssh://svn.gnome.org/svn/beagle

Here's the recipe from above updated to use a central Breezy mirror::

  brz init-repo beagle-repo
  cd beagle-repo
  brz branch bzr+ssh://brz.gnome.org/beagle.brz/trunk beagle-trunk
  brz branch beagle-trunk beagle-feature1
  cd beagle-feature1
  (hack, hack, hack)
  brz commit -m "blah blah blah"
  (hack, hack, hack)
  brz commit -m "blah blah blah"
  cd ../beagle-trunk
  brz pull
  brz merge ../beagle-feature1
  brz commit -m "Complete comment for SVN commit"
  brz push

In this case, committing to the trunk only commits the merge locally.
To commit back to the master Subversion trunk, an additional command
(``brz push``) is required.

Note: You'll need to give ``pull`` and ``push`` the relevant URLs
the first time you use those commands in the trunk branch. After that,
brz remembers them.

The final piece of the puzzle in this setup is to put scripts in
place to keep the central Breezy mirror synchronized with the Subversion
one. This can be done by adding a cron job, using a Subversion hook,
or whatever makes sense in your environment.


Limitations of brz-svn
----------------------

Breezy and Subversion are different tools with different capabilities
so there will always be some limited interoperability issues.
Here are some examples current as of brz-svn 0.5.4:

 * Breezy doesn't support versioned properties

 * Breezy doesn't support tracking of file copies.

See the brz-svn web page,
http://wiki.bazaar.canonical.com/BzrForeignBranches/Subversion,
for the current list of constraints.