Page 2 of 2

Re: How to do an auto commit on changed files

Posted: Wed Jan 28, 2009 4:01 pm
by shannon
Ok, well, the error from the client log looks like something went wrong with an op you performed from the gui client.

There might be a more useful message in the server log.

Does it always throw an exception? Have you tried just committing one or two simple changes?

Re: How to do an auto commit on changed files

Posted: Wed Jan 28, 2009 4:12 pm
by joacim
I'm only trying to commit (or rather add) a few files and create one subdirectory. All of the files are new. There are a total of 4 files, 3 in the root directory and 1 in one subdirectory.

Re: How to do an auto commit on changed files

Posted: Wed Jan 28, 2009 4:38 pm
by joacim
Here's the last few items from the server log:
----2009-01-28 22:16:11 admin--c-c259e353.431-1-64736c10.cust.bredbandsbolaget.se(83.227.89.194)--SSL Disabled Login
----2009-01-28 22:16:15 admin--c-c259e353.431-1-64736c10.cust.bredbandsbolaget.se(83.227.89.194)--SSL Disabled (23f36c41-4f16-44c9-9421-5913bf0d4c75) BeginTx returned: Failure
----2009-01-28 22:16:15 admin--c-c259e353.431-1-64736c10.cust.bredbandsbolaget.se(83.227.89.194)--SSL Disabled (23f36c41-4f16-44c9-9421-5913bf0d4c75) AddFolder: $/TestAutoCheckIn/Demo returned: Failure
----2009-01-28 22:16:15 admin--c-c259e353.431-1-64736c10.cust.bredbandsbolaget.se(83.227.89.194)--SSL Disabled (23f36c41-4f16-44c9-9421-5913bf0d4c75) AddFolder: $/TestAutoCheckIn/Demo returned: FailObjAlreadyExists
----2009-01-28 22:16:15 admin--c-c259e353.431-1-64736c10.cust.bredbandsbolaget.se(83.227.89.194)--SSL Disabled (23f36c41-4f16-44c9-9421-5913bf0d4c75) AddFile: $/TestAutoCheckIn/Project1.sbproj returned: Failure
----2009-01-28 22:16:15 admin--c-c259e353.431-1-64736c10.cust.bredbandsbolaget.se(83.227.89.194)--SSL Disabled (23f36c41-4f16-44c9-9421-5913bf0d4c75) AddFile: $/TestAutoCheckIn/robocopy.txt returned: Failure
----2009-01-28 22:16:15 admin--c-c259e353.431-1-64736c10.cust.bredbandsbolaget.se(83.227.89.194)--SSL Disabled (23f36c41-4f16-44c9-9421-5913bf0d4c75) AddFile: $/TestAutoCheckIn/SubUnit.bsl returned: Failure
----2009-01-28 22:16:15 admin--c-c259e353.431-1-64736c10.cust.bredbandsbolaget.se(83.227.89.194)--SSL Disabled (23f36c41-4f16-44c9-9421-5913bf0d4c75) AddFile: $/TestAutoCheckIn/Demo/Test.txt returned: Failure
----2009-01-28 22:16:15 admin--c-c259e353.431-1-64736c10.cust.bredbandsbolaget.se(83.227.89.194)--SSL Disabled (23f36c41-4f16-44c9-9421-5913bf0d4c75) AddFile: $/TestAutoCheckIn/Demo/Test.txt returned: Failure
----2009-01-28 22:16:16 admin--c-c259e353.431-1-64736c10.cust.bredbandsbolaget.se(83.227.89.194)--SSL Disabled Logout

Re: How to do an auto commit on changed files

Posted: Wed Jan 28, 2009 4:59 pm
by joacim
I've solved it :D. I should not use ProcessCommandAdd on subfolders...

Thanks for all the help!

Re: How to do an auto commit on changed files

Posted: Wed Jan 28, 2009 5:22 pm
by shannon
You're welcome.

Re: How to do an auto commit on changed files

Posted: Wed Jan 28, 2009 6:45 pm
by joacim
I have one more question if you don't mind: Can I programmatically set the CVS style? I don't want to have to check out files before I check them in, neither should their be any exclusive locks on these files.

Re: How to do an auto commit on changed files

Posted: Wed Jan 28, 2009 11:01 pm
by shannon
If you don't plan to change the style back and forth on that user, you can just log into the gui client and set it there. It will use the same settings as long as you log in on the same machine.

UserOptions uo = ServerOperations.client.ClientInstance.UserOptions;
uo.SetBool(VaultOptions.RequireCheckOut, false);

I think RequireCheckOut is the only one that will make a difference to you (if you aren't checking out, then there won't be any exclusive locks anyway). If you want to set any of the others, just look for the VaultOptions value for it.

Re: How to do an auto commit on changed files

Posted: Thu Jan 29, 2009 3:17 am
by joacim
Thank you again for the quick response. I have one question about the following statement though:
shannon wrote:If you don't plan to change the style back and forth on that user, you can just log into the gui client and set it there. It will use the same settings as long as you log in on the same machine.
Does this setting "follow" the user account or is it set on the client computer? What I mean is that if I use the GUI client on my developer machine to set this option will it be set even if the program runs from another computer (given of course that it logs on to the same Vault server)?

I also have a couple of other quick questions if you don't mind :).

In the help file for VaultClientIntegrationLib I find the following statement for the ProcessCommandGetLabelToLocationOutsideWorkingFolder method:
If you use this method to download objects, you will not be able to check in from the that folder on disk. If you will need to check in from this location, use ProcessCommandGetLabelToTempWorkingFolder instead.
However for the ProcessCommandGetLabelToTempWorkingFolder method the following statement is provided:
If you use this method to download objects, you will not be able to check in from the that folder on disk.
Which of the statements are correct?

How can I list the Labels a particular item has?

Re: How to do an auto commit on changed files

Posted: Thu Jan 29, 2009 6:41 pm
by shannon
The settings are per machine, they won't follow you.

They're both technically correct, although obviously confusing. If you use ProcessCommandGetLabelToLocationOutsideWorkingFolder, it does a get and stores no baseline information. If you use ProcessCommandGetLabelToTempWorkingFolder, it temporarily sets a working folder, does the get and removes the working folder. So, you have baseline information, but no working folder. If you set a working folder there, you should be able to check in I believe.

I'll address your last question in the other thread you started.

Re: How to do an auto commit on changed files

Posted: Fri Jan 30, 2009 7:19 am
by joacim
Thanks for clearing that up for me :D