Problems accepting merge results in tfs integration from vs

Discussion of open issues, suggestions and bugs regarding file and folder merge tool – Code Compare
Post Reply
byggwir
Posts: 7
Joined: Wed 06 Feb 2013 08:13

Problems accepting merge results in tfs integration from vs

Post by byggwir » Thu 07 Feb 2013 11:32

If I get a merge request from tfs and look at the result integrated in the IDE I don't know how to accept the changes.

1. If I do nothing and just close all (if I think the middle (result) is ok) then it says the merge was cancelled.
2. If I press Ctrl+s for saving then on closing the merge window I get a dialog asking which file to accept as result (although only one file is modified). Problem: The file selected and modified is the one the cursor was in when pressing ctrl+s. In my case it was the "Their" file and not the result file.

so how can I accept changes and let VS use the result file? Do I really have to place the cursor in the result file and press ctrl+s? (Using the mouse is not so good. I would prefer working with the keyboard only)

Thanks

AlexeyN
Devart Team
Posts: 244
Joined: Wed 12 Sep 2012 12:09

Re: Problems accepting merge results in tfs integration from vs

Post by AlexeyN » Thu 07 Feb 2013 16:53

We have confirmed the issue. For Visual Studio 2010, you can use the following workaround:
http://forums.devart.com/viewtopic.php?f=36&t=23622

Could you describe your use-case in a greater detail? In the current version, Code Compare copies the Mine file in the Result file, so you can just click "Keep local version" in the "Resolve conflicts" window and you don't need to perform additional actions.

We are planning to improve our merge dialog, making it more user-friendly and generally improve merge operation in TFS.

byggwir
Posts: 7
Joined: Wed 06 Feb 2013 08:13

Re: Problems accepting merge results in tfs integration from vs

Post by byggwir » Thu 07 Feb 2013 21:06

Most common use case in our team is:
I work on changes (feature or bugfix) and once I am finished I make a "get latest changes" from source control before final build and check-in. Often someone else has also changed the files I have changed.
So I view every file manually to review my changes and the new changes and merge them. Finally the merged result is accepted and I close the merge tool.

With my current merge tool I have optimized the handling via keyboard and it looks like this. (Most of the team have similar handling but everyone uses a merge tool of choice):

- On merge request I select "merge files in tool manually".

- Merge Tool opens with 3 panes. Middle is the base file. Left is theirs and right is mine (all three are configurable). I go through the differences and make/accept/deny changes in the tool. (Even sometimes manually type new code to adapt the other ones code).
(I prefer this to be a separate window that I can maximize on the screen because some files are large)

- Merging is done to the middle pane. Which finally is the resulting file (without changing the base file). The middle pane is returned to VS as result after saving.
(An automerge feature is available that, if activated, suggests a result in the middle pane instead of the base file. With undo I can get back to the base file)

- I press ctrl+s to save the changes. Changes can only be made to the result. Not to "theirs" and "mine". Saving only affects the result. I don't have to select which one to save.
(-> this is special to merging with VS. I would not expect this in case I use it as a standalone tool. Saving the other files could be handy in other situations.)

- I press ESC to close the tool (with CodeCompare you have to press ESC twice to close the window completely) and finish merging.

- VS notices the end of the merge and asks if I want to accept the changes. Merge is finished for this file and the next one is shown (standard VS/TFS behavior in 2010).

- Afterwards every change is also peer reviewed with a compare tool (not merge) on screen before checkin.

This is my use case. I hope it is of help to you.

I like your tool because of the source code sensitive behavior. Showing moved parts and so. Behaves like code editor which is no break in workflow. Just great.
If I can realign the differences as in one of the posts requested this would be wonderful.

My largest issue is: Saving (or accepting) the results of merging easily. But you seem to be working on that.

Two quirks I don't like:
-Undo is "per pane" and not ordered by first to last change no matter what pane.
-pressing ESC twice to close the window instead of once in case it is the last compare/merge opened.

best regards

AlexeyN
Devart Team
Posts: 244
Joined: Wed 12 Sep 2012 12:09

Re: Problems accepting merge results in tfs integration from vs

Post by AlexeyN » Mon 11 Mar 2013 16:25

Thank you for an elaborate reply, we take your suggestions into consideration for the future product updates.

Post Reply