Reverter is a plugin for changeset rollback.
Using revert scripts is not always convenient. In many cases it is useful to preview and check the changes before uploading the reversion changeset.
Do not revert changes by other users without contacting them first in a polite way and giving them enough time to reply (one week minimum). Broken data can be fixed easily, but a broken community is not so easy to restore. :)
Do not be tempted to revert early, just to avoid potential conflicting edits by other users! When in doubt, discuss things on the mailing list before you act.
- Download the area affected by the changeset to be reverted. If you miss a few objects, this does not matter - they will be downloaded automatically. You can also start with an empty layer. (File -> New Layer)
- After selecting the Reverter plugin from the JOSM/Plugins list, installing it and restarting JOSM, you should find a new menu item Data -> Revert changeset. Select it and enter the changeset id to be reverted. For a full revert, keep the default option.
- Hint: If there was a way deleted by the changeset you want to revert, and after the first downloading of map data by the reverter plugin only the nodes of that deteted way are shown, try to do a second revert with the same changeset number. In some cases, the deleted way itself is now in JOSM's screen display.
- The plugin creates changes that take back the actions by the previous changeset. Review the results.
- Upload. In the upload dialog you can check the summary of changes one last time
If the changeset was mostly OK, but broke a few objects, you can do a partial revert. There are two ways to do a partial revert:
- Do a full revert as described above, but do not upload. Select the objects that should be reverted and run File -> Upload selection. However, if the revert contains deletions of objects, those cannot be selected anymore and would not be included.
- Initially, download the objects to be reverted, select them and use the option Revert selection only in the Reverter dialog.
In both cases, to restore the geometry of a way, you have to select both the way and its nodes. (Because a way only stores a list of node ids, but not their positions.) You can search (Ctrl-F) for the expression
selected | child (selected type:way) to add the nodes of all selected ways to the selection.
Clean and dirty reverts
A changeset is clean, if there are no modifications on to top of it (e.g. by other users), otherwise it is dirty. The Reverter Plugin is able to handle both clean and dirty reverts. In case of a subsequent change by another user, the upload will fail and a conflict is created. You can resolve these conflicts with the JOSM's standard conflict dialog and upload afterwards.
Revert multiple changesets in one upload
It is possible to undo multiple subsequent changesets in one upload. Just revert them one after the other. (Latest first)
(This is advanced usage, not recommended if you are not sure what you are doing. Contact the Data working group for help and advice on handling complex reverts.)
How does it work?
The reverter plugin downloads the changeset from the server. It fetches all the objects affected by the changeset. It will not download the current version of the objects, but the version immediately after the changeset to be reverted. Then it automatically modifies the local copy of the objects, such that the changeset is undone. These modifications are tracked by JOSM in the same way it would record your manual edits.
- If the changeset to be reverted adds a tag to an existing object, this tag is removed by the reverter plugin.
- If it deletes objects, the plugin will undelete it (i.e. remove the deleted flag). The id of the object will stay the same and the history is conserved.
- If it creates new objects (e.g. duplicates), they will be deleted. In this case you won't have visual feedback. (But you can see the deletions in the upload dialog.)
The upload is not special in any way, it will increase the version of each affected object and the revert process will be visible in the history.
Please file a bug report, if you have any problems with this Plugin. A "Precondition failed" message from the server should not occur, this would be an error to report. When writing a bug ticket, try to remember the steps you did and note the changeset ids.
Written by User:Upliner