[josm-dev] Jumbo Patch

Dave Hansen dave at sr71.net
Sat Dec 15 22:15:55 GMT 2007


On Sat, 2007-12-15 at 22:27 +0100, Frederik Ramm wrote:
> > The real problem here is a disconnection between the times when a
> > Command is created and when it is executed.  How do we ever tell
> > that a command is still _valid_? 
> 
> Maybe we could - this is now wild speculation, I haven't thought it
> through properly - also add a cache on the OMSPrimitive object level
> that tells us which commands have modified the object in question.
> That would also help us find out which commands are still "valid",
> would it not?

I've thought along the same lines.  Not only would it allow us to
determine validity, but it would also let us do things like equivalency
or see if the command is obsolete.

For instance, two commands may try to delete a node from a way.  If we
ensure that they compare to the same thing, then once the command fails
to apply to the way, we can go back and look to realize that we already
did the same thing.

> A very confusing thing about JOSM at the moment is that we completely
> delete the command history whenever an upload has partly succeeded.
> We have to do this because if we have uploaded at least one
> modification, then *any* of the commands in the queue could have been
> responsible for the modification, and we cannot allow the user to undo
> anything lest he might undo the change we have already uploaded.

Why can't we allow them to undo changes that have been uploaded?

Ideally, I could change an object, press upload, press undo, and upload
again to get back to the original server state.

We have the concept of "modified" already.  We must clear that when we
do an upload.  Could we set it again it when an undo'd command is
applied to an object?  Do we need to separate
"modified-and-needs-to-be-saved-to-file" from
"modified-and-needs-to-be-uploaded"?

-- Dave





More information about the josm-dev mailing list