API question - GetByLabel_GetStructure followed by CheckOut

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

Moderator: SourceGear

Post Reply
Posts: 16
Joined: Mon Nov 30, 2009 2:04 pm

API question - GetByLabel_GetStructure followed by CheckOut

Post by surak8 » Wed Apr 07, 2010 12:10 pm

I am trying to write a function which will checkout all files associated with a specific label.

I modeled my code on GetOperations.performLabelGet, which successfully grabs all the files into a give folder, which is cool. Everything works fine.

The next step is to actually (exclusive) LOCK those versions associated with the version label (the REF labelStructure returned by GetByLabel_GetStructure) and then call CheckOut.

Here begins the problem, because during CheckOut, I receive a boat-load of failures (at bottom of this message).

My current belief is: GetByLabel_GetStructure is extracting all files comprising the (the the proper ID,ObjVerID, and Version values set). However, the CheckOut is failing because GetByLabel_GetStructure is truncating the FullPath property/field, which is causing CheckOut to fail.

The specific file I have highlighted below is $/DotNet/HeadlinesSystem/build.bat (Version=7 ID=49561 ObjVerId=141579) which is truncated to HeadlineSystem/build.bat

My goal is: I need to create a list of those files with the proper ID,ObjVerId,Version AND FullPath set. I would like to avoid calling GetLabelQueryItems_Recursive and GetLabelQueryItems_Main if I can, as I've done it once already. How can I perform CheckOut using information returned from GetByLabel_GetStructure and or GetByLabel_GetData?

[TRACE] : Requesting files...
complete: 0%
[TRACE] : Downloading files...
complete: 2%
complete: 11%
complete: 13%
[TRACE] : HeadlinesSystem/build.bat
complete: 33%
updated: U:\VaultWork\DotNet\HeadlinesSystem\build.bat
complete: 0%
complete: -1%
Fetched HeadlinesSystem/build.bat
Checking out file HeadlinesSystem/build.bat
4/7/2010 1:47:13 PM Normal Checking out file HeadlinesSystem/build.bat
Check out failed for HeadlinesSystem/build.bat: The object could not be found. It may have been deleted, moved or renamed.

Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear

Re: API question - GetByLabel_GetStructure followed by CheckOut

Post by jeremy_sg » Thu Apr 08, 2010 8:45 am

I think that you have a pretty complex problem. Please email support at sourcegear.com ATTN: jeremy with a link to this thread. I'll phone you to discuss your needs.
Subscribe to the Fortress/Vault blog

Post Reply