Modify

Opened 3 months ago

Last modified 3 months ago

#18461 new enhancement

Unresolved conflicts: Warn before or deny some data layer actions

Reported by: skyper Owned by: team
Priority: normal Milestone:
Component: Core Version: latest
Keywords: template_report unresolved conflict data layer session merge Cc:

Description (last modified by skyper)

There are some data layer actions which are dangerous and may lead to problems.
One example:

What steps will reproduce the problem?

  1. have a data layer with unresolved conflicts (e.g. reverting an old changeset containing changes in long route relations)
  2. have another data layer with up to date data of the region
  3. merge layers without resolving conflicts

What is the expected result?

Actions is denied or at least a big warning is shown about unresolved conflicts

What happens instead?

Action is performed and conflicts are lost

Please provide any additional information below. Attach a screenshot if possible.

In my case, as I know some problems with merge, I always duplicate layers before merging but duplicate does not warn nor does it keep the conflicts.
So I ended up with:

SEVERE: org.openstreetmap.josm.io.OsmApiException: ResponseCode=412, Error Header=<Relation 9708570 requires the nodes with id in 5760376749,6138235465, which either do not exist, or are not visible.>

and

WARNING: JOSM expected to find primitive [node 6138235465] in dataset but it is not there. Please report this at https://josm.openstreetmap.de. This is not a critical error, it should be safe to continue in your work

We have a warning before upload but:

  • merge (selection)
  • save (as)
  • save session
  • upload selection
  • duplicate layer (might simply duplicate keeping all conflicts)

all suffer similar problems

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2019-12-24 11:33:02 +0100 (Tue, 24 Dec 2019)
Revision:15611
Build-Date:2019-12-25 02:31:00
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (15611 en) Linux Debian GNU/Linux 10 (buster)
Memory Usage: 414 MB / 964 MB (130 MB allocated, but free)
Java version: 11.0.5+10-post-Debian-1deb10u1, Debian, OpenJDK 64-Bit Server VM
Dataset consistency test: No problems found

Plugins:
+ reverter (35248)
+ tag2link (35248)
+ undelete (35248)
+ utilsplugin2 (35248)

Last errors/warnings:
- E: javax.net.ssl.SSLException: Read timed out. Cause: java.net.SocketTimeoutException: Read timed out
- E: java.util.concurrent.ExecutionException: org.openstreetmap.josm.io.OsmTransferException: Could not connect to the OSM server. Please check your internet connection.. Cause: org.openstreetmap.josm.io.OsmTransferException: Could not connect to the OSM server. Please check your internet connection.. Cause: javax.net.ssl.SSLException: Read timed out. Cause: java.net.SocketTimeoutException: Read timed out
- E: Error header: Relation 9708570 requires the nodes with id in 5760376749,6138235465, which either do not exist, or are not visible.
- W: Error header "Relation 9708570 requires the nodes with id in 5760376749,6138235465, which either do not exist, or are not visible." did not match with an expected pattern
- E: org.openstreetmap.josm.io.OsmApiException: ResponseCode=412, Error Header=<Relation 9708570 requires the nodes with id in 5760376749,6138235465, which either do not exist, or are not visible.>
- E: Precondition violation - org.openstreetmap.josm.gui.widgets.HtmlPanel[,0,0,0x0,invalid,layout=java.awt.BorderLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=9,maximumSize=,minimumSize=,preferredSize=]
- W: JOSM expected to find primitive [node 5760376749] in dataset but it is not there. Please report this at https://josm.openstreetmap.de. This is not a critical error, it should be safe to continue in your work.
- E: java.lang.Exception

Attachments (1)

josm_18455_conflict.osm (1.4 KB) - added by skyper 3 months ago.
sample file

Download all attachments as: .zip

Change History (7)

comment:1 Changed 3 months ago by skyper

Description: modified (diff)

We already have a warning for "save (as)" but no warning for "upload selection" and "save session".

comment:2 Changed 3 months ago by skyper

Description: modified (diff)

comment:3 in reply to:  1 Changed 3 months ago by Don-vip

Replying to skyper:

no warning for "upload selection"

Can you please re-check? UploadSelectionAction delegates to UploadAction, which performs this check and display the following message:

        HelpAwareOptionPane.showOptionDialog(
                MainApplication.getMainFrame(),
                tr("<html>The data to be uploaded participates in unresolved conflicts of layer ''{0}''.<br>"
                        + "You have to resolve them first.</html>", Utils.escapeReservedCharactersHTML(layer.getName())
                ),
                tr("Warning"),
                JOptionPane.WARNING_MESSAGE,
                ht("/Action/Upload#PrimitivesParticipateInConflicts")
        );

comment:4 in reply to:  1 ; Changed 3 months ago by Don-vip

Replying to skyper:

no warning "save session"

instead of a warning, we should save the conflicts in the session file and allow to resolve them later

comment:5 Changed 3 months ago by Don-vip

Keywords: session merge added; action removed

Changed 3 months ago by skyper

Attachment: josm_18455_conflict.osm added

sample file

comment:6 in reply to:  4 Changed 3 months ago by skyper

Replying to Don-vip:

Replying to skyper:

no warning for "upload selection"

Can you please re-check? UploadSelectionAction delegates to UploadAction, which performs this check and display the following message:

        HelpAwareOptionPane.showOptionDialog(
                MainApplication.getMainFrame(),
                tr("<html>The data to be uploaded participates in unresolved conflicts of layer ''{0}''.<br>"
                        + "You have to resolve them first.</html>", Utils.escapeReservedCharactersHTML(layer.getName())
                ),
                tr("Warning"),
                JOptionPane.WARNING_MESSAGE,
                ht("/Action/Upload#PrimitivesParticipateInConflicts")
        );

Did try it with attached example file:

  1. load file
  2. select way
  3. update selection
  4. upload selection

The upload dialog window is opened instead of the warning. So at least the order of warning <-> upload dialog is different. Did not go further, though.

BTW: Messed up the name of the attachment but did not find a way to delete my own attachments.

Replying to Don-vip:

Replying to skyper:

no warning "save session"

instead of a warning, we should save the conflicts in the session file and allow to resolve them later

+1 for saving or copying/merging to new layer if possible, though I would still expect some kind of hint/warning about the unresolved conflicts.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to skyper
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.