Has anybody tried this with TFS yet?

Support for our DiffMerge utility.

Moderator: SourceGear

Post Reply
MarkJohnston
Posts: 1
Joined: Fri Aug 24, 2007 7:54 pm

Has anybody tried this with TFS yet?

Post by MarkJohnston » Fri Aug 24, 2007 7:56 pm

We arefinding the TFS merge tools to be completely dodgy and am wondering if anybody has used DiffMerge as their tool of choice while using TFS?

So I guess I am looking for opinions and maybe some pointer if anybody has actually used it how to integrate it and get the most from it.

bfinney
Posts: 81
Joined: Fri Dec 17, 2004 11:27 am

Post by bfinney » Mon Aug 27, 2007 9:54 am

I've used sgdm with TFS on an extremely limited basis, and it seemed to work fine. I can't really offer any advice about getting the most out of it, but it behaved fine in the (admittedly mostly trivial) tests I threw at it.

jeffhostetler
Posts: 534
Joined: Tue Jun 05, 2007 11:37 am
Location: SourceGear
Contact:

let us do some research on this and get back to you.

Post by jeffhostetler » Mon Aug 27, 2007 11:30 am

Let me do some research on this and get back to you.

I plan to add a section to the manual on configuring
DiffMerge with other source code control providers and
TFS is on the list.

It may take a day or two to get to it.

thanks for your patience,
j

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Tue Aug 28, 2007 7:48 am

See http://blogs.msdn.com/jmanning/articles/535573.aspx for more information on configuring TFS with external diff/merge tools. The option is available under Tools, Options, Source Control, Visual Studio Team Foundation Server, Configure User Tools...

For DiffMerge the syntax would be:-

Compare:
  • /t1=%6 /t2=%7 %1 %2
Merge (3-way):
  • /m /t1=%6 /t2=%7 /t3=%8 /c=%9 %1 %2 %3 r=%4

Zante
Posts: 2
Joined: Tue Sep 28, 2010 11:16 am

Re: Has anybody tried this with TFS yet?

Post by Zante » Tue Sep 28, 2010 11:31 am

I am looking at using DiffMerge with TFS, but when I look at the above James Manning link, the args that he mentions for the 3-way merge are:

/title1=%6 /title2=%8 /title3=%7 /result=%4 %1 %3 %2

different than yours:

/m /t1=%6 /t2=%7 /t3=%8 /c=%9 %1 %2 %3 r=%4


What is the significance of /m and /c


Thanks

jeffhostetler
Posts: 534
Joined: Tue Jun 05, 2007 11:37 am
Location: SourceGear
Contact:

Re: Has anybody tried this with TFS yet?

Post by jeffhostetler » Fri Oct 01, 2010 1:36 pm

The /m means to go ahead and auto-merge immediately.
This is just like hitting the auto-merge button on the toolbar
and tries to automatically do all of the simple changes.

The /c is a caption for the title bar of the window.

The /t1, /t2, and /t3 are aliases for /title1, /title2, and /title3
which are the column headings for each of the left, center,
and right panels.

The /r is an alias for /result which is where the output will be saved.

The order of the input files for DiffMerge are "branch_a, ancestor, branch_b".
Usually this is "mine, ancestor, other" so that branch_a matches with
title1, ancestor with title2, and branch_b with title3. But you could just as
easily do "other, ancestor, mine" if you wanted.

There is a troubling difference in the file args in your note: "%1 %3 %2" vs "%1 %2 %3".
I haven't seen the TFS docs in a while and I don't remember what their tokens
mean (and I don't TFS installed anywhere to test), but you want the ordering
that puts the ancestor in the middle. Likewise, for the corresponding %6 %7 %8
values for the titles.

Manning's blog (http://blogs.msdn.com/b/jmanning/archiv ... alues.aspx) shows "... %1 %3 %2 ...".
My DiffMerge 3.3.0 Manual shows "... %2 %3 %1 ...". The only difference is which
side you want your local version on.

I'm not sure where you saw the "... %1 %2 %3 ..." unless it was a doc error
in an older version of my manual.

Please let us know if you have additional questions.
jeff

shaulbehr
Posts: 22
Joined: Sun Aug 08, 2004 1:12 am

Re:

Post by shaulbehr » Sun Jul 07, 2013 12:37 pm

Beth wrote:See http://blogs.msdn.com/jmanning/articles/535573.aspx for more information on configuring TFS with external diff/merge tools. The option is available under Tools, Options, Source Control, Visual Studio Team Foundation Server, Configure User Tools...

For DiffMerge the syntax would be:-

Compare:
  • /t1=%6 /t2=%7 %1 %2
Merge (3-way):
  • /m /t1=%6 /t2=%7 /t3=%8 /c=%9 %1 %2 %3 r=%4
There's a typo in the last command line - left out a slash before "r=%4". Should be:

Code: Select all

/m /t1=%6 /t2=%7 /t3=%8 /c=%9 %1 %2 %3 /r=%4
There are significant differences between this and James Manning's link. This one works perfectly; Manning's one results in exactly the wrong code being auto-merged - i.e. the old code from each merged file is preferred to the new code. Use the parameters listed here if you don't want to cause yourself a lot of stress.

shaulbehr
Posts: 22
Joined: Sun Aug 08, 2004 1:12 am

Re: Re:

Post by shaulbehr » Sun Jul 07, 2013 12:55 pm

shaulbehr wrote:There are significant differences between this and James Manning's link. This one works perfectly; Manning's one results in exactly the wrong code being auto-merged - i.e. the old code from each merged file is preferred to the new code. Use the parameters listed here if you don't want to cause yourself a lot of stress.
Actually, no, on testing further I see that they both result in exactly the wrong code being auto-merged. This is not a good thing.

Please can you help me work out how to make auto-merge prefer the newer code over the old?

shaulbehr
Posts: 22
Joined: Sun Aug 08, 2004 1:12 am

Re: Has anybody tried this with TFS yet?

Post by shaulbehr » Sun Jul 07, 2013 1:13 pm

OK, I experimented a bit, and found that the following parameters seem to work pretty well:

Code: Select all

/m /t1=%6 /t2=%7 /t3=%8 /c=%9 %1 %3 %2 /r=%4
Note: I just switched %2 and %3 around. This appears to have the desired effect.

Post Reply