[OSM-dev] Implementing 'undo' in Potlatch

Tom Hughes tom at compton.nu
Tue Jul 17 11:44:09 BST 2007


In message <469C9A6E.6000305 at arjam.net>
        Robert Munro <rjmunro at arjam.net> wrote:

> Tom Hughes wrote:
>
>> 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.

Well there's a difference between undoing something you're working on
and rolling back an edit a week later.

The problem is that Potlatch commits changes to the database in real
time so the two get conflated together somwehat.

>> 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.

What if you come back a week later and undo it? Then you would want it
to go in the database history properly.

This probably needs the proper changeset support we've talked about, so
that Potlatch can open a changeset when you start working and close it
when you finish. Then undos within a changeset would be real deletes and
undos that have been committed by closing the changeset would be done
as proper history updates.

Tom

-- 
Tom Hughes (tom at compton.nu)
http://www.compton.nu/




More information about the dev mailing list