Using VCDiff.dll in a custom app

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

Moderator: SourceGear

Post Reply
nottoc
Posts: 4
Joined: Mon Nov 27, 2006 3:14 pm

Using VCDiff.dll in a custom app

Post by nottoc » Mon Nov 27, 2006 3:35 pm

I would like documentation on how I can access VCDiff and/or SGDiff from a custom C# app. Specifically, I want to know how to display the difference window (looks like a VCDiff ability if I read my object browser right), what kind of input I recieve back from the window (assuming they make edit modifications how is that communicated to me).

Also, if the existing VCDiffWindow does not have the abilities I need, how would I go about interfacing with SGDiff (which seems to contain the functionality for generating a list of changes).

We have version 3.5.1

Thanks,
Dave

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

Post by Beth » Tue Nov 28, 2006 1:32 pm

The diff tool in Vault is sgdm.exe. If you look in your Admin tool, you will see the arguments we typically pass to it.

The other option I could think of would be to call the Vault command line client and use the diff command.

nottoc
Posts: 4
Joined: Mon Nov 27, 2006 3:14 pm

Post by nottoc » Tue Nov 28, 2006 2:56 pm

I think you misunderstand. I want information about the programmers interface. I want to know about how the class libraries are used.

For example, it would appear that the class DiffList allows me to create it with paths to two files. I'm assuming that the constructor will then create a list of differences that I can iterate through.

In addition to the information I'm hoping to get from my first message, I'm also hoping to get information about the merge process and what class library functions are involved in merging individual files.

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Tue Nov 28, 2006 3:12 pm

I think you're getting confused on nomenclature. VCDiffWindow is not a forms based window, but a data structure used to merge deltas into baseline files. There are no GUI components within these libraries.

In fact, these libraries are tied explicitly to client side repositories, client side delta files, and the VCDiff algorithm. We have no external documentation or support for them outside the Vault client.

If you are looking for something with a GUI interface, then the SourceGear Diff/Merge tool would allow that.
Jeff Clausius
SourceGear

nottoc
Posts: 4
Joined: Mon Nov 27, 2006 3:14 pm

Post by nottoc » Tue Nov 28, 2006 3:23 pm

Okay, I can live with that. I can create my own front end. However, the method names I'm seeing in the namespaces/classes lead me to believe that I can create a list of some sort of objects that will iterate the changes between the two files. Am I seeing that correctly and would you be willing to help me understand how to create such a list.

Basically, as I see it, there are two scenarios I need to cover. Comparing two files on my local hard drive. And comparing a local file with a repository file. If I can at least get this information, I can create the rest of what I want.

Icing on the cake would be if the libraries support a merge action, and if you could point me in the right direction for those methods.

nottoc
Posts: 4
Joined: Mon Nov 27, 2006 3:14 pm

Post by nottoc » Tue Nov 28, 2006 5:16 pm

I've discovered so far the DiffList creates an array of DiffNodes. And this will solve a significant number of issues. However, ContextDiffList does not have a public constructor. Could you tell me how to create this object so that I can decide if its a better solution then DiffList?

Also, VCDiff is proving even more intractable. Could you give a summary description that can help me decide if its worth pursuing?

Thanks

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Wed Nov 29, 2006 9:09 am

As far as I can tell, all those classes are internal to SGDiff, and the only public class that can be instantiated is DiffList.

Since you're moving into uncharted waters, I don't know how much help we can be. Good Luck.
Jeff Clausius
SourceGear

Post Reply