Page 1 of 1

API not checking in files (again)

Posted: Thu May 01, 2008 2:57 am
by MattTrinder
Hi

I still have a problem getting the API to check in modified files. I have attached a sample project.

If i put a breakpoint on the checkin line, modify the file manually and then run the checkin line, in vault the file reverts back to the version it was at previously - exactly as if I had unchecked it out rather than checking it in.

I am running the ServerOperations.ProcessCommandListChangeSet(new string[] { filePath }); as previously recommended which seemed to resolve the issue but I am still having problems.

Client, API and Server are all 4.1.1.18060

Please help as this is becoming urgent...

Matt

Posted: Thu May 01, 2008 9:06 am
by shannon
You'd need to set the breakpoint at ProcessCommandListChangeset. The file needs to be checked out/modified before that point because that command is going to trigger the refresh needed for commit to pick up both types of changes.

I have made a fix for the refresh problem that will be available in the next maintenance release. If you'd like to test it out now, send me an email and I can send you a link.

Posted: Thu May 01, 2008 9:10 am
by MattTrinder
So I need to

1) Checkout in code
2) Manually edit
3) ProcessListChangeset in code
4) Checkin in code

Will give it a go. That probably explains why it worked occaisionally - I may have had the breakpoint in a different place.

Posted: Thu May 01, 2008 9:57 am
by shannon
Exactly. I actually ran your code with two different breakpoints (one at listchangeset and one at commit) to confirm this.

Posted: Thu May 01, 2008 9:59 am
by MattTrinder
Thanks Shannon

this is now working fine - I look forward to the fixed version.

Matt