[OSM-dev] Implementing 'undo' in Potlatch
Steve Coast
steve at asklater.com
Tue Jul 17 16:29:49 BST 2007
On 17 Jul 2007, at 10:07, 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.
yes...
... but really what should happen is that you should get the state
for a bbox at some point in time T and revert back to there for ways,
nodes and segments with new insertions for state. Maybe on a per-way
basis as a way can have new nodes / connections on it now that it
didn't back then that you want to keep. And stuff. Or a list of
changes made between NOW() and T that you can revert on a per action
basis.
have fun,
SteveC | steve at asklater.com | http://www.asklater.com/steve/
More information about the dev
mailing list