Commandline checkins failing with "Resource is out of s

I'm hoping an expert out there can help me with an automation problem that appears to be new to RTC2.
Every time I do a build, which does an Accept, and Load to get the source, builds it and then tries to checkin changed files from the command line, I get "Resource is out of sync with the file system" errors and SCM crashes out with Java exceptions.
If I open the Eclipse client, and force a refresh of the Project Explorer, RTC suddenly "notices" the changes and updates the Pending Changes view. If I them exit RTC client and run my command line checkins, everything is sweetness and light and works.
Also, several of our developers are getting the same crashes from within the Eclipse client when checking in; so it may not be command line specific issue.
In the meantime, the most important question is; Is there any way to force a refresh from the command line client? I tried using "status" but that just returns the wrong, non-updated list until it has been refreshed in the Eclipse client. Without this our automated build process is going to be totally stuck. I don't really have to want to resort to AutoHotKey or something to script the Eclipse client!
Thanks for any assistance!
Every time I do a build, which does an Accept, and Load to get the source, builds it and then tries to checkin changed files from the command line, I get "Resource is out of sync with the file system" errors and SCM crashes out with Java exceptions.
If I open the Eclipse client, and force a refresh of the Project Explorer, RTC suddenly "notices" the changes and updates the Pending Changes view. If I them exit RTC client and run my command line checkins, everything is sweetness and light and works.
Also, several of our developers are getting the same crashes from within the Eclipse client when checking in; so it may not be command line specific issue.
In the meantime, the most important question is; Is there any way to force a refresh from the command line client? I tried using "status" but that just returns the wrong, non-updated list until it has been refreshed in the Eclipse client. Without this our automated build process is going to be totally stuck. I don't really have to want to resort to AutoHotKey or something to script the Eclipse client!
Thanks for any assistance!
7 answers

I'm hoping an expert out there can help me with an automation problem that appears to be new to RTC2.
Every time I do a build, which does an Accept, and Load to get the source, builds it and then tries to checkin changed files from the command line, I get "Resource is out of sync with the file system" errors and SCM crashes out with Java exceptions.
If I open the Eclipse client, and force a refresh of the Project Explorer, RTC suddenly "notices" the changes and updates the Pending Changes view. If I them exit RTC client and run my command line checkins, everything is sweetness and light and works.
Also, several of our developers are getting the same crashes from within the Eclipse client when checking in; so it may not be command line specific issue.
In the meantime, the most important question is; Is there any way to force a refresh from the command line client? I tried using "status" but that just returns the wrong, non-updated list until it has been refreshed in the Eclipse client. Without this our automated build process is going to be totally stuck. I don't really have to want to resort to AutoHotKey or something to script the Eclipse client!
Thanks for any assistance!
The Eclipse client problem might be solved by doing a Refresh (F5) on the Package Explorer view before they checkin.
Does anything they do involve some external tool (not part of Eclipse) creating new files that should be checked in (ie not on the ignore list)?
anthony

Thanks for the reply.
That did occur to me - I'll get the most recent person with the problem to check that. Not great, but manageable if they have to do a manual refresh before committing.
It shouldn't do - I spent some time putting together ignore files to try and keep the source clean, but I will double check tomorrow.
I don't want to sound like a miserable old git; but is there a more reliable way to avoid the issue? (i.e force the refresh from the command line) Going around patching the build up so RTC doesn't crash seems like a surefire recipe for future disaster when some new checkin causes the problem to resurface.
The Eclipse client problem might be solved by doing a Refresh (F5) on the Package Explorer view before they checkin.
That did occur to me - I'll get the most recent person with the problem to check that. Not great, but manageable if they have to do a manual refresh before committing.
Does anything they do involve some external tool (not part of Eclipse) creating new files that should be checked in (ie not on the ignore list)
It shouldn't do - I spent some time putting together ignore files to try and keep the source clean, but I will double check tomorrow.
I don't want to sound like a miserable old git; but is there a more reliable way to avoid the issue? (i.e force the refresh from the command line) Going around patching the build up so RTC doesn't crash seems like a surefire recipe for future disaster when some new checkin causes the problem to resurface.

Hi,
what I would check is, why they are out of sync. Are there are files generated by the build that are checked in?
What does the build generate and where? Should these be on the ignore list for the repository workspace?
Another approach would be to delete the whole directory containing the repo workspace before downloading. There is a switch in the build definition to do that. If you are running command-line scripts you would have to do that yourself.
Ralph
what I would check is, why they are out of sync. Are there are files generated by the build that are checked in?
What does the build generate and where? Should these be on the ignore list for the repository workspace?
Another approach would be to delete the whole directory containing the repo workspace before downloading. There is a switch in the build definition to do that. If you are running command-line scripts you would have to do that yourself.
Ralph

One of the files is a tool built during the install and another is a temporary log file created during the build. Both files are not in RTC and are deleted before the checkin - so RTC shouldn't even know they exist - yet at some point it presumably has scanned the source, detected the new files and then crashes when it tries to check then in (since they no longer exist).
Two other files are in RTC and are updated by the build - this shouldn't cause any problem, since that's what the source control is for...
So, again it boils down to: is there any way to force SCM to do the same as pressing F5 in the eclipse client before I do my checkins? As it stand my automated builds are going to be stuffed...
If anyone can help please, I would be extremely happy!! ;-)
Two other files are in RTC and are updated by the build - this shouldn't cause any problem, since that's what the source control is for...
So, again it boils down to: is there any way to force SCM to do the same as pressing F5 in the eclipse client before I do my checkins? As it stand my automated builds are going to be stuffed...
If anyone can help please, I would be extremely happy!! ;-)

Hi,
hoping I did not misunderstand your reply. Could you make sure the files you are generating are not located in the path of the loaded repository workspace?
I have several build configurations (not using SCM commandline however) and I have never seen anything like you describe. Only situations I saw similar issues where when I managed to confuse the SCM system e.g. by pending outgoing changes in the build repository workspace.
Sorry, thats all I know.
Ralph
hoping I did not misunderstand your reply. Could you make sure the files you are generating are not located in the path of the loaded repository workspace?
I have several build configurations (not using SCM commandline however) and I have never seen anything like you describe. Only situations I saw similar issues where when I managed to confuse the SCM system e.g. by pending outgoing changes in the build repository workspace.
Sorry, thats all I know.
Ralph

Hi,
The generated files are built into the source tree as it has been fetched from RTC. However the generated files that are part of the problem are not in RTC are deleted agin during the build, so don;t go into source control. The othe two it is complaining about are under RTC source control; so should be fine.
At the moment I have resorted to a AutoHotKey script to perform the refresh from the IDE.
Could you make sure the files you are generating are not located in the path of the loaded repository workspace?
The generated files are built into the source tree as it has been fetched from RTC. However the generated files that are part of the problem are not in RTC are deleted agin during the build, so don;t go into source control. The othe two it is complaining about are under RTC source control; so should be fine.
At the moment I have resorted to a AutoHotKey script to perform the refresh from the IDE.

In the meantime, the most important question is; Is there any way to force a refresh from the command line client? I tried using "status" but that just returns the wrong, non-updated list until it has been refreshed in the Eclipse client.
'scm status' in the sandbox root (ie, the root directory of all of the stuff you've loaded) should refresh the entire filesystem. If it doesn't find your changes, then you've found a bug. Could you describe the exact scenario with exact paths? Something along the lines of:
1. I run 'scm load' and everthing ends up in ~/work/
2. I run a build script on ~/work/ and ~/work/shared-directory-1/log.txt is created
3. I 'cd' to ~/work/ and run 'scm status' in that directory. "/shared-directory-1/log.txt" doesn't appear in the output.
Including the pertinent ignore patterns would be useful as well.
e