Revert changes and recover deleted items in Polarion

Because Polarion saves each change in the underlying SVN repository, you can restore data or revert any changes you’ve made in Polarion.

Attention: Be very carefull with working directly at the repository! I recommend to test changes on the repository at a local Polarion first, before you do it at a productive system. I want to emphazise one thing especially: you shouldn’t delete or move things via the repository (which might be technically the same). If done incorrectly you might disconnect items from their history and other stuff. (Because the repository recognizes it as new items, instead of old items). This might be reverted again, but if recognized too late you would have “split” the history. – Use the UI wherever possible!

Enough of the warnings now – let’s get to the topics.

I will show two Use Cases:

  1. How to revert a single change made
  2. How to revert a whole project to an old revision

How to revert a single change

I am using the Tortoise SVN Browser (TortoiseSVN) for this.

Since 21R1 you have to configure the direct SVN access in order to use tortoiseSVN to access the repo. Check the chapter “Direct SVN access” in the help: https://docs.sw.siemens.com/en-US/product/230235217/doc/PL20210414112206988.xid1465510/html/xid1974922

To demonstrate it, I will make a change in Polarion (can be anything Test Run, Report Page whatever). I will simply alternate and remove a requirement from the system specification in the DrivePilot project. (Although for this use case a feature might come in near future)

Figure 1: Change in System Specification

To revert this change, I will check out the project locally. Therefore I open the tortoise browser and access the Polarion repository. As my Polarion here is local, I can access it via the URL: http://127.0.0.1/repo. By default it’s your Polarion address + /repo.

Figure 2: Access Repository

Then select the project where the change was made and check it out.

Figure 3: Check out project

Right-Click on the local check out and go to “Tortoise SVN –> Show Log”.

Figure 4: Show Log

In the log we can see, which changes I made in the project. For the selected revision it lists all files that were changed. If I click on them, it also compares the files and I can search for the correct change.

Figure 5: Changes in the project

To now revert all changes I made in revision 10, I can right click on the revision and select “Revert changes from this revision”.

Figure 6: Revert changes from this Revision

What this will do: it will change our local copy in a way, that the changes are reverted locally.

Then we can update the current repository of Polarion system by committing the changes by right-clicking on the check out and click “SVN Commit”:

Figure 7: SVN Commit

Before commiting you can check, if you did everything correctly:

Figure 8: Commit changes

The changes should be reverted after committing:

Figure 9: Changes reverted

How to revert a whole project to an old revision

This is done almost exactly the same, as reverting only one change as shown before. The only difference is in Figure 6. Here you wouldn’t select one revision you want to revert, but you can basically turn back the time and select an old revision to which it should be reverted completely (reverting all changes since then).

To set the project back on the initial state, you would have to select the first revision and click “Revert to this Revision” in the “Show Log” dialogue.

Figure 10: Revert to Revision

This will also alternate your lokal check out to this old revision. You then have to commit it back to Polarion.

Published by PolarionDude

Dude who does Polarion - if Polarion would be a verb.

3 thoughts on “Revert changes and recover deleted items in Polarion

Leave a reply to ansari525 Cancel reply

Design a site like this with WordPress.com
Get started