ASTi Logo

Telestra App Note

How to undo changes to a Telestra Project (#110)

DISCLAIMER: This is an unsupported "expert-mode" procedure and can cause irreparable damage to your project. You have been warned!

Let's say you spent a few days making good changes to a project, followed my some unwanted changes. Currently, the only way to 'undo' the unwanted changes is to revert to a backup which might be old and not contain the good changes.

There is a command-line way to revert to a specific point in the changeset. Here are the steps:

  1. Make a backup of the "bad" project in case you screw this procedure up and want to start over.
  2. MAKE SURE THAT STUDIO IS NOT RUNNING.
  3. You need to either login to the target console or ssh in to a shell on the target. If system is "secure", then 'root' won't work; use 'admin' and then su to 'root'.
  4. Change directory to the project in question:

     "cd /var/local/asti/projects/<PROJECT_NAME>"
  5. Enter:

     "hg rollback"

    This command causes the most recent commit in the project changelog to be completely removed as if it never happened. This command can be executed multiple times to go back back multiple steps. Use the Telestra web interface->Project Management page to view the changelog for the project to see how many times you need to execute the "hg strip tip" command to get back to where you want to be. If you refresh the Telestra web interface page, the project changelog will refresh to show you the result of the "hg strip tip" command.