My code is pretty simple:
Code: Select all
ServerOperations.ProcessCommandAdd(parentDir, files);
Code: Select all
ServerOperations.ProcessCommandRename(vaultPath, newName);
Moderator: SourceGear
Code: Select all
ServerOperations.ProcessCommandAdd(parentDir, files);
Code: Select all
ServerOperations.ProcessCommandRename(vaultPath, newName);
Code: Select all
VaultLib.SimpleLogger.Log.EnableClass("all");
VaultLib.SimpleLogger.Log.Enabled = true;
VaultLib.SimpleLogger.Log.LogFilePath = "c:\\logfile.txt"
Code: Select all
// I'm passing in a *specific* list of files to see if there are any pending updates on them
var changeSet = ServerOperations.ProcessCommandListChangeSet(pathsToFiles);
// ...snip...
// checking if a specific file exists in Vault or not
ServerOperations.ProcessCommandListObjectProperties(path);
// ...snip...
// adding specific items to Vault
ServerOperations.ProcessCommandAdd(hashItem.Key, files);
Code: Select all
> vault.exe add -host vault -repository Repo c:\WorkingFolder c:\WorkingFolder\d69e28dc-c58b-487c-a83c-e118f46ee2c4.txt
> vault.exe commit -host vault -repository Repo c:\WorkingFolder\d69e28dc-c58b-487c-a83c-e118f46ee2c4.txt
Code: Select all
<vault>
<error>
<exception>System.Exception: No object was found at the repository path: $/d69e28dc-c58b-487c-a83c-e118f46ee2c4.txt
at VaultClientIntegrationLib.RepositoryUtil.FindVaultTreeObjectAtReposOrLocalPath(String testPath)
at VaultClientIntegrationLib.RepositoryUtil.MatchWildcardToTreeObjects(String repositoryPath)
at VaultClientIntegrationLib.ServerOperations.ProcessCommandCommit(String[] objectPaths, UnchangedHandler unchanged, Boolean keepCheckedOut, LocalCopyType localCopy, Boolean resolveMerge, ChangeSetItemColl& csicRemove)
at VaultCmdLineClient.VaultCmdLineClient.ProcessCommand(Args curArg)
at VaultCmdLineClient.VaultCmdLineClient.Main(String[] args)</exception>
</error>
<result>
<success>False</success>
</result>
</vault>
Code: Select all
> vault.exe commit -host vault -repository core C:\WorkingFolder\
Code: Select all
ServerOperations.ProcessCommandAdd(@"c:\WorkingFolder", new string[] { @"c:\WorkingFolder\d69e28dc-c58b-487c-a83c-e118f46ee2c4.txt" })
ServerOperations.ProcessCommandCheckIn(new string[] { @"c:\WorkingFolder\d69e28dc-c58b-487c-a83c-e118f46ee2c4.txt" }, UnchangedHandler.UndoCheckout, false, LocalCopyType.Replace, false);
Code: Select all
ServerOperations.ProcessCommandAdd(@"C:\WorkingDirectory\", new string[] { @"C:\WorkingDirectory\newfile.txt" } );
// ...snip...
ChangeSetItemColl committedItems;
ServerOperations.ProcessCommandCommit(new[] {@"C:\WorkingDirectory" }, UnchangedHandler.UndoCheckout, false, LocalCopyType.Replace, false, out committedItems);
Code: Select all
System.Exception: Commit failed
at VaultClientIntegrationLib.ServerOperations.ProcessCommandCommit(ChangeSetItemColl csic, UnchangedHandler unchanged, Boolean keepCheckedOut, LocalCopyType localCopy, Boolean removeLocalCopy, Boolean resolveMerge, ref ChangeSetItemColl csicRemove)
at VaultClientIntegrationLib.ServerOperations.ProcessCommandCommit(String[] objectPaths, UnchangedHandler unchanged, Boolean keepCheckedOut, LocalCopyType localCopy, Boolean resolveMerge, ref ChangeSetItemColl csicRemove)
at WebMD.Vault.Facade.VaultFacade.Commit(String pathToFolder) in VaultFacade.cs: line 34
at WebMD.Vault.Facade.Tests.VaultFacadeTests.Commit() in VaultFacadeTests.cs: line 99
Code: Select all
ChangeSetItemColl mycollection = new ChangeSetItemColl();
ChangeSetItemColl temp = ProcessCommandAdd(...);
foreach (ChangeSetItem item in temp)
mycollection.Add(item);
//Pend the second add.
temp = ProcessCommandAdd(...);
foreach (ChangeSetItem item in temp)
mycollection.Add(item);
ServerOperations.ProcessCommandCommit(mycollection,....);