role of the mirror branch

Talden talden at gmail.com
Fri Jun 12 03:57:55 BST 2009


> I started to use Bazaar in my team and I encountered
> the question, "why do we need the mirror branch?"
>
> In 6.2 of the user guide recommends to create a local
> mirror branch first and create task branches from it.
> But I think you can create task branches from the trunk
> branch on the server. And if you merge it with the server
> trunk branch, the workflow would be equivalent with the one
> described in 6.2 of the user guide.
> The work flow would be like this:
>
>  % bzr branch xxx/ABC/trunk   ABC-bug123
>  % cd BAC-bug123
>   (work, work, work)
>  % bzr merge
>  % bzr commit
>  % bzr push xxx/ABC/trunk
>
> First, I thought that you can save the resource used by
> the shared repository with the mirror branch style. But as far
> as the total file size of ".bzr", the above "direct task branch"
> style consumes the same amount disk size.
>
> Is there any other reasons to create a mirror branch on the local
> machine?

My understanding is so that you can

$ cd trunk
$ bzr merge ../path/to/branch # from branch to trunk
$ # do build activities
$ bzr commit - m "..."
$ bzr push

Rather than

$ cd path/to/branch
$ bzr merge # from trunk to branch
$ # do build activities
$ bzr commit - m "..."
$ bzr push url_for_server_trunk

These produce difference commit logs.  The former show a merge commit
on the trunk nick.  The latter shows a commit on the branch nick.  I
believe this can affect the depth ordering of the log on trunk.

Does anyone know if there's another reason

NB: I use a checkout of trunk rather than a branch.  I don't think it
makes much difference.

--
Talden



More information about the bazaar mailing list