Hello,
how can i query the file status of an open project using VAULT API.
I want to get all files of Status=Renegade and reset it using API?
best
Thomas
Query/Reset File status using C#
Moderator: SourceGear
Re: Query/Reset File status using C#
Are the files Renegade because there are changes? Or are they renegade because they were touched by a program? If there are changes, do you need to keep those changes?
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
-
- Posts: 50
- Joined: Mon Aug 25, 2014 2:00 am
Re: Query/Reset File status using C#
There are changes and i want to reset them by API.
Re: Query/Reset File status using C#
To get rid of renegade changes, you would have to perform a Get with overwrite. If you need to keep the changes, then your options are to check out the file and check it in, or to keep a renegade status, or to switch to using CVS mode which keeps all the files writable.
For example, to do the Get with overwrite:
For example, to do the Get with overwrite:
- a) Call
ClientInstance.GetWorkingFolder(VaultClientFolder) OR ClientInstance.GetWorkingFolder(String strPhysicalDiskPath, true)
to get a working folder instance.
b) With the Working Folder object returned from step A, call
WorkingFolder.GetStatus() or WorkingFolder.GetStatusForAllFiles()
This would return the status of a known VaultClientFile or the files found in a known VaultClientFolder.
c) Call GET() with the file's same version/object version id, the 'forceLatest' set to false, and overwrite set to true.
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support