Page 1 of 1

DetectModifiedFilesWithCRCs

Posted: Mon May 12, 2008 9:09 am
by MattTrinder
How do I set this using the API so that my API app does not check in files
with unmodified contents ?

I am using ServerOperations.ProcessCommandCheckIn and Checkout, and it appears that WFO are a property of the client instance... Am I missing something about how these two are related...?


Cheers

Matt

Posted: Mon May 12, 2008 9:49 am
by shannon
Try setting the UnchangedHandler to UndoCheckout when you call ProcessCommandCheckin.

Posted: Mon May 12, 2008 9:56 am
by MattTrinder
Am already doing that :(

Due to the way this system works, it is actually re-writing the file in question with an exact copy of itself. So the contents have not changed but the file date has.

With the CRC option set in the Vault client, a checkin of this file results in an UndoCheckout as expected - I need to duplicate this behaviour using the API.

I have created a new

Code: Select all

_wfo = new WorkingFolderOptions(true, LocalCopyType.Replace, MakeWritableType.MakeAllFilesReadOnly, false, false, 0, true, 10);
with the true option set to use CRC checks, and am passing this as follows before both the CheckIn and Checkout operations.

Code: Select all

ServerOperations.client.ClientInstance.WorkingFolderOptions = _wfo;
but am still getting a checkin rather than an UndoCheckout.

Thanks

Matt

Posted: Mon May 12, 2008 10:00 am
by MattTrinder
Got It.

Code: Select all

ServerOperations.client.ClientInstance.WorkingFolderOptions.DetectModifiedFilesWithCRCs = true;
before checkout and checkin seems to do the trick.

Posted: Mon May 12, 2008 10:22 am
by shannon
Glad to hear it. If you don't plan to change that setting (or any others you find you need) you can always open the gui client on that machine and log in as the user your app is using and set them there instead of in code. The api and clc should share the same settings.