Page 1 of 1
Mass Check-In
Posted: Tue Mar 24, 2009 8:57 am
by mchandler
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
Posted: Tue Mar 24, 2009 12:48 pm
by jeremy_sg
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.
Re: Mass Check-In
Posted: Tue Mar 24, 2009 2:39 pm
by mchandler
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.
Re: Mass Check-In
Posted: Tue Mar 24, 2009 3:09 pm
by jeremy_sg
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.
Re: Mass Check-In
Posted: Wed Mar 25, 2009 7:49 am
by mchandler
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.