Mass Check-In
Moderator: SourceGear
Mass Check-In
I am working on a project to do some vault automation to check in a very large number of files. To do this, I am trying to use a list of checked out files from a VaultClientCheckOutList object, then I build a string[] to pass to the ProcessCommandCheckIn method. The issue I am having is that I cannot seem to find how to iterate through and retreive the vault paths from the VaultClientCheckOutList object. There is no Item method and the IndexOf method requires values that I don't seem to have. Does anyone have any advice they could give me on this? Or possibly, has anyone been able to write code that will in some other way check-in a large volume of files?
Re: Mass Check-In
A couple of things to try: 1. You can use a wildcard to do checkins with the format: "$/trunk/src/**/*", which would check in every item below src. Also, you can use a local path as well.
Subscribe to the Fortress/Vault blog
Re: Mass Check-In
Thanks for the help. I got file paths to work, but I am having trouble using wildcards, see my code below:
string filePath = "$/BMC/2.84/**/*";
ServerOperations.ProcessCommandCheckIn(new string[] { filePath }, UnchangedHandler.UndoCheckout, bKeepCheckedOut, LocalCopyType.Leave);
I get a 'Commit failed' error if i try to run this, is there something wrong with this command that would cause this? Also, I tried to set up wildcards on a local path with no success as well.
string filePath = "$/BMC/2.84/**/*";
ServerOperations.ProcessCommandCheckIn(new string[] { filePath }, UnchangedHandler.UndoCheckout, bKeepCheckedOut, LocalCopyType.Leave);
I get a 'Commit failed' error if i try to run this, is there something wrong with this command that would cause this? Also, I tried to set up wildcards on a local path with no success as well.
Re: Mass Check-In
Make sure that you hook into the ServerOperations.UserMessage event to catch the error message that will give you more details on the failed commit. I would expect that there are incompatible changeset requests that can't be committed at the same time.
Subscribe to the Fortress/Vault blog
Re: Mass Check-In
Thanks, I'll give that a shot, if I still can't get a solution, I will try to build an array of local file paths.