git-style branches

Marius Kruger amanic at gmail.com
Mon Apr 26 23:26:03 BST 2010


On 28 March 2010 16:18, Marius Gedminas <marius at pov.lt> wrote:
> http://wiki.bazaar.canonical.com/GitStyleBranches answers a
> long-standing question of mine (how can I create branches cheaply after
> doing a bzr branch lp:someproject without creating a shared repository
> in advance).
>
> I see that step 5, which is originally
>
>  bzr switch ../$FOO-repo/{devel,feature1}
>
> can be simplified to
>
>  bzr switch feature1
>
> and bzr will do the right thing in a lightweight checkout of a branch
> from a shared repository.
>
> I do not know exactly what conditions make this possible (must it be a
> checkout?  Is it sufficient to use a shared repository?), so I hesitated
> to update the wiki page.

from `bzr help switch`:
The path to the branch to switch to can be specified relative to the parent
  directory of the current branch. For example, if you are currently in a
  checkout of /path/to/branch, specifying 'newbranch' will find a branch at
  /path/to/newbranch.


> Can step 4 be simplified in a similar manner?  Currently it is
>
>  bzr branch . ../$FOO-repo/feature1

no.

-- 
btw. as is mentioned on the wiki colocated branches is another option
these days:
https://launchpad.net/bzr-colo

<>< Marius ><>



More information about the bazaar mailing list