I'm working on creating a script to snapshot our Jenkins configuration into vault so we can easily diff changes.
I've got most of it working but I'm having issues with a new folder.
When I encounter a new folder I do an ADD on the folder.
Then I do an ADD on any contained files which also seems to add a Create Folder item for the folder in the change set.
Is there a way on the command line to do something similar to Detect new files which will add the folder and all items recursively?
Command Line Client Adding Folder Recursive
Moderator: SourceGear
-
- Posts: 21
- Joined: Wed Feb 14, 2007 2:50 pm
Command Line Client Adding Folder Recursive
Grand Avenue Software
Re: Command Line Client Adding Folder Recursive
Hello,
Yes, Vault 10.x has a new feature which includes the DETECTNEW command. DETECTNEW command (and -REMOVEDUPLICATES option) allows the Command Line Client to find and add items within working folders not currently under Vault's Source Code Control.
Thanks,
Tonya
Yes, Vault 10.x has a new feature which includes the DETECTNEW command. DETECTNEW command (and -REMOVEDUPLICATES option) allows the Command Line Client to find and add items within working folders not currently under Vault's Source Code Control.
Thanks,
Tonya
-
- Posts: 21
- Joined: Wed Feb 14, 2007 2:50 pm
Re: Command Line Client Adding Folder Recursive
That worked. Now I'm getting an error when I try to check in from the script.
This is the command:
CHECKIN -comment "Jenkins Config Checkpoint" -verbose -resolvemerge $repositoryPath
WARNING: <vault> <error> <exception>System.Exception: The current change set does not have any items for Config
at VaultClientIntegrationLib.ServerOperations.ProcessCommandCommit(String[] objectPaths, UnchangedHandler unchanged,
Boolean keepCheckedOut, Nullable`1 removeLocalCopy, Boolean resolveMerge, ChangeSetItemColl& csicRemove) at
VaultCmdLineClient.VaultCmdLineClient.ProcessCommand(Args curArg) at
VaultCmdLineClient.VaultCmdLineClient.Main(String[] args)</exception> </error> <result>
<success>False</success> </result> </vault>
When I run the same command after the script has failed it works just fine.
What am I doing wrong?
This is the command:
CHECKIN -comment "Jenkins Config Checkpoint" -verbose -resolvemerge $repositoryPath
WARNING: <vault> <error> <exception>System.Exception: The current change set does not have any items for Config
at VaultClientIntegrationLib.ServerOperations.ProcessCommandCommit(String[] objectPaths, UnchangedHandler unchanged,
Boolean keepCheckedOut, Nullable`1 removeLocalCopy, Boolean resolveMerge, ChangeSetItemColl& csicRemove) at
VaultCmdLineClient.VaultCmdLineClient.ProcessCommand(Args curArg) at
VaultCmdLineClient.VaultCmdLineClient.Main(String[] args)</exception> </error> <result>
<success>False</success> </result> </vault>
When I run the same command after the script has failed it works just fine.
What am I doing wrong?
Grand Avenue Software
Re: Command Line Client Adding Folder Recursive
I believe there may be an error in your command. Do you happen to know what $repositoryPath is set to? The error message indicates it is set to "Config", and is not a valid repository path.
Thanks,
Tonya
Thanks,
Tonya
-
- Posts: 21
- Joined: Wed Feb 14, 2007 2:50 pm
Re: Command Line Client Adding Folder Recursive
I figured it out. The comment lost its quotes as I passed it through, so that's where Config came from. I should be able to finish it now. Thank you very much for your excellent support! (Being in a software company, I know how hard that is to provide.)
Grand Avenue Software
Re: Command Line Client Adding Folder Recursive
You're welcome and glad to hear the issue is resolved!
If you need further assistance, just let us know.
Tonya
If you need further assistance, just let us know.
Tonya