[OSM-dev] Implementing 'undo' in Potlatch

Robert (Jamie) Munro rjmunro at arjam.net
Tue Jul 17 11:31:10 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tom Hughes wrote:
> In message <20070717094240.9si7oj7tww0cg40w at webmail.systemed.net>
>         Richard Fairhurst <richard at systemed.net> wrote:
> 
>> 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.
> 
> I'm very much inclined to say (b) and I suspect Steve will as well.
> 
> The general rule is that we don't delete things at all...
> 
> Basically what I believe you should do is exactly what would happen if
> the user manually changed the way back to the previous configuration, so
> you just put the old version back in the current tables (with a new
> timestamp of course) and insert a copy into the history tables as normal.

That's just silly. We don't want to keep the history of every mis-drag
and mis-click in the database.

> If you revert something in CVS or subversion you don't lose the history
> of it, you just get a new revision that happens to be the reverse of the
> one you were undoing.

I don't every typo into svn. By the time I enter a changeset, I have
made many hundreds of additions, deletions and undos in my text editor.
It's only once I am happy that I check the thing in. It's the same with
JOSM, and it should be the same with Potlatch.

Robert (Jamie) Munro
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGnJprz+aYVHdncI0RAhB+AKDbJVRPEnwlaSYzkDnfjjuVMYheKACeIQL2
VtIWh2BbwJxK7ShfBQs8+es=
=Opr6
-----END PGP SIGNATURE-----




More information about the dev mailing list