I ran a simple, yet true-to-life, test to evaluate Vault 4.1's branch merging features. The test was as follows:-
1. Created a branch of a folder containing a text file.
2. Edited the text file in the branch, adding in 2 new lines.
3. Edited the file in the original folder, adding 2 new lines, one of which will conflict with the change in the branch.
4. Merged the branch back to the original folder.
I expected it to tell me that it couldn't merge the file, which it did, leaving the file unchecked. I then expected that if I checked the file it'd mark it as "Needs Merge", so I could later open a 3 way diff to allow me to resolve the conflicts. This didn't happen. Instead it just marks the file as "Edited". If I commit the merge, the target file will be overwritten with the one from the branch and all its changes lost. It didn't make any difference whether I ticked "Attempt Automatic Merge" or not. With the file not marked as "Needs Merge" there doesn't seem any way of bringing up the 3 way diff.
Is this how Vault is supposed to behave or am I doing something wrong?
If we've had a team of developers working for a month or two on a branch while other people work on the "tip", it will be very difficult merging changes back to the tip. We'd have to take note of the names of each file that Vault can't merge, then manually do "diffs" and resolve the changes before attempting the merge again...
Perhaps my understanding of Merge Branches is wrong and there's another way of going about this task?
On a related note, if I have files that Vault can merge successfully, there doesn't seem to be anywhere I can review exactly how its done the merge (apart from manually running diffs). It appears Vault just expects you to trust it.
Merge Branches problem
Moderator: SourceGear
Merge Branches problem
Last edited by andrews on Tue Mar 18, 2008 3:44 pm, edited 1 time in total.
The missing step is that you must do a "Show Merge" command on each of the Needs Merge files in your changeset before they can be committed to the server. You can do that by right-clicking the needs merge file in the pending change set, or in the file list. You will also be prompted to perform the merge if you attempt to commit a Needs Merge file. Any of those things will bring up the three-way merge that you're expecting.
I'd gladly do a "Show Merge" on the Needs Merge files. As I said in my post though, the files aren't being marked as Needs Merge, they're being marked as "Edited" and the Show Merge item on the context menu is greyed out when I right-click. If I commit, the files in the target folder are zapped, overwritten with those from the source folder.
I'm quite sure I performed this test with 4.0.6 and didn't have this problem. We're just finishing our evaluation now and until we hit this issue everything was looking good...
I'm quite sure I performed this test with 4.0.6 and didn't have this problem. We're just finishing our evaluation now and until we hit this issue everything was looking good...
I just tried a simple merge as you described, and the file was marked as needs merge. Were you testing with a binary file which couldn't be merged?
- Attachments
-
- andrew.png (35.92 KiB) Viewed 3222 times
-
- andrew2.png (26.66 KiB) Viewed 3222 times
-
- andrew3.png (29.9 KiB) Viewed 3222 times
-
- andrew4.png (44.86 KiB) Viewed 3222 times