how to merge folder changes

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

Moderator: SourceGear

Post Reply
dwenzel
Posts: 18
Joined: Thu Mar 11, 2004 2:25 pm

how to merge folder changes

Post by dwenzel » Thu Mar 11, 2004 2:34 pm

I have been using the latest version of Vault 2.0 and am quite happy with its many features. However, there is one feature of Source Safe which is not quite available in Vault and that is the ability to checkin/checkout/add/delete/etc. files from the project/folder difference view. I have seen posts in this and/or other forums here that others have requested this feature but that it would require some interprocess communication between the main tool and the sourcegear diffmerge tool and may not be available for some revisions to come.

Given that, I would like to ask what is the best way to use Vault to achieve the following. I have a current tree of files that I am working on and my customer/colleague delivers to me an update of the files they have been working on. I would like to integrate his changes including removing any files they may have removed, add any files they may have added, and then merge any changes to files that were changed. Can someone provide me with a general sequence of operations I can use to achieve this result? I have explored trying to use the Merge Branches tool/wizard, but I can't seem to figure out a way to setup my origin and target.

Any suggestions will be greatly appreciated.

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

Post by dan » Thu Mar 11, 2004 3:52 pm

The only automated way I can think of do this would be to have your collegue create a branch in Vault and then use that branch to check in/add/delete files as his development progresses.

When it is time to integrate the changes from the branch, invoke Merge Branches and use the branch as the origin and the trunk as the target, and it will automatically update the target with all the changes.

It is too late for this approach for this round of changes though. I think you might have to manually copy changed/added files over to your working folder for this round.

dwenzel
Posts: 18
Joined: Thu Mar 11, 2004 2:25 pm

Post by dwenzel » Thu Mar 11, 2004 4:03 pm

I guess I forgot to mention that my customer/colleague is using his own version control system and so does not have access to anything stored in my Vault repository.

Given that, is there any way to perform the add/delete portion other than to use the folder diff tool and then manually go back into the Vault client and add/delete those files? Is there any way to use the merge branches tool is I were to add all of the files I get from my customer/colleague into a separate tree and use it as the origin and my main tree as the target? The only problem I kept finding was that I needed to specify two versions for the origin so that one could be determined as the baseline.

Do you think it will long before add/delete/checkin/checkout will be added to the folder diff tool, if at all?

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

Post by dan » Thu Mar 11, 2004 4:38 pm

dwenzel wrote:Given that, is there any way to perform the add/delete portion other than to use the folder diff tool and then manually go back into the Vault client and add/delete those files? Is there any way to use the merge branches tool is I were to add all of the files I get from my customer/colleague into a separate tree and use it as the origin and my main tree as the target? The only problem I kept finding was that I needed to specify two versions for the origin so that one could be determined as the baseline.
Yes, this would work - you can creat a new branch when you give the code to your collegue (or branch from the version that your collegue started with), and then when you get all the code back, you would:

1. Do a fresh Get to from the branch into a fresh working folder.
2. Copy all your collegues files over the working folder of files you just retrieved.
3. Checkin all those changes (note that many files will show up as changed, even though their contents haven't changed, because their file dates probably did. That's ok - even though new versions will get checked into the branch, only the actual content changes will get picked up by Merge Branches)
4. Perform the add/deletes in the branch
5. Invoke MergeBranches, choosing the branch as the origin, and choose the branch starting version, and the ending version as the 2 versions to get changes from.
6. Then, all the changed/added/deleted files will get moved properly over to your trunk, and it will merge your collegues changes into the changes you have made since your collegue started making changes.
Do you think it will long before add/delete/checkin/checkout will be added to the folder diff tool, if at all?
This is an interesting usage case that we had not considered. We thought the "apply changes from a diff window" was merely a convenience, but this usage case is actually a "merge changes from a local folder into the trunk".

I don't know when such a feature would be implemented, but it seems like it is much more of a merge feature rather than a diff tool feature. We will certainly add this case to the list.

Thanks,

dwenzel
Posts: 18
Joined: Thu Mar 11, 2004 2:25 pm

Post by dwenzel » Thu Mar 11, 2004 5:07 pm

Yes, I guess having a "merge changes from a local folder into the trunk" is a desirable feature. I have used the Project Differences feature in Visual Source Safe for many years to "reconcile differences" and it has been a very handy tool.

I agree that this feature is more of a "merge tool" feature than a "diff tool" feature, but currently Vault has merge and diff using the same tool (when it comes to folder diffs).

If getting such a "merge changes from a local folder into the trunk" is a major change, might I offer the following suggested changes which I could be used instead and would be very helpful:

. In the status search window, when searching for files that are "missing", provide a context menu item to allow the file in the respository to be "deleted".
. In the status search window, add a new type of file to search on which is "New" which would list files that are in the local folder but not in the repository. It seems that Vault already knows which files these are since it can display them when you click "add files". Then add a context menu which has a command to add the file to the repository and another one which would allow for deleting it from the local folder.
. In the pending change set window, when a file is "edited" provide an additional detail to further distinguish the cases for "size unchanged". The "edited" state is what gets set on files I check out which have a different time stamp, but if a file has been modified but just so happens to be the same size, I really cannot tell that it has been modified. It would be helpful if another detail like "checksum changed" could further distinguish the case when a checked out file is truly modified but may have not changed in size.

I think with these changes to the main client tool I would be able to perform the "reconcile differences" that I need. The suggestion to use the Merge Branches tool would work, but I still have to manually add/delete files onto the branch I created for my colleague, so I am still looking for a way to make this easier (i.e., available from some list with context menu) and less manual.

Post Reply