Hi, I was wondering on what the best practises for merging/sharing folder in Vault is.
I recently tried to branch a folder in vault and then merge it back, but encountered some problems.
In our vault we have a folder called 3rdParty that contains different folders with dlls from 3rdParty products that are shared to our different projects.
I was going to upgrade one of these 3rdParty product, and decided that i wanted to do a merge on one of our project and test this upgrade before sharing it to all our projects.
When I hade done the upgrade and was satisfied with the result I tried to merge the branch back to its origin folder with the changes that I had done to the branch.
One of the things that I had done was to change the share link to the 3rdParty folder. I did that by deleting the old version folder (under the MyProject folder)and then sharing the new version folder to the same location.
The folder structure is now:
3rdParty
-1.1
-bin
-2.0
-bin
MyProject
-3rdParty
-bin
And the bin folder in the MyProject\3rdParty\bin is a shared folder of the 3rdParty\2.0\bin folder
When I used the Merge branch wizard it did not do the branch as I would expect it.
First it said that i had not done any move/share.
- So is there another way you are supposed to share folder than the way i did it. (Deleting the old shared folder from MyProject\3rdParty\bin and then share the new 3rdParty\2.0\bin)?
The wizard however said I had deleted a folder and added a folder (which is correct), but I was not allowed to add the new subfolder since that folder already exist in the destinaltion folder I merge into.
I then tried to do the merge in two steps first deleting the folder and committing it and then merging to add the new folder.
In my pending changes i now have :
C:\Documents and Settings\Magne\Local Settings\Temp\bin_1 Add Folder $/MyProject/3rdParty/bin
But I expected the first to be 3rdParty\2.0\bin, does the wizard use this temp folder or is it a bug?
I ended up doing most of the merge manually since It was not many changes I had done...
Regards
Magne Hopland
Best practices Merging a branch/Sharing folders
Moderator: SourceGear
The best practices articles we have on branching can be found here:
I'm not sure I'm seeing quite what's shared and what's branched. When you gave your folder structure, did you mean that the 3rd party portion has all the same things under it?
3rdParty
-3rdParty
If you branched the third party folder, then it would already have the bins. When you delete a bin, that is seen as a change, and if you added a share from the folder you were going to merge back to, I would expect it to see that as a change to that folder and try to add the already existing shared folder back in. You shouldn't need to do any sharing between the branches.
3rdParty
- -1.1
-bin
-2.0
-bin
-3rdParty
- -1.1
-bin
-2.0
-bin
If you branched the third party folder, then it would already have the bins. When you delete a bin, that is seen as a change, and if you added a share from the folder you were going to merge back to, I would expect it to see that as a change to that folder and try to add the already existing shared folder back in. You shouldn't need to do any sharing between the branches.
My folders look like this:
3rdParty\1.1\bin
3rdParty\2.0\bin
MyProject\3rdParty\bin
Where this last folder is the shared folder from 3rdParty.
So first MyProject\3rdParty\bin was refering to 3rdParty\1.1\bin, I then deleted it and shared 3rdParty\2.0\bin to MyProject\3rdParty
PS: I branched the MyProject folder.
Regards
3rdParty\1.1\bin
3rdParty\2.0\bin
MyProject\3rdParty\bin
Where this last folder is the shared folder from 3rdParty.
So first MyProject\3rdParty\bin was refering to 3rdParty\1.1\bin, I then deleted it and shared 3rdParty\2.0\bin to MyProject\3rdParty
PS: I branched the MyProject folder.
Regards
Thank you for the quick response, and sorry for my bad explanation.
My folders before merge and upgrade looks like this:
3rdParty\1.1\bin (this is shared to MyProject\3rdParty\bin)
MyProject\3rdParty\bin
I then Branch the MyProject folder and then have these folders:
3rdParty\1.1\bin (this is shared to MyProject\3rdParty\bin, and also BranchedMyProject\3rdParty\bin)
MyProject\3rdParty\bin
BranchedMyProject\3rdParty\bin
I then add the new version of 3rdParty so I get an folder named 3rdParty\2.0\bin
I then delete the bin folder under BranchedMyProject\3rdParty\bin to remove the share for version 1.1 of the 3rdParty. And then I add the new share to this folder so now my folder look like this.
3rdParty\1.1\bin (this is shared to MyProject\3rdParty\bin)
3rdParty\2.0\bin (this is shared to BranchedMyProject\3rdParty\bin)
MyProject\3rdParty\bin
BranchedMyProject\3rdParty\bin
Now i then needed to merge this BranchedMyProject back into MyProject folder.
Regards
Magne
My folders before merge and upgrade looks like this:
3rdParty\1.1\bin (this is shared to MyProject\3rdParty\bin)
MyProject\3rdParty\bin
I then Branch the MyProject folder and then have these folders:
3rdParty\1.1\bin (this is shared to MyProject\3rdParty\bin, and also BranchedMyProject\3rdParty\bin)
MyProject\3rdParty\bin
BranchedMyProject\3rdParty\bin
I then add the new version of 3rdParty so I get an folder named 3rdParty\2.0\bin
I then delete the bin folder under BranchedMyProject\3rdParty\bin to remove the share for version 1.1 of the 3rdParty. And then I add the new share to this folder so now my folder look like this.
3rdParty\1.1\bin (this is shared to MyProject\3rdParty\bin)
3rdParty\2.0\bin (this is shared to BranchedMyProject\3rdParty\bin)
MyProject\3rdParty\bin
BranchedMyProject\3rdParty\bin
Now i then needed to merge this BranchedMyProject back into MyProject folder.
Regards
Magne
Ok, so one of those bin folders is a share and one is a branch. They probably have a different ID number and so it's attempting an Add and sees the other by the same name.
I'm thinking you should deselect any changes relating to the /bin folders. If you need that specific bin folder in the trunk, then don't have the 1.1 version in there. If you remove it, then you can let the merge branches put the exact same bin folder into the trunk.
Also, if it were to allow the change to that 1.1 bin that you shared, it would go back to the trunk of that folder and change it as well and then you would have no 1.1 bins. When something is shared, any change made to either side of the share gets duplicated in the other side as well.
I'm thinking you should deselect any changes relating to the /bin folders. If you need that specific bin folder in the trunk, then don't have the 1.1 version in there. If you remove it, then you can let the merge branches put the exact same bin folder into the trunk.
Also, if it were to allow the change to that 1.1 bin that you shared, it would go back to the trunk of that folder and change it as well and then you would have no 1.1 bins. When something is shared, any change made to either side of the share gets duplicated in the other side as well.