[OSM-dev] Implementing 'undo' in Potlatch

Richard Fairhurst richard at systemeD.net
Tue Jul 17 09:42:40 BST 2007


Easily the most frequently requested Potlatch feature at SOTM was an  
'undo' feature.

Essentially, because Potlatch is an online editor, I'm going to  
implement this as a history rollback. In other words, undo will return  
to the previous version of a way. You can only undo your own work,  
i.e. you can't roll another person's edits back[1].

So there are two ways to do it:

a) Destructive rollback - Delete the most recent version from the  
database, and set the previous version (and any associated  
segments/nodes) as current/visible.

b) Non-destructive rollback - Set the current version as invisible,  
then insert the previous version as a new version, thereby maintaining  
the "undone" version in the history.

Given that you'll only be able to undo your own edits, I'm tempted to  
go for (a). But I would appreciate views from all and sundry,  
particularly keepers of the flame of database purity such as SteveC  
and TomH.

cheers
Richard

[1] unless, possibly, you're a sysadmin, using some special sysadmin  
rollback privileges





More information about the dev mailing list