What is the point of co-located branches?

Asked by Igor Karatayev on 2012-03-16

Don't get it from documentation.

Can I use co-located branches to store different working trees in on folder.
Ex. I have two projects -
first with some framework code, and
second - specific project build on top of that framework, expanded by adding some specific files

should be shared by both branches and
should be only in second branch

can i use co-located branches in this scenario

Question information

English Edit question
Bazaar Edit question
No assignee Edit question
Solved by:
Igor Karatayev
Last query:
Last reply:
Jelmer Vernooij (jelmer) said : #1

I'm not sure if I understand your question. Different working trees can by definition not be in the same folder, as they need the files to be present on disk.

colocated branches allow multiple branches to existing in the same control directory. You still have one working tree for that control directory, and you can select which branch should be active (in other words, used by the working tree).

Scanferlato (jls-boost) said : #2

Probably the answer to the last question is "no".

Perhaps what Igor is asking for is something available under Visual Source Safe. VSS has a "Share" feature that lets you "mark" a source file as "shared" between one or more projects, in such a way that a change made to any of the copies is automatically propagated to all the projects using it.

If this hypothesis is correct, then the next question could be: does Bazaar have anything like this?

Igor Karatayev (yatagarasu) said : #3

Yes, ScanFelrlato, you are right.
I think that feature can be easely emulated by holding different .bzr folders in working tree root.
For me this feature is more useful than co-located branches, and i still don't get what are they for.
I think it is something like branching in svn or csv.

Jelmer Vernooij (jelmer) said : #4

colocated branches are similar to how branches work in git or mercurial.

it sounds like what you're looking for is more like nested trees or bzr-externals (although I have no experience with VSS).