API not checking in files (again)

Post your questions regarding using the Vault and Fortress API in your programs.

Moderator: SourceGear

Post Reply
MattTrinder
Posts: 24
Joined: Tue Feb 12, 2008 8:07 am

API not checking in files (again)

Post by MattTrinder » Thu May 01, 2008 2:57 am

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
Attachments
TestVault.zip
(515.51 KiB) Downloaded 578 times

shannon

Post by shannon » Thu May 01, 2008 9:06 am

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.

MattTrinder
Posts: 24
Joined: Tue Feb 12, 2008 8:07 am

Post by MattTrinder » Thu May 01, 2008 9:10 am

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.

shannon

Post by shannon » Thu May 01, 2008 9:57 am

Exactly. I actually ran your code with two different breakpoints (one at listchangeset and one at commit) to confirm this.

MattTrinder
Posts: 24
Joined: Tue Feb 12, 2008 8:07 am

Post by MattTrinder » Thu May 01, 2008 9:59 am

Thanks Shannon

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

Matt

Post Reply