Modify

Opened 5 years ago

Last modified 5 years ago

#18980 new defect

JOSM doesn't allow me to deal with conflicts when local version is higher than server version

Reported by: per4ik35@… Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: conflict Cc:

Description

Trying to upload changeset. If there some warnings I deal with them and then upload. When changeset has points to modify it tells me that there are conflicts to handle. Clicking on synchronize all and nothing display. It happens every time and I can't upload anything

Attachments (1)

test.xml (949 bytes ) - added by per4ik35@… 5 years ago.
Example of file

Download all attachments as: .zip

Change History (17)

comment:1 by GerdP, 5 years ago

Ticket #18981 has been marked as a duplicate of this ticket.

comment:2 by GerdP, 5 years ago

Thanks for your report, however your ticket is incomplete and therefore not helpful in its current form.

Please add all needed information according to this list:

  • The required parts of the Status Report from your JOSM.
  • Describe what behaviour you expected.
  • Describe what did happen instead.
  • Describe if and how the issue is reproducible.
  • Add any relevant information like error messages or screenshots.

To ensure that all technical relevant information is contained, create new tickets by clicking in JOSMs Main Menu on Helpsource:trunk/resources/images/bug.svg Report Bug.

Remember: This is a generic notice so we don't need to write the same stuff again and again. It may only apply in parts to the specific case!


comment:3 by per4ik35@…, 5 years ago

What steps will reproduce the problem?

  1. Open the changeset with points which "action"="modify"
  2. Resolve warnings if they exist
  3. Press button upload
  4. Add comments and press button send to server
  5. On appeared window with conflicts select synchronize

What is the expected result?

To see what conflicts have to be resolved

What happens instead?

Nothing appears

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

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2020-02-26 10:50:27 +0100 (Wed, 26 Feb 2020)
Build-Date:2020-02-26 09:52:41
Revision:15937
Relative:URL: ^/trunk

Identification: JOSM/1.5 (15937 ru) Mac OS X 10.14.6
OS Build number: Mac OS X 10.14.6 (18G95)
Memory Usage: 920 MB / 1820 MB (411 MB allocated, but free)
Java version: 1.8.0_241-b07, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: Display 2077749241 1680x1050
Maximum Screen Size: 1680x1050
VM arguments: [-Djava.library.path=/Applications/JOSM.app/Contents/MacOS, -DLibraryDirectory=${HOME}/Library, -DDocumentsDirectory=${HOME}/Documents, -DApplicationSupportDirectory=${HOME}/Library/Application Support, -DCachesDirectory=${HOME}/Library/Caches, -DApplicationDirectory=${HOME}/Applications, -DAutosavedInformationDirectory=${HOME}/Library/Autosave Information, -DDesktopDirectory=${HOME}/Desktop, -DDownloadsDirectory=${HOME}/Downloads, -DMoviesDirectory=${HOME}/Movies, -DMusicDirectory=${HOME}/Music, -DPicturesDirectory=${HOME}/Pictures, -DSharedPublicDirectory=${HOME}/Public, -DSystemLibraryDirectory=/Library, -DSystemApplicationSupportDirectory=/Library/Application Support, -DSystemCachesDirectory=/Library/Caches, -DSystemApplicationDirectory=/Applications, -DSystemUserDirectory=/Users, -DUserHome=${HOME}, -DSandboxEnabled=true, -DLaunchModifierFlags=0, -DLaunchModifierFlagCapsLock=false, -DLaunchModifierFlagShift=false, -DLaunchModifierFlagControl=false, -DLaunchModifierFlagOption=false, -DLaunchModifierFlagCommand=false, -DLaunchModifierFlagNumericPad=false, -DLaunchModifierFlagHelp=false, -DLaunchModifierFlagFunction=false, -Dapple.laf.useScreenMenuBar=true, -Dcom.apple.macos.use-file-dialog-packages=true, -Dcom.apple.macos.useScreenMenuBar=true, -Dcom.apple.mrj.application.apple.menu.about.name=JOSM, -Dcom.apple.smallTabs=true]
Dataset consistency test: No problems found

Plugins:
+ reverter (35313)

comment:4 by GerdP, 5 years ago

I cannot reproduce the result without knowing the exact object that caused the conflict. I tried with a node where the server had a newer version and got the conflict dialog. If I got that right it might be possible that the conflict was resolved by clicking on the Synchronize button.
Please check if the changeset was closed. Please let us know the changeset id or the object.
If you still have the file with the change please attach it.

by per4ik35@…, 5 years ago

Attachment: test.xml added

Example of file

comment:5 by GerdP, 5 years ago

OK, your file says the node is version 10 but the latest server version is 9.
When I download the node from the server and modify its position JOSM doesn't change the version to 10. How did you create this file?

comment:6 by per4ik35@…, 5 years ago

It wasn't created by but by some script at my work. It is taking info about points from database and recently imported. By comparing them it is creating files for JOSM. You said about version, my file doesn't have the right one or it is have to be +1 when we are creating changeset with points to modify

in reply to:  6 comment:7 by anonymous, 5 years ago

Replying to per4ik35@…:

It wasn't created by but by some script at my work. It is taking info about points from database and recently imported. By comparing them it is creating files for JOSM. You said about version, my file doesn't have the right one or it is have to be +1 when we are creating changeset with points to modify

*wasn't created by me

comment:8 by GerdP, 5 years ago

I can only say that JOSM doesn't expect to find a version which is higher than the one on the server.
The idea of conflict management is that you download a specific version of the object, modify it and try to upload. If the object was changed in another changeset the version on the server will not match yours and the server replies that there is a conflict. So, you should never change the version on your side, the server answers with the new version if the upload was successfull.

comment:9 by GerdP, 5 years ago

Summary: JOSM doesn't allow me to deal with conflictsJOSM doesn't allow me to deal with conflicts when local version is higher than server version

If my understanding is correct JOSM should show a warning that the local version is higher than the server version.

comment:10 by per4ik35@…, 5 years ago

Hm, I didn't have such warning

comment:11 by per4ik35@…, 5 years ago

Right now I tried to upload same file with version 9 and it worked! Looks like it was a problem

in reply to:  10 comment:12 by GerdP, 5 years ago

Replying to per4ik35@…:

Hm, I didn't have such warning

I suggested this message as an improvement.

comment:13 by anonymous, 5 years ago

Can this feature be seen in last stable version?

comment:14 by GerdP, 5 years ago

Only when someone implements it. The current code explicitely ignores the case that the local version is higher than the server version. I don't know why, the code works like that since more than 10 years.

comment:15 by GerdP, 5 years ago

@team: The problematic code is in DatasetMerger.mergeById():

        if (target.getVersion() > source.getVersion())
            // target.version > source.version => keep target version
            return true;

Do we have this code to handle the case that a server version was redacted? If yes, shouldn't this produce some kind of notification or a dialog? I see two possible scenarios:
1) User downloads data with version x and modifies it -> server version x is redacted - > user tries to upload and gets a conflict.
2) User edits the object and increases the version outside of JOSM (this is what happened here).

What should JOSM do? Is there a way to distinguish these two cases? My suggestion would be:
For 1) Replace the modified object with the server version so that the user doesn't work with redacted data and maybe show a popup/notification
For 2) Show notification that the server version is lower than that of the local object. Offer to reduce it or do this automatically?

Last edited 5 years ago by skyper (previous) (diff)

comment:16 by GerdP, 5 years ago

Keywords: conflict added
Priority: majornormal

Any suggestions?

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to per4ik35@….
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.