"Resolve Merge" in 3rd-party diff/merge

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

Moderator: SourceGear

stevek2
Posts: 70
Joined: Wed Jun 23, 2004 5:53 pm

"Resolve Merge" in 3rd-party diff/merge

Post by stevek2 » Thu Oct 23, 2008 6:02 pm

When using a 3rd-part merge tool (ie, Beyond Compare 3), it doesn't ask me to "Resolve Merge Status" like it does with DiffMerge or sgdm.exe -- how does a 3rd party app indicate to Vault to do this?

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

Re: "Resolve Merge" in 3rd-party diff/merge

Post by Beth » Fri Oct 24, 2008 12:14 pm

After you perform the merge and have the changes saved to disk, are you still getting a 'Needs Merge' status?

If so, what happens if you perform a Get on that file, but select the option to 'Do No Overwrite/Merge Later'? Does it change its status to edited?
Beth Kieler
SourceGear Technical Support

stevek2
Posts: 70
Joined: Wed Jun 23, 2004 5:53 pm

Re: "Resolve Merge" in 3rd-party diff/merge

Post by stevek2 » Fri Oct 24, 2008 12:20 pm

I guess I'm asking the more general question of how Vault determines whether to prompt the user to "Resolve Merge Status?" once the merge utility terminates. Does Vault check the date/time stamp of the file %DEST_PATH%, and only prompt for "Resolve Merge Status?" if that file has been updated? Or does it use some other mechansim?

GregM
Posts: 485
Joined: Sat Mar 13, 2004 9:00 am

Re: "Resolve Merge" in 3rd-party diff/merge

Post by GregM » Sun Oct 26, 2008 6:51 am

According to other posts from SG staff, it only does it for its own diff/merge products, since it can't be sure that the third-party products have actually performed the merge when the program that they call has exited.

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

Re: "Resolve Merge" in 3rd-party diff/merge

Post by Beth » Mon Oct 27, 2008 7:22 am

The prompt to resolve occurs when the merge process finishes. I don't think anything else will trigger that. You can right-click the item and select Resolve Merge Status.
Beth Kieler
SourceGear Technical Support

stevek2
Posts: 70
Joined: Wed Jun 23, 2004 5:53 pm

Re: "Resolve Merge" in 3rd-party diff/merge

Post by stevek2 » Mon Oct 27, 2008 12:48 pm

But that's exactly my question -- how does Vault define "merge process finishes"?

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Re: "Resolve Merge" in 3rd-party diff/merge

Post by jeremy_sg » Mon Oct 27, 2008 3:17 pm

Vault watches the actual exe that it starts. When that exe exits, then Vault will prompt for the resolve. Is this a case where beyond compare never exits?
Subscribe to the Fortress/Vault blog

GregM
Posts: 485
Joined: Sat Mar 13, 2004 9:00 am

Re: "Resolve Merge" in 3rd-party diff/merge

Post by GregM » Wed Oct 29, 2008 8:07 pm

No, but the Resolve Merge prompt is only shown for DiffMerge.exe and SGDM.exe.

http://support.sourcegear.com/viewtopic.php?t=3387

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Re: "Resolve Merge" in 3rd-party diff/merge

Post by jeremy_sg » Thu Oct 30, 2008 7:28 am

Thanks, Greg. Once again, our users know the product better than me. :)
Subscribe to the Fortress/Vault blog

stevek2
Posts: 70
Joined: Wed Jun 23, 2004 5:53 pm

Re: "Resolve Merge" in 3rd-party diff/merge

Post by stevek2 » Thu Oct 30, 2008 10:24 am

So, again, I repeat my question -- how does Vault know to put up the "Resolve Merge" prompt? Is it specifically checking for the executable name "SGDM" or "DiffMerge" ? I tend to doubt that you would have hardcoded that into the client...

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Re: "Resolve Merge" in 3rd-party diff/merge

Post by jeremy_sg » Thu Oct 30, 2008 12:01 pm

After looking at the code, the only times that we bring up the resolve merge dialog is when the option for diff executable is blank. If you want a third party exe to launch, copy it over the Program Files\SourceGear\Vault Client\sgdm.exe file, and you should be prompted to resolve merge after the exe is finished.
Subscribe to the Fortress/Vault blog

stevek2
Posts: 70
Joined: Wed Jun 23, 2004 5:53 pm

Re: "Resolve Merge" in 3rd-party diff/merge

Post by stevek2 » Thu Oct 30, 2008 12:04 pm

>After looking at the code, the only times that we bring up the resolve merge dialog is when the option for diff executable is blank.

But if that's true, why does it work for DiffMerge? I remember reading a forum post where someone from SG said that you specifically added "Resolve Merge" prompting for DiffMerge.

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Re: "Resolve Merge" in 3rd-party diff/merge

Post by jeremy_sg » Thu Oct 30, 2008 12:56 pm

I'm obviously too tired to read code today. You're right. Here's the code.

Code: Select all

if ((app == null) || (app.Trim().Length == 0))
{
	app = "%VAULT_EXE_DIR%/sgdm.exe";
	bUsingSGDM = true;
}
else
{					
	string tmp = app.ToLower();
	int n = tmp.IndexOf("sgdm", 0); 
		
	if (n != -1)
		bUsingSGDM = true;
}
Subscribe to the Fortress/Vault blog

stevek2
Posts: 70
Joined: Wed Jun 23, 2004 5:53 pm

Re: "Resolve Merge" in 3rd-party diff/merge

Post by stevek2 » Thu Oct 30, 2008 1:27 pm

This code still seems to be specific to SGDM. So what about DiffMerge?

Even apart from DiffMerge, why not have the client always prompt for "Resolve Merge" once the .EXE exits, IF the target file has been updated with a newer timestamp?

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Re: "Resolve Merge" in 3rd-party diff/merge

Post by jeremy_sg » Thu Oct 30, 2008 2:23 pm

This is from the latest client, which ships with sgdm.exe (which is the executatble name for SourceGear DiffMerge).

The problems that we have all come from a lack of control over how other merge tools work. For example, Araxis Merge (if I recall correctly) returns immediately (starting another process to handle the actual merge window). This can all be boiled down to: We handled the case we can control, and did our best not to do something really bad in the cases we couldn't control.
Subscribe to the Fortress/Vault blog

Post Reply