How to diff two specific versions of a file...

Post your questions regarding using the Vault and Fortress API in your programs.

Moderator: SourceGear

Post Reply
eosmann
Posts: 5
Joined: Mon Dec 08, 2008 9:58 am

How to diff two specific versions of a file...

Post by eosmann » Fri Jun 05, 2009 8:53 am

I am using ProcessCommandDiff() and can not difference two versions of a file?

For instance how can I diff version 10 and 11 of a file that is currently at version 15?
I am able to diff a version only to the latest version, or a working version, or the latest repository version but not to a specific version either in the repository or retrieved to a temp location. What am I missing.

Thanks
Eric

shannon

Re: How to diff two specific versions of a file...

Post by shannon » Fri Jun 05, 2009 9:11 am

That method is going to diff whatever version you currently have on disk against some item, that item being determined based on your CompareToOption choice.

To diff against something retrieved to a temp location, set the option to CompareToOption.local, and pass the temp location as the objectPathRight.

To use this to compare versions 10 and 11, you need to do a historical get of one of those items to your working folder and the other to a temp location and then pass CompareToOption.local and the temp location as objectPathRight.

Post Reply