[ANN] Bazaar Externals plugin

Óscar Fuentes ofv at wanadoo.es
Tue Nov 10 21:52:07 GMT 2009


Alexander Belchenko <bialix at ukr.net> writes:

> One more attempt to emulate svn:externals, this time via hooks.
> https://launchpad.net/bzr-externals
>
> Disclaimer: I have helped the author to improve it according to bzr
> standards, but I did not try it in action yet. Try it and tell us what
> you think, please.

Those are svn externals for bazaar. That's quite good: it enables me to
replace svn with bazaar on a case that was depending on that feature.

At the very least, it ought to support relative URLs (as svn does since
too). This is specially important when working with local
mirrors. Otherwise you always work against the remote repos (for the
externals only: the branch that contains the externals would be branched
from the local mirror, which could create an undesirable mix).

Furthermore, it would be useful to be able to branch from a branch and
use the contained externals directly. An example:

The Master branch for my.project is on

bzr://bzr.server/my.project/trunk

and contains a .bzrexternals file with

bzr://bzr.server/my.lib/trunk my.lib

so now I create a local branch:

brz branch bzr://bzr.server/my.project/trunk my.project

and I get this layout on my hard disk (the arrow points to the parent
branch):

/home/oscar/my.project         -->  bzr://bzr.server/my.project/trunk
/home/oscar/my.project/my.lib  -->  bzr://bzr.server/my.lib/trunk

Now I want to create a feature branch

brz branch /home/oscar/my.project my.feature

and I get this layout:

/home/oscar/my.feature         -->  /home/oscar/my.project
/home/oscar/my.feature/my.lib  -->  bzr://bzr.server/my.lib/trunk

Usually I don't want that. I find more natural to get:

/home/oscar/my.feature         -->  /home/oscar/my.project
/home/oscar/my.feature/my.lib  -->  /home/oscar/my.project/my.lib

So the plugin should check the availability of the external item within
the branch that is being cloned and use that external if it exists. If
it doesn't exist branch the external using the URL on .bzrexternals.

There are quite a few of special cases that could require special
handling, but even ignoring this, it is useful.

-- 
Óscar




More information about the bazaar mailing list