This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Problems reverting changeset

0

Hi,

As a continuation of this question I would like to revert changeset 21219686. But I am having trouble doing this with two different methods.

  1. JOSM reverter plugin - the connection times out.

  2. Perl script - I get the following error:

    me@server ~/revert $ perl revert.pl 21219686
    Use of uninitialized value $current_cs_or_comment in pattern match (m//) at revert.pl line 45.
    Use of uninitialized value $comment in string eq at revert.pl line 52.
    PUT changeset/create
    [[deleted line with HTML tags which don't show up nicely in help.openstreetmap.org editor]]
    GET http://api06.dev.openstreetmap.org/api/0.6/changeset/21219686/download... 404 Not Found (0b)
    changeset 21219686 cannot be retrieved: 404 Not Found

Can anyone help with this? Or just go ahead and do the revert for us?

Thanks

asked 23 Mar '14, 21:06

eric22's gravatar image

eric22
401111322
accept rate: 50%


One Answer:

2

You need to add a changeset comment when calling the Perl code. For example:

perl revert.pl 21219686 "Reverting damage in changeset 21219686"

answered 23 Mar '14, 21:58

Richard's gravatar image

Richard ♦
30.9k44279412
accept rate: 18%

That gets rid of the two "Use of..." errors at the top, but not the 404...

Interestingly, when I set "dryrun=0" in the config file and run again, the 404 error disappears, but instead I get "cannot create changeset: 401 Authorization Required". I wonder if this indicates my name/PW are wrong in the config file. But I've checked pretty closely, I really think they're correct.

(23 Mar '14, 22:09) eric22
3

Yes, that's because you're pointing at a test instance on OSM's development server (api06.dev.openstreetmap.org). You need to change this to the URL of the main OSM API. This is documented in the README at http://svn.openstreetmap.org/applications/utils/revert/README .

(24 Mar '14, 07:47) Richard ♦
1

Richard: Thanks for putting me on the right track. I figured it out :)

(24 Mar '14, 21:09) eric22

Source code available on GitHub .