-->

I can't undo changes to some resources in RTC,

2019-05-29 19:38发布

问题:

I made changes to some files i had in a project (they were auto generated with a tool).

I want to roll back those changes, but when i click "undo" an error message appears, telling me that "Problems occurred running undo local changes", reason "Resource is out of sync with the file system".

Now i'd really like to undo my changes :|

Anyone have any ideas?

Thx

回答1:

You should be able to:

  • launch a refresh sandbox (that will not commit anything), as shown in your previous question "Why aren't my pending changes being shown in RTC?"
  • then undo your local changes

This thread on jazz.net has a more complete but dangerous solution:

(preface: ehughes does advise in the comment:

Don't reload!
The user's Eclipse workspace has the wrong view of the filesystem, it just needs to be refreshed.
Reloading for this is like using an atomic weapon to kill a fly. Just refresh! It's easy, quick, and painless!

)

What matters is whether the metadata associated with the sandbox is synchronized with the metadata about the workspace in the repository.
(The fact that it seems in sync to you is not sufficient :-).

And the right answer is to re-load, with the "reload projects out of sync" action.
In my experience, this will never overwrite any of your local changes, and it definitely will not change the date stamp on any file that is currently loaded and in-sync with what is in the repository.

(actually it can erase/delete local changes)

But until we get confirmation from the RTC SCM team that the "re-load out of synch" operation will never overwrite local changes, I'd store a copy of your sandbox in some temp directory before doing the load, just in case.


Note: that same thread mentions:

this error message should be improved.
It should say something like:

Files in your sandbox are out of sync with your repository workspace

I've submitted work item 185778 to get this fixed.