ProcessCommandShare Difficulties
Posted: Fri Oct 09, 2009 2:40 pm
I have a method that iterates through a repository tree structure and creates a VaultClientFileColl of all the objects I want to share (and eventually pin) in a versioned tree structure in the same repository.
ex: share $/Project/A/foo.c to $/Versions/Project_1.2.3.4/A/foo.c
The idea is to merely loop through the File collection and create a target path by replacing $/Project with $/Versions/Project_1.2.3.4.
At first, I read the documentation, and it says that the target folder must exist, so I modified my code to do this. Everything OK so far. However, it still fails on the on ProcessCommand with the following exception:
No object was found at the repository path: $/Versions/Simulator_1.1.1.10/SimLogWindow/SimLogWindow.csproj
Here's the exact code:Note:
SourcePath = $/SimulatorTip/SimLogWindow/SimLogWindow.csproj <Confirmed that this exists>
TargetPath = "$/Versions/Simulator_1.1.1.10/SimLogWindow/SimLogWindow.csproj"
RepoPath $/Versions/Simulator_1.1.1.10/SimLogWindow <as pasted from client to make sure no typo>
I can get this call to work on a folder, but not a file. I can do this manually, but not with the API currently...
I attached a png of our Vault Client so you can see the source / target exist
foreach (VaultClientFile file in files)
{
string SourcePath = file.FullPath ;
string TargetPath = SourcePath.Replace(Source,Target);
ServerOperations.ProcessCommandShare(SourcePath,TargetPath); //exception thrown here
ServerOperations.ProcessCommandPin(TargetPath,-1);
}
ex: share $/Project/A/foo.c to $/Versions/Project_1.2.3.4/A/foo.c
The idea is to merely loop through the File collection and create a target path by replacing $/Project with $/Versions/Project_1.2.3.4.
At first, I read the documentation, and it says that the target folder must exist, so I modified my code to do this. Everything OK so far. However, it still fails on the on ProcessCommand with the following exception:
No object was found at the repository path: $/Versions/Simulator_1.1.1.10/SimLogWindow/SimLogWindow.csproj
Here's the exact code:Note:
SourcePath = $/SimulatorTip/SimLogWindow/SimLogWindow.csproj <Confirmed that this exists>
TargetPath = "$/Versions/Simulator_1.1.1.10/SimLogWindow/SimLogWindow.csproj"
RepoPath $/Versions/Simulator_1.1.1.10/SimLogWindow <as pasted from client to make sure no typo>
I can get this call to work on a folder, but not a file. I can do this manually, but not with the API currently...
I attached a png of our Vault Client so you can see the source / target exist
foreach (VaultClientFile file in files)
{
string SourcePath = file.FullPath ;
string TargetPath = SourcePath.Replace(Source,Target);
ServerOperations.ProcessCommandShare(SourcePath,TargetPath); //exception thrown here
ServerOperations.ProcessCommandPin(TargetPath,-1);
}