What is cause of "Project out of sync" after executing accept() method for incoming baseline?
Hi Guys,
Accepted answer
Just because you accept something into a repository workspace does not necessarily mean it is automatically downloaded into any existing sandbox. So you accept a change into the repository workspace and the Eclipse that tracks the loaded sandbox detects that the local content is not the same as the repository workspace and lets you know.
Comments
Thanks @Ralph Schoon for your valuable answer, I totally agree with your findings, but when I accept incoming baselies and change sets through the code, my component history shows the changeset and baseline, but my sandbox files are not updated with remote files, below is my code:
And after running this code, my project is showing "out of sync" error, what can I do to resolve this issue?
The Eclipse client loads the changed file content to disc. This is the part you are likely not doing and maybe fail to understand. I have not implemented such a load. I would suggest to look into the RTC Client SDK to find out what the RTC client does in Eclipse when you "Accept a change into a loaded repository workspace".
@Ralph Schoon, you mean accepting change sets or baseline does not reflect changes into local sandbox. For that, I need to write code separately.
Yes.
There probably is a special "accept" call within the client code that checks whether the workspace is loaded in a local sandbox, and then does the accept in way that causes the local sandbox to be updated. I will ping the RTC SCM dev team to see if they can give you a pointer.
If you were in "RTC Eclipse ClientA" and performed an accept operation, and if that same repository workspace were tracked in the Pending Changes view of "RTC Eclipse ClientB", that Pending Changes view would go out of sync. This is the same thing that is happening in this case... if you are writing Java code, and invoking IWorkspaceConnection API, then it's similar to another 'client' performing the operation (i.e. the daemon and UI layer has no awareness that this code was called).
If you need to keep a running daemon aware of all changes, the official API for this is to use the lscm [command line]) (Java code can be written to call out to the command line).
-