[josm-dev] API 0.6 upload

Matt Amos zerebubuth at gmail.com
Thu Apr 16 18:09:20 BST 2009


there is a small bug that means JOSM (from r1523) isn't able to upload
to the 0.6 API. could someone with SVN please commit the following
patch?

cheers,

matt

Index: src/org/openstreetmap/josm/io/OsmApi.java
===================================================================
--- src/org/openstreetmap/josm/io/OsmApi.java	(revision 1528)
+++ src/org/openstreetmap/josm/io/OsmApi.java	(working copy)
@@ -292,7 +292,6 @@
         }

         CreateOsmChangeVisitor duv = new
CreateOsmChangeVisitor(changeset, this);
-        String diff = duv.getDocument();

         ArrayList<OsmPrimitive> processed = new ArrayList<OsmPrimitive>();

@@ -307,6 +306,7 @@
         Main.pleaseWaitDlg.currentAction.setText(tr("Uploading..."));
         if (cancel) throw new OsmTransferCancelledException();

+        String diff = duv.getDocument();
         String diffresult = sendRequest("POST", "changeset/" +
changeset.id + "/upload", diff);
         try {
             DiffResultReader.parseDiffResult(diffresult, list,
processed, duv.getNewIdMap(), Main.pleaseWaitDlg);




More information about the josm-dev mailing list