Branching and Vault File Share

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

Moderator: SourceGear

Post Reply
M4
Posts: 10
Joined: Mon Apr 11, 2005 12:06 pm
Location: AZ
Contact:

Branching and Vault File Share

Post by M4 » Fri May 20, 2005 11:41 am

I have a couple of questions:

1. When I branch, is it possible to retain share links?

2. Now that I've branched and have lost my share links for [ file.cs ] lets say, how can I restore that share link of this file between projects if the file now exists in both projects without a share? I fear having to remove the file from one of the projects because I don't want to lose the history on these now two seperate files.

Regards,

Reed

M4
Posts: 10
Joined: Mon Apr 11, 2005 12:06 pm
Location: AZ
Contact:

Post by M4 » Fri May 20, 2005 11:43 am

Perhaps it wont matter if I drop one of the files from the project as when the share is created, the history of the replacing file will be available. Is this a correct understanding?

Reed

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Fri May 20, 2005 12:10 pm

Branching a folder will retain any share links within the scope of that folder. For example, if you have a shared file foo.cs within $/trunk/project, if you branch $/trunk/project to $/branch/project, foo.cs will remain shared in each branch, but they won't be shared across both branch and trunk.

And yes, if you share a file, the full history of the file appears in all links of the share.

mlippert
Posts: 252
Joined: Wed Oct 06, 2004 10:49 am
Location: Cambridge, MA

Post by mlippert » Fri May 20, 2005 12:18 pm

I think I understand how branching affects shares and the rationale behind the behavior.

Shares between files that are both descendents of the folder being branched are preserved.

Shares between files where 1 file is outside of the folder being branched are broken.

If you are following the common branching paradigm of created a branch for a release of a mainline (trunk) this makes a lot of sense.

If the share is between descendents of the branched folder, then that relationship (the same file used in 2 sub-projects) should be maintained in the branch.

However if the share was to a file outside the folder (trunk) that was branched, then it is likely that you would want to make sure that changes to that file in the branch (release) are only done if the release requires them, while changes to the mainline are still reflected in both shared files. Therefore the share in this situation is broken in the branch.

I hope that made sense,
Mike

You may want to wait for a more official answer, but in answer to your question, you should be able to delete the no longer shared file in the branch, and then reshare it. All shared files have the same history.

Guest

Problem Realized - But what now?

Post by Guest » Fri May 20, 2005 12:42 pm

Ok the problem is this:

Trunk A (mainline code) was copied to new directory and added to a different repository and called TRUNK B. (THIS BROKE THE SHARE LINKS IN TRUNK B)

Plan of action is to restore those share links manually in Trunk B. Is there a way to get a report of the shared files in Trunk A?

Thanks much,

Reed

mlippert
Posts: 252
Joined: Wed Oct 06, 2004 10:49 am
Location: Cambridge, MA

Post by mlippert » Fri May 20, 2005 12:50 pm

Reed,
Well now I understand your issue, but I don't know a solution. Actually there have been other circumstances where it would have been really useful for me to be able to find all shared files also.

So I'm hoping someone at SourceGear has a solution for you,

Mike

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Fri May 20, 2005 1:04 pm

Sorry, there isn't an easy way to figure out where all the shared folders/files are. Once you know them, you can see the other links in the path via the properties dialog on the file or folder.

Post Reply