New to bzr : two of my SVN usecases
nmb at wartburg.edu
Fri Sep 5 16:53:30 BST 2008
Lionel Dricot <zeploum <at> gmail.com> writes:
> 1) First use case : the LDAP centralized server.I want to have a
> centralized Bzr server for my "trunk". But it has some limitation:
> I want the access to be provided over http/https by Apache (like I'm
> doing with SVN currently). Also, the authentification is done by an
> LDAP server. But I still want to have per-user authorization (I'm
> currently doing it in a dav_svn.authz file). How can I reproduce this
> usecase ? I want to stress that in some of my project, confidentiality
> is really important so I must be able to be sure that read access is
> only available for a few allowed users. Also, if permissions are
> handled by dav, what about local users on the same filesystem ?
Bazaar can provide access over http using any HTTP server, including Apache.
You simply need to put the branch somewhere on the server filesystem that is
served by the HTTP server. For example, if /var/www/ is the DocumentRoot, then
a branch /var/www/bzr/my-branch could be accessed (read-only) by `bzr log
http://server.example.com/bzr/my-branch`. There is also a WebDAV plugin to
allow read/write access over HTTP. I believe that you can control access to an
entire branch using any of the normal Apache access controls.
> Bonus point : if a user make its own branch. I understand that it
> can push it to the trunk if I give him the authorization. But how
> can I say : "It's a good branch, let's host it on the server alongside
> with the trunk" ?
You need to give them write access to an appropriate location on the server.
> 2) Second use case : the multiple directories /etc repository.
> Currently, I put some parts of my /etc/ directory in a svn repository
> called "configuration". But I don't want to put all /etc/. So, I
> created the "configuration" repository and I import in it all the
> folder I want to save. It means that each important folder is only
> a partial checkout of the repository. It's great because it allows
> me to put any folder in this repository, even if they are not in "/etc"
> and it also means that /etc is not at all in svn. How could I do
> something like that in bzr ? Am I allowed to branch only a subtree
> and to push to it?
bzr currently doesn't allow working only a subtree of a branch. To version
parts of /etc without versioning the entire thing, I would do
$ cd /etc
$ bzr init
$ bzr add resolv.conf apache2/ init.d/
$ bzr ci -m 'initial import'
$ bzr ignore '*'
By explicitly adding what you care about (possibly recursively) and then setting
the ignore pattern to *, you won't see all of the files you didn't add as
unknown in `bzr status`. For versioning other directories that don't live in
/etc, I would simply repeat the above and make new branches.
If you are coming from Subversion, then you may want to push these branches to a
central server and convert the local branch to a checkout using `bzr reconfigure
More information about the bazaar