It's all about the answers!

Ask a question

How to recover changset history?


Daniel Ruebush (9715187) | asked Aug 17 '16, 9:12 p.m.
edited Aug 20 '16, 11:28 a.m. by David Lafreniere (4.8k7)
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?



3 answers



permanent link
Ken Bellows (211) | answered Aug 18 '16, 11:10 a.m.
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.

permanent link
Kevin Ramer (4.5k8183200) | answered Aug 18 '16, 12:36 p.m.
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 )



permanent link
Geoffrey Clemm (30.1k33035) | answered Aug 18 '16, 8:02 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Aug 18 '16, 8:03 p.m.
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.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.