Branching best practices

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
hgreer
Posts: 1
Joined: Fri May 20, 2005 10:59 am

Branching best practices

Post by hgreer » Fri May 20, 2005 11:05 am

I want to know best practices for branching... here's what I was thinking

TRUNK/ dev_1.0

BRANCH/ qa_1.0

BRANCH/ prod_1.0

Here's where I get confused. I want to make a maintenance_1.0 and the corresponding version 2.0 branches. Would this be correct?

BRANCH/ maintenance_1.0

BRANCH/ dev_2.0

BRANCH/ qa_2.0

BRANCH/ prod_2.0

Does this mean that there will only be one TRUNK forever or do I make a TRUNK/ dev_2.0 and then branch from this trunk?

Thanks for the help in advance!

-H

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Fri May 20, 2005 12:52 pm

See this KB article for some ideas:
http://support.sourcegear.com/viewtopic.php?t=193
Linda Bauer
SourceGear
Technical Support Manager

shaifl
Posts: 3
Joined: Tue May 31, 2005 2:59 am
Location: mindU
Contact:

Understanding branches

Post by shaifl » Tue Jun 07, 2005 12:24 am

Hello,

I'm new to the Vault and originally come from the world of Rational ClearCase.
I am a bit confused to the implementation of brnaches in the Vault.
I read the article 'Best Practices for Managing Branches' and now what I understand is that a branch in Vault is maintained as a directory(?) visible with all other directories.
In ClearCase the case is different and a branch is a spereate development environemnt for a file/folder visible only to whoever configured it's client to see that branch.

Can I understand that in Vault, branches are always visible to everyone and that they are basicly a copy of the branched source into a new directory?

If you could help me clarify this I would be gratefull.

Thank you,
Shai Fleischmann
SCM
mindU
shai@mindu.co.il
www.mindu.co.il

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Tue Jun 07, 2005 8:34 am

You also sent an email about this with a question about branch vs share and I'll address both here.

The Share command allows you to make files or folders appear in two distinct places in the repository. Any change made to the file or folder in any of its shared locations will be reflected in all locations after the change is made.

You can branch a share (Share Branch) which breaks the link between the shared file or folder. When you branch a share, changes to one file/folder are no longer reflected in the other share locations.

You can also use Branch to make a copy (Copy Branch) of a file or folder into a different location in the tree.

So the main difference between share and branch is that Share creates a linked copy, and making a change to a shared item also changes its
link(s). But when you branch, you make a new copy of an item which is independent of the item you branched from.

You mentioned that in Clear Case only the user who makes a branch can see the branch.

In Vault, branches are visible to any user -- although if Folder Security is turned on, only users with rights to the location of the new branch will be able to see it.
Linda Bauer
SourceGear
Technical Support Manager

shaifl
Posts: 3
Joined: Tue May 31, 2005 2:59 am
Location: mindU
Contact:

Branches

Post by shaifl » Wed Jun 08, 2005 1:05 am

Linda, thank you for your response.

I understood what share is, didn't quite get how branch is used, but yesterday I read two of Erik Sink's articles about the subject which made it clearer, and you just helped me to seal off the subject :D .

Erik explained that there are two ways to implement branches-
1. A branch is like a parallel universe. The hierarchy of files and folders in the repository is sort of like the regular universe. For each branch, there is another universe which contains the same hierarchy of files and folders, but with different contents.
2. A branch is just another folder, located in the same repository hierarchy as everything else. When you create a branch of a folder, it shows up as another folder.
http://www.ericsink.com/scm/scm_branches.html

The second way is the way the Vault implements branches and the first way is the way I know from ClearCase. Coming from that concept it is a bit difficult to accustom to the second way (which is simpler as much as I gather).

The thing I still didn't understand until reading your reply was who can see the branch.

Because in CC the branch is a 'separate universe', each branch can be treated as private development environment to who ever needs it, visible to them alone. This method is quite helpful when many branches exist in the system for concurrent development.

Due to the fact of coming from this working method I was wondering how implementation of it can be done in Vault.
Now I can understand that all branches are visible to everyone, and if needed using permissions, branches can be hidden from 'unauthorized' users. This probably will result in endless administration work and therefore not a really good working method for Vault.

Thanks again, everything is much clearer now.

Cheers,
    Shai Fleischmann
    SCM
    mindU
    shai@mindu.co.il
    www.mindu.co.il

    Post Reply