[OSM-dev] Implementing 'undo' in Potlatch

Steve Coast steve at asklater.com
Tue Jul 17 16:31:51 BST 2007


On 17 Jul 2007, at 10:32, Richard Fairhurst wrote:

> Tom Hughes wrote:
>
>> In message <20070717094240.9si7oj7tww0cg40w at webmail.systemed.net>
>>         Richard Fairhurst <richard at systemed.net> wrote:
>>
>>> 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.
>>>
>> I'm very much inclined to say (b) and I suspect Steve will as well.
>
> Hokay, I can see that.
>
> The difficulty then comes in implementing multiple levels of undo. If
> you do (a) it's very easy, you just step back to the last version each
> time. If you do (b) it's not so simple.
>
> I guess there could be a way around this by adding a tag
> "rollback=from v20" to reinstated versions. Potlatch would then know
> that, to undo that, it should roll back to version 19.

Yeah so potlatch needs a hash that says 'way 32 has been undone once'  
and if undo is hit again then it updates the state to two versions  
ago, rather than one version ago. Unless someone has touched it in  
the mean time, of course.

>
> cheers
> Richard
>
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev
>

have fun,

SteveC | steve at asklater.com | http://www.asklater.com/steve/






More information about the dev mailing list