Shared repository inside shared repository

Asked by Gil.I on 2012-01-26

can i create shared repository inside Shared repository and still benifit from the shared repository advantages?

I want each developer to have its local branches of the project mirrored into network --> every developer has shared repository on his computer.
But i want to use shared repository on top of ALL users branches because they shared much history.

can it be done?
or co-located branch is better solution?

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Solved by:
Martin Pool
Solved:
2012-01-30
Last query:
2012-01-30
Last reply:
2012-01-30
Gil.I (gidelson) said : #1

The mirroring is done by auto-mirror plugin

Martin Pool (mbp) said : #2

You can have one repository directory inside another _but_ bzr will
only look in the closest enclosing repository directory for a branch.
So, it won't get the behaviour you want.

If you want the developers to each have a local copy of all history,
which is generally a good idea, then you should just branch and pull
the trunk etc branches into that repository.

You could have the branches be stacked on a network repository, but
that is likely to make some operations run at network speed, or fail
because of network outages, when they could otherwise be entirely
local. So I wouldn't really recommend it.

--
Martin

Gil.I (gidelson) said : #3

Maybe i need to elaborate my question:
1. I want that each developer workflow will be feature branches
     --> create shared repsitory on every developers local pc
2. Network location need to contains each developer FULL backup of ALL branches for backup purposes (Company server is backed-up
every day) as well as easy access for integrator for MERGE purposes.
In addition the network contains the FORMAL releases directory that contain the formal software releases after all merge opeartions needed.

What is the network folder better strucutre?
**************** Method 1 (several shared repo) ***********
proj_name (shared repo)
    .bzr
    developer a (shared repo) - integrator
        .bzr
        trunk
        feature a
        feature b
    developer b (shared repo)
        .bzr
        trunk
        feature a
        feature b
    developer c (shared repo)
        .bzr
        trunk
        feature a
        feature b

   formal version

**************** Method 2 (single shared repo) **************
proj_name (shared repo)
    .bzr
    Trunk
        developer a (integrator)
        developer b
        developer c
    feature a
        developer a (integrator)
        developer b
        developer c
    feature b
        developer a (integrator)
        developer b
        developer c
    formal
        developer a (integrator)

        .bzr
        trunk
                feature b
    dev b (shared repo)
        .bzr
        trunk
        feature a
        feature b
   formal version

Gil.I (gidelson) said : #4

Please ignore the last 9 lines from .bzr until formal version (copy paste typp...)

Gil.I (gidelson) said : #5

typp = typo

Gil.I (gidelson) said : #6

I read some more and realized that i can make the strucutre to be like this:

proj_name (shared repo **with working tree**)

.bzr
developer a (integrator) (FOLDER)
    trunk (branch)
    feature a (branch)
    feature b (branch)
developer b (FOLDER)
    trunk (branch)
    feature a (branch)
    feature b (branch)
developer c (FOLDER)
    trunk (branch)
    feature a (branch)
    feature b (branch)
formal version (branch)

I want that formal version branch will be branch without working tree, where all the other branches will be with working tree.
Is that possible?

NOTE : I tried to create the formal version branch with bzr push N:\Projects\proj1\formal --no-tree but its still create the working tree

Martin Pool (mbp) said : #7

I don't understand what directory structure you're trying to communicate in your comment #6

The simplest or most standard answer for this situation is that the developers ought to have their primary branches on their workstations/laptops, and then push from there to a central server so that others can see their work and so that it can be backed up.

Gil.I (gidelson) said : #8

The directory structure i wrote in comment #6 is on the central server.
This way the integrator can merge the work of developer/feature he wants.
In addition , this folder strcuture contains backup of each developer/feature branches.

Given this directory structure , i want to ask:

I want that formal version branch will be branch without working tree, where all the other branches will be with working tree.
Is that possible?
NOTE : I tried to create the formal version branch with bzr push N:\Projects\proj1\formal --no-tree but its still create the working tree

Best Martin Pool (mbp) said : #9

On 30 January 2012 18:30, Gil Idelson
<email address hidden> wrote:
>
> I want that formal version branch will be branch without working tree, where all the other branches will be with working tree.
> Is that possible?
> NOTE : I tried to create the formal version branch with bzr push N:\Projects\proj1\formal --no-tree but its still create the working tree

I'm not sure why that's creating the tree - if you can give
reproduction instructions you can file a bug. But, anyhow, you should
be able to say 'bzr remove-tree PATH' to get rid of it.

--
Martin

Gil.I (gidelson) said : #10

Thanks.
'bzr remove-tree PATH' command is great. I need to do it only once and from now on , any push (even without the --no-tree switch , will not create the tree)

I will file a bug on the push bug.

Gil.I (gidelson) said : #11

Thanks Martin Pool, that solved my question.