ProcessCommandBranch() producing .comparer branch dir
Moderator: SourceGear
ProcessCommandBranch() producing .comparer branch dir
When I use the API to branch a directory, I'd then like to label that branch... I'm attempting to accomplish this by doing the following
ServerOperations.ProcessCommandBranch(projectRepositoryPathWithCodeLine, targetBranchName);
VaultClientFolder vaultDirectory = ServerOperations.ProcessCommandListFolder(projectRepositoryPathWithCodeLine + targetBranchName, true);
var _branchVersionID = vaultDirectory.Version;
This makes sense to me but is failing because the branch I expect is not there.. when I step through code and get the branch directory I see a directory of theBranchIExpect + ".comparer"
How can I get around this issue
ServerOperations.ProcessCommandBranch(projectRepositoryPathWithCodeLine, targetBranchName);
VaultClientFolder vaultDirectory = ServerOperations.ProcessCommandListFolder(projectRepositoryPathWithCodeLine + targetBranchName, true);
var _branchVersionID = vaultDirectory.Version;
This makes sense to me but is failing because the branch I expect is not there.. when I step through code and get the branch directory I see a directory of theBranchIExpect + ".comparer"
How can I get around this issue
Re: ProcessCommandBranch() producing .comparer branch dir
Are you getting the branch committed prior to the label?
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: ProcessCommandBranch() producing .comparer branch dir
When I perform the ServerLogin operations I set
ServerOperations.client.AutoCommit = true;
before I call my processcommandbranch()
ServerOperations.client.AutoCommit = true;
before I call my processcommandbranch()
Re: ProcessCommandBranch() producing .comparer branch dir
what should I call post branch to ensure that I get a Commit.
Re: ProcessCommandBranch() producing .comparer branch dir
In the code you posted is projectRepositoryPathWithCodeLine the same for both the command branch and list folder? You can't branch into the folder you're branching from.
Have you used the Vault GUI client to look and see if the branch was ever created?
Also, I'm not sure what you're doing with this line: var _branchVersionID = vaultDirectory.Version;. I'm assuming you have vaultDirectory.Version set somewhere else in the code?
Have you used the Vault GUI client to look and see if the branch was ever created?
Also, I'm not sure what you're doing with this line: var _branchVersionID = vaultDirectory.Version;. I'm assuming you have vaultDirectory.Version set somewhere else in the code?
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: ProcessCommandBranch() producing .comparer branch dir
Let me clarify, I mistyped the code...
ServerOperations.ProcessCommandBranch(projectRepositoryPathTrunk, projectRepositoryPathBranch);
VaultClientFolder vaultDirectory = ServerOperations.ProcessCommandListFolder(TopLeveBranchFolder, true);
var _branchVersionID = vaultDirectory.Version;
The branch is being created. I'm able to verify this in the Vault Client. However, when I try to ProcessCommandListFolder on the parent directory of the newly created branch... I see the branch + .comparer. I suspect like you mentioned before, this issue is related to a commit. I can't find a ServerOperations.Commit so I'm trying to figure out what method commits the operation
ServerOperations.ProcessCommandBranch(projectRepositoryPathTrunk, projectRepositoryPathBranch);
VaultClientFolder vaultDirectory = ServerOperations.ProcessCommandListFolder(TopLeveBranchFolder, true);
var _branchVersionID = vaultDirectory.Version;
The branch is being created. I'm able to verify this in the Vault Client. However, when I try to ProcessCommandListFolder on the parent directory of the newly created branch... I see the branch + .comparer. I suspect like you mentioned before, this issue is related to a commit. I can't find a ServerOperations.Commit so I'm trying to figure out what method commits the operation
Re: ProcessCommandBranch() producing .comparer branch dir
Just one more check to make sure I know exactly where this is at. Open a Vault web client by going to http://<your Vault server>/vaultservice/vaultweb. Login and browse to the location of the branch. Can you see it in the web client?
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: ProcessCommandBranch() producing .comparer branch dir
Yes, I see the branch in the web client
Re: ProcessCommandBranch() producing .comparer branch dir
If it's in the web client, then the branch has been fully committed.
Would it be possible to have you post a screenshot?
Would it be possible to have you post a screenshot?
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: ProcessCommandBranch() producing .comparer branch dir
In addition to the last question I had, what happens if you try a listfolder using the Vault command-line client? The details on what you need are posted here: http://download.sourcegear.com/misc/vau ... LISTFOLDER.
For example, your command might look like:
vault LISTFOLDER -host myVaultserver -user me -password mypassword -repository "Initial Repository" $/myMainfolder/mybranchfolder
For example, your command might look like:
vault LISTFOLDER -host myVaultserver -user me -password mypassword -repository "Initial Repository" $/myMainfolder/mybranchfolder
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support