View Full Version : Beyond Compare as a merge tool for Team Foundation
Hi,
I configured BC as the diff tool for Team Foundation as described in the KB article.
I also configured it as the merge tool, but each time I close it, I get an error message saying "The manual merge for <file name> has been canceled".
Any ideas?
Thank You,
Shay
Chris
26-Jul-2006, 02:35 PM
I haven't heard reports of this error from any of our users yet. So far I've only heard from those using BC as a diff tool with Team Foundation, not as a merge tool.
What steps did you take to configure BC as a merge tool?
shayc
27-Jul-2006, 02:25 AM
Basically, its very similar to configuring BC as a diff tool.
In the "Configure Tool" dialog, I've entered the following:
Operation=Merge
Command=C:\Program Files\Beyond Compare\BC2.EXE
Arguments:%1 %2 /title1=%6 /title2=%7
BC is launched and performes the merge but when I close it it seems like the return value causes Team Foundation to display an error message and cancel the merge operation.
Thank You,
shay
Chris
27-Jul-2006, 04:22 PM
I found a good article on this at MSDN blogs:
http://blogs.msdn.com/jmanning/articles/535573.aspx
The variables %1 and %2 are only the files to compare. You'll need to specify %4 in the argument to BC as the file for saved changes. Without this, changes won't get saved to version control.
For merge, try using
Arguments:%1 %2 /savetarget=%4 /title1=%6 /title2=%7
This will make a save in the left or right pane save to filename %4.
shayc
30-Jul-2006, 12:47 AM
Thank you,
Worked like a charm...
Shay
Thank you for this hint,
I wonder if it should not be included in the "official" list :)
Garpur
Chris
15-Feb-2007, 05:00 PM
Garpur,
Thanks for the suggestion. I added this to our Version Control page.
ischyrus
07-Aug-2008, 01:32 AM
Which Version Control page are you guys referring to?
Craig
07-Aug-2008, 07:08 AM
Using BC with Version Control Systems (http://www.scootersoftware.com/support.php?zz=kb_vcs.php)
ischyrus
11-Aug-2008, 01:33 PM
I just switched to 3.0 and its not working with TFS2008 :-(
When I do merges it says that the merge has been canceled.
Craig
11-Aug-2008, 02:07 PM
ischyrus,
Have you updated your paths to the values showin in the version control knowledge base article? You you just swapped out "<Program Files>\Beyond Compare 2\BC2.exe" with "<Program Files>\Beyond Compare 3\BCompare.exe" you can run into trouble. Take a look at the article linked in the post just above yours.
ischyrus
11-Aug-2008, 03:23 PM
My settings are exactly as described.
I even tried using both BComp.exe and BCompare.exe. I noticed when using the command "tf diff" it actually says that BCompare.exe returns a wierd exit code. I'm wondering if that has something to do with my issue.
For example: "The program C:\Program Files\Beyond Compare 3\BCompare.exe failed with exit code 13." I don'w know why it would do that over a diff.
ischyrus
16-Aug-2008, 12:30 AM
*ping*
Has someone at SS verified this with TFS 08?
What would be causing and exit code 13 on a simple diff?
Michael Bulgrien
16-Aug-2008, 01:02 AM
I've been using BC3 as my diff and merge engine for Visual Studio Team Foundation Server (both 2005 and 2008 editions) since April. The settings I use are described in this post (http://www.scootersoftware.com/vbulletin/showpost.php?p=1779&postcount=16). Using BCompare will certainly cause issues. Don't do it. Use BComp.exe instead.
ischyrus
10-Oct-2008, 05:47 PM
This feature makes the product absolutely unusable. How can I disable this? The only time this error level should be anything but 0 is when I close the app with solving a conflict or not saving.
---
The following DOS Error Levels are set on exit:
0 Success
1 Binary Match
2 Rules-Based Match
11 Binary Difference
12 Similar
13 Rules-Based Difference
14 Conflicts Detected
100 Unknown error
101 Conflicts Detected. Merge output not written.
Beyond Compare also supports command lines from ClearCase automatically for interactive and silent comparisons and merges.
Matthew Kerr
23-Oct-2008, 11:59 AM
I can't seem to get BC2 to successfully merge changes to make the TFS dialog happy. I always get the "canceled" message even after saving changes. I am using the exact parameters from the version control FAQ linked earlier in this thread.
ischyrus
23-Oct-2008, 08:37 PM
My problem ended up being that I had the personal version. If you want to do merges you have to purchase the Professional version.
Matthew Kerr
27-Oct-2008, 03:38 PM
I have a site license file given to me by my company, so I'm assuming it's a Pro version but I can't see any text in the program itself that says one way or another.
Craig
27-Oct-2008, 04:07 PM
Hi Matthew,
There's only a single version of BC2; it doesn't have a pro version like BC3 does.
BC2 always returns an exit code of 0. Make sure that you use the "Save" command before you exit; BC2 doesn't force you to save changes like BC3 does. If you've done that I can't think of what else TFS would check that would make it consider the merge failed. You might make sure that "Allow multiple instances of program" is checked in the "Startup" options.
bobrothster@gmail.com
28-Oct-2008, 11:44 AM
I too am having the same problem with BC3 with TFS 2005.
However, upon reading the posts it appears that perhaps the problem may be with the DOS Error Codes listed by ischyrus.
Since I (we) are performing a merge, the resulting merged file (right hand side) is almost certainly still different than what is on the server (left hand side) and therefore an exit code of 13 (Rules-Based Difference) would be the correct exit code.
It's appears that Visual Studio is thinking that is an error and saying that the operation was cancelled.
Perhaps I"m wrong, but it appears to be the likely suspect.
Can anyone at Scooter (or other) suggest a solution or workaround? The only idea that I have is to maybe add a switch that would supress the exit codes returned and always return 0.
Bob
Craig
28-Oct-2008, 11:51 AM
Hi Bob,
Are you using the BC3 Standard with the /savetarget switch (two files side-by-side, no separate output window)? That would would set the error code to 13, which TFS would treat as a cancel. The 3-way merge in BC3 Pro sets the error code to 0 in the same situation.
bobrothster@gmail.com
28-Oct-2008, 12:23 PM
Hi Craig,
Thanks for your quick response. Yes, I'm using BC3 Standard specifying the /savetaget switch. It sounds like I have to upgrade to Pro in order to get around this issue?
My workaround so far has been to perform my merge as usual (and recieve the cancelled msg) and then try to checkin again and say "Auto Merge" and it appears to work. Of course, I have only just setup VStudio to use BC3 and so for my merges have been pretty tame. This may not work in every situation, especially if it's a complicated merge with overlapping changes.
BTW, I've also seen the following configuration for merging in one of the other threads:
%1 %2 %3 %4 /title1=%6 /title2=%7 /title3=%8 /title4=%9 /solo
I assume that this is for 3-way merging in Pro?
Thanks,
Bob
Craig
28-Oct-2008, 12:38 PM
No need to upgrade; we want BC3 standard to replace BC2. I was just confirming the issue.
We'll change the next release so if the /savetarget switch is given it will use the same return codes as the 3-way merge.
That command line is for the 3-way merge, but it's out of date because the /solo switch isn't needed anymore. The current TFS switches are fully documented in the VCS knowledge base article (http://www.scootersoftware.com/support.php?zz=kb_vcs.php).
bobrothster@gmail.com
28-Oct-2008, 12:50 PM
OK. So it sounds like I just need to use my workaround until the next release then.
Is there any way to get notified when or check if a specific issue gets fixed? Or should this be a pretty easy fix and the next time an update is available via the automatic updates it should be resolved then?
Thanks again,
Bob
Craig
28-Oct-2008, 12:55 PM
I've already checked in a fix. The next time you see "New Version Available" it'll be fixed.
bobrothster@gmail.com
28-Oct-2008, 01:35 PM
You sir, are awesome!
Thank you,
Bob
citykid
09-Oct-2009, 06:00 AM
Ok, I still have this issue here, can someone please tell me how I can avoid this "merge has been cancelled". I have the latest bc3 and still get this mesasge.
Aaron
09-Oct-2009, 04:15 PM
Are you using BComp.exe instead of Bcompare? Does your configuration match what is listed in this KB article?:
http://www.scootersoftware.com/support.php?zz=kb_vcs.php
mastoj
07-Nov-2011, 05:32 AM
Does anyone have a solution to this? I am using VS2010 with a TFS as source control. Every time I merge a file manually I get the "The manual merge for <file name> has been canceled".
When should the change get picked up? When I save the file or when I close beyond compare?
ischyrus
07-Nov-2011, 10:58 AM
Are you sure you have the 'professional' version? If memory serves, my issue was that I didn't and only the professional version supported merging.
Aaron
07-Nov-2011, 01:25 PM
In addition to ischyrus' comments, if you are running Std edition, you can follow this guide to revert to trial mode and test out Pro features:
http://www.scootersoftware.com/support.php?zz=kb_evalpro
mastoj
11-Nov-2011, 03:49 AM
I have the professional trial version. I'm trying this out to see if we should get it to the whole team, and for us to get it for the whole team merging must be working.
The problem isn't that merging doesn't work, the problem is when I save the file the coflicts doesn't get marked as "fixed". Instead I get my error message: "The manual merge for <file name> has been canceled".
Aaron
11-Nov-2011, 11:15 AM
Hello,
Are you currently using BComp.exe, .com, or Bcompare.exe as your configuration? Is your setup identical to the steps on the vcs kb article?
http://www.scootersoftware.com/support.php?zz=kb_vcs#tfs
mastoj
16-Nov-2011, 04:12 AM
Thanks for you reply. My setup is identical to the one in the article.
I think the UI for the three way merge might have caused the problem. When I just save the file, without choosing where to save it in the drop down above the merge result i started working. I noticed that the status got changed to canceled when I selected file in the drop down.
Aaron
17-Nov-2011, 03:22 PM
Hello,
Changing the output would 'cancel' the current merge, since you are no longer performing the merge with the original parameters. What was expected or why were you changing one of the path edits?
vBulletin® v3.7.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.