How to recover changset history?
Hi All,
A client had an issue with a file and delivered a change set that he
was not supposed to or that caused an error.
To fix it he:
1. Attempted to reverse a change that was committed in order to recover a file.
2. He was able to recover the version of the file that he wanted but all of its history previous to the recovery was not kept in tact.
3. He now wants to see if there is a way to recover that changeset
history.
How would we recover that?
A client had an issue with a file and delivered a change set that he
was not supposed to or that caused an error.
To fix it he:
1. Attempted to reverse a change that was committed in order to recover a file.
2. He was able to recover the version of the file that he wanted but all of its history previous to the recovery was not kept in tact.
3. He now wants to see if there is a way to recover that changeset
history.
How would we recover that?
3 answers
When you say that he reversed a change and was able to recover the version of the file that he wanted, did this remove the file from the Jazz repo? I believe Jazz calculates file history from previous changesets, and I would be very surprised if reversing that changeset or recovering a previous file version somehow removed all traces of that file from previous changesets. If the original (broken) file still exists in the repo, or in a version of the repo that you can revert back (forward?) to, I would save a copy of the good version in a file outside of your workspace, get back into that broken state, and instead of reversing any changesets I would replace the contents of the broken file with the contents of the good file and deliver that as a new changeset. In theory, this should preserve the file history while still allowing you to repair the broken file.
The following is a terrible, potentially very work intensive solution, but if all else fails, a very brute force solution would be to rollback the component containing the broken file to a previous baseline and essentially merge changes since then back in, fixing or replacing the broken changeset as you go. See this StackOverflow answer for how to do that.
One might also be aware that there are local history of files that can be available ( using Eclipse RTC ). See Window / Preferences / General / Workspace / Local History.
The local history can be used to 'recover' revisions that left you broken. Example actions: right click in editor, look for Local History for several options. This is also available from Project Explorer view ( right click on file, look for Compare )
The local history can be used to 'recover' revisions that left you broken. Example actions: right click in editor, look for Local History for several options. This is also available from Project Explorer view ( right click on file, look for Compare )
There should be no way for a user (or admin) to change change-set history (i.e. the history of versions that have been checked in) The most they can do (with suitable permissions) is to wipe out the content of a particular version, but that version still exists in the change history ... you just cannot retrieve the content of that version. So I predict that the history is still there, but for some reason, you had trouble finding it. The most common reason for believing that you have "lost the history" is to create an "evil twin" of the original file (e.g., delete the original file, and then create a new file with the same name). One simple thing to check ... when you asked for the history of that file in Eclipse, did you check the "show all versions in repository" tool bar button? Unless it was an evil twin problem, you would see all the previous history on some branch of that file.