[OSM-dev] Implementing 'undo' in Potlatch
Steve Coast
steve at asklater.com
Tue Jul 17 16:33:32 BST 2007
On 17 Jul 2007, at 11:31, Robert (Jamie) Munro wrote:
> -----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.
Why not? We're not running out of space.
>> 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.
No - potlatch isn't meant to work in transactions. You're not
supposed to bother the user with that as it raises the barrier to entry.
have fun,
SteveC | steve at asklater.com | http://www.asklater.com/steve/
More information about the dev
mailing list