Re: [OSM-talk] revert.pl

2009-09-03 Thread andrzej zaborowski
2009/9/4 Richard Weait :
> On Thu, Sep 3, 2009 at 9:04 PM, Richard Weait wrote:
>> On Thu, Sep 3, 2009 at 8:02 PM, andrzej zaborowski wrote:
>>> It'll probably fail with error 500 because there are so many elements
>>> and the server seems unstable, so you can split the changeset using
>>> http://www.openstreetmap.pl/balrog/bulkupload/split.py and upload in
>>> reverse order, it should still be much quicker than using the revert
>>> tool.
>
> split.py expected changesets of version 0.3, but the API is providing
> version 0.6.  Split worked after I changed the version it expected.

Ahh yes, that's because the
http://wiki.openstreetmap.org/wiki/OsmChange page never mentions what
the version is supposed to be and all examples use "0.3" on that page
(is it possible that they come from the time when 0.3 was the API
version?).  I once made upload.py accept both 0.3 and 0.6 and forgot
to do the same to split.py but now changed it too.

>
> upload.py gave authentication errors.  Should I have escaped the "@"
> in my email address?

Honestly I don't know, I only ever login using the username alone (in
your case that would be rw__?), I'll try out email authentication next
time I'll be uploading something.  For now added a comment at the top
of the file.

Cheers

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] revert.pl

2009-09-03 Thread Richard Weait
On Thu, Sep 3, 2009 at 9:04 PM, Richard Weait wrote:
> On Thu, Sep 3, 2009 at 8:02 PM, andrzej zaborowski wrote:
>> It'll probably fail with error 500 because there are so many elements
>> and the server seems unstable, so you can split the changeset using
>> http://www.openstreetmap.pl/balrog/bulkupload/split.py and upload in
>> reverse order, it should still be much quicker than using the revert
>> tool.

split.py expected changesets of version 0.3, but the API is providing
version 0.6.  Split worked after I changed the version it expected.

upload.py gave authentication errors.  Should I have escaped the "@"
in my email address?

I was able to get revert.py to work on a small changeset by a
scribbler.  Very nice.  Thank you both, Andrzej and Frederik.

Best regards,
Richard

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] revert.pl

2009-09-03 Thread Richard Weait
On Thu, Sep 3, 2009 at 8:02 PM, andrzej zaborowski wrote:
> It'll probably fail with error 500 because there are so many elements
> and the server seems unstable, so you can split the changeset using
> http://www.openstreetmap.pl/balrog/bulkupload/split.py and upload in
> reverse order, it should still be much quicker than using the revert
> tool.

Thank you, I'll try that now.

Best regards,
Richard

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] revert.pl

2009-09-03 Thread andrzej zaborowski
2009/9/4 Richard Weait :
> At the risk of trifling with things that I do not fully understand[1],
> I've been using revert.pl to revert a changeset of my own.  I blew it
> and imported a file with "bad things"[2] and want to undo the mess.
>
> I have revert.pl fresh from svn today, and it runs, but eventually stops with
> "node 481692883 cannot be retrieved: 500 Internal Server Error"
>
> I've run it four times and it gets a few thousand nodes further each time.
>
> Any suggestions for successfully reverting this large changeset?

Since it's all creations in this changeset, you can simply download
the changeset from
http://www.openstreetmap.org/api/0.6/changeset/2354740/download ,
replace the  tag with  and upload using
http://www.openstreetmap.pl/balrog/bulkupload/upload.py

It'll probably fail with error 500 because there are so many elements
and the server seems unstable, so you can split the changeset using
http://www.openstreetmap.pl/balrog/bulkupload/split.py and upload in
reverse order, it should still be much quicker than using the revert
tool.

Cheers

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] revert.pl

2009-08-03 Thread Frederik Ramm
Hi,

andrzej zaborowski wrote:
> Are you sure?  I deleted a pharmacy in this changeset:
> http://www.openstreetmap.org/browse/changeset/1990924
> 
> and it has all the tags in place.

Then I stand corrected - it seems to work for all nodes, whether tagged 
or not. But it doesn't work for ways or relations. Or at least it didn't 
when I last looked ;-)

Bye
Frederik

-- 
Frederik Ramm  ##  eMail frede...@remote.org  ##  N49°00'09" E008°23'33"

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] revert.pl

2009-08-03 Thread andrzej zaborowski
2009/8/3 Frederik Ramm :
> andrzej zaborowski wrote:
>> Similarly deletions can be reverted easily
>
> No, because the osc file does not contain all information about the previous
> state of the deleted object!
>
> (It only works for untagged nodes.)

Are you sure?  I deleted a pharmacy in this changeset:
http://www.openstreetmap.org/browse/changeset/1990924

and it has all the tags in place.

Cheers

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] revert.pl

2009-08-02 Thread Frederik Ramm
Hi,

andrzej zaborowski wrote:
> Similarly deletions can be reverted easily

No, because the osc file does not contain all information about the 
previous state of the deleted object!

(It only works for untagged nodes.)

Bye
Frederik

-- 
Frederik Ramm  ##  eMail frede...@remote.org  ##  N49°00'09" E008°23'33"

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] revert.pl

2009-08-02 Thread andrzej zaborowski
2009/8/2 Ulf Mehlig :
> I tried to revert two large changesets of mine (double import of
> municipal borders in Pará/north Brazil due to a local network problem)
> via revert.pl (fresh from svn); in the middle of the reversal process, I
> got the message
>
> GET http://www.openstreetmap.org/api/0.6/node/451437544/history... 500 
> Internal Server Error (369b)
>
> and now my try to resume the revert process ends after a number of
> deletions with
>
> relation 183111 cannot be retrieved: 500 read failed: Connection reset by peer
>
> The two changesets in question are 1980659 and 1980698.
>
> Is there anybody who can help?

Since the changeset only contains creations, the easiest way I found
to revert those is manually:
 * download the changeset xml (wget
http://www.openstreetmap.org/api/0.6/changeset/1980698/download ...)
 * replace occurrences of "create" with "delete" (in vim :%s/create/delete/)
 * upload resulting changeset, you can use the upload script at
http://www.openstreetmap.pl/balrog/bulkupload/upload.py for that
(./upload.py newchangeset.osc)

Similarly deletions can be reverted easily, only modifications need
looking up the node history like revert.pl does.

Cheers

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] revert.pl

2009-08-02 Thread Frederik Ramm
Hi,

Ulf Mehlig wrote:
> I tried to revert the changesets again, via ssh from a server with much
> faster internet connection ... on second try revert.pl terminated
> without an error message now, but the ways of the respective changesets
> are still there when I download parts of the area in JOSM; the
> changesets also haven't disappeared from the history page :-(

Please do not try to use the undo/revert Perl scripts if you do not know 
exactly what you are doing.

I don't want to sound too harsh but let me quote from the README file 
which you must have read or you wouldn't have been able to run the scripts:

"Be sure that you feel confident to fix anything you might break. If you 
do not know your PUTs from your GETs, if you do not know the details of 
API 0.6, or know what changesets are and how they work, then DO NOT USE 
THIS SOFTWARE."

First of all, changesets will never disappear from the history page. All 
you do when "reverting" is you add a new version that re-creates the 
state something was in before a change.

Second, the revert code is not really optimized for large-scale 
deletions like the one you're attempting. If I am not mistaken it will 
try and download the history of every one of the 20k nodes in your 
changeset when instead it should simply try and delete them...

Why it didn't work I don't know, it is entirely possible that some error 
conditions do not lead to proper error messages.

I'll try and fix it.

Bye
Frederik

-- 
Frederik Ramm  ##  eMail frede...@remote.org  ##  N49°00'09" E008°23'33"

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] revert.pl

2009-08-02 Thread Shaun McDonald


On 2 Aug 2009, at 23:26, Ulf Mehlig wrote:


Replying to my own email ...

I tried to revert the changesets again, via ssh from a server with  
much

faster internet connection ... on second try revert.pl terminated
without an error message now, but the ways of the respective  
changesets

are still there when I download parts of the area in JOSM; the
changesets also haven't disappeared from the history page :-(



The changesets won't disappear from the history page. Reverting  
creates a new version with same tags/lat/lons of the one that you are  
reverting to, except the version number is incremented and the  
changeset is the one that you have used. This way w can revert your  
revert if required.


Shaun   


Suggestions?
Ulf

On Sun, 2009-08-02 at 10:14 -0300, Ulf Mehlig wrote:

I tried to revert two large changesets of mine (double import of
municipal borders in Pará/north Brazil due to a local network  
problem)
via revert.pl (fresh from svn); in the middle of the reversal  
process, I

got the message

GET http://www.openstreetmap.org/api/0.6/node/451437544/history...  
500 Internal Server Error (369b)


and now my try to resume the revert process ends after a number of
deletions with

relation 183111 cannot be retrieved: 500 read failed: Connection  
reset by peer


The two changesets in question are 1980659 and 1980698.

Is there anybody who can help?
Many thanks! Ulf


--
Ulf Mehlig 
--


___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk




smime.p7s
Description: S/MIME cryptographic signature
___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] revert.pl

2009-08-02 Thread Ulf Mehlig
Replying to my own email ...

I tried to revert the changesets again, via ssh from a server with much
faster internet connection ... on second try revert.pl terminated
without an error message now, but the ways of the respective changesets
are still there when I download parts of the area in JOSM; the
changesets also haven't disappeared from the history page :-(

Suggestions?
Ulf

On Sun, 2009-08-02 at 10:14 -0300, Ulf Mehlig wrote:
> I tried to revert two large changesets of mine (double import of
> municipal borders in Pará/north Brazil due to a local network problem)
> via revert.pl (fresh from svn); in the middle of the reversal process, I
> got the message
> 
> GET http://www.openstreetmap.org/api/0.6/node/451437544/history... 500 
> Internal Server Error (369b)
> 
> and now my try to resume the revert process ends after a number of
> deletions with
> 
> relation 183111 cannot be retrieved: 500 read failed: Connection reset by peer
> 
> The two changesets in question are 1980659 and 1980698.
> 
> Is there anybody who can help?
> Many thanks! Ulf
> 
-- 
 Ulf Mehlig 
--


___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk