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:
- How to revert a single change made
- 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)
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.
Then select the project where the change was made and check it out.
Right-Click on the local check out and go to “Tortoise SVN –> 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.
To now revert all changes I made in revision 10, I can right click on the revision and select “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”:
Before commiting you can check, if you did everything correctly:
The changes should be reverted after committing:
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.
This will also alternate your lokal check out to this old revision. You then have to commit it back to Polarion.