Hi,
I can't seem to figure out DoWorkingFileDiff; I want to diff a repository item to file in the path of the working directory.
rep item $/Data Dictionary/Tables/SalesTable
local file c:\\temp\\play\\Data Dictionary\\Tables\\SalesTable
workdir set to c:\\temp\\play
nDoDiffError = myClient.DoWorkingFileDiff(vcfile, datDiffChoice, strRight, strDiffBin, strFullDiffArgs, strLeftLbl, strRightLbl, out strLItem, out strRItem, out e);
Basically copied from the cl source.
vcfile is a valid vault file from the rep item
datDiffChoice, Local Item enum, I've tried them all
strRight = local file
strDiffBin = "diff" , tried sgdiff as well
strFullDiffArgs = "%LEFT_PATH% %RIGHT_PATH%"
strLeftLabel = "rep"
strRightLabel = "file"
With those I get either the item wasn't found or the diff utility had an error. what am I doing wrong?
Vault 2.0.4 (2190)
I'm using VS2002 Build Dlls.
Thanks, Don
API DoWorkingFileDiff
Moderator: SourceGear
If what you want is to diff the working file against the latest version in the repository then, you would want something like:
DoWorkingFileDiff(
vcfile,
DiffAgainstType.CurrentRepositoryVersion,
"",
"C:\\Program Files\\SourceGear\\Vault Client\\sgdm.exe",
"[Copy the args from Tools->Options->Diff/Merge in GUI client]",
"Repository version ({0})",
"Working version ({0})",
null,
null,
e);
I'm not sure from the error message whether the problem is the diff tool is being specified incorrectly, or whether the diff item is incorrect. Note that you don't have to specify the local file, because it already knows the working file is what you want to compare against, and it automatically pulls the current repository version from the server. However, specifying a local file in CurrentRepositoryVersion mode should just be ignored.
Hope this helps,
DoWorkingFileDiff(
vcfile,
DiffAgainstType.CurrentRepositoryVersion,
"",
"C:\\Program Files\\SourceGear\\Vault Client\\sgdm.exe",
"[Copy the args from Tools->Options->Diff/Merge in GUI client]",
"Repository version ({0})",
"Working version ({0})",
null,
null,
e);
I'm not sure from the error message whether the problem is the diff tool is being specified incorrectly, or whether the diff item is incorrect. Note that you don't have to specify the local file, because it already knows the working file is what you want to compare against, and it automatically pulls the current repository version from the server. However, specifying a local file in CurrentRepositoryVersion mode should just be ignored.
Hope this helps,