[[TranslatedPages(revision=0)]] = Конфлікт = [[TOC(inline, heading=Зміст)]] JOSM керує локальними копіями [wiki:Uk:Help/Concepts/Object OSM об’єктів]. Josm [wiki:Uk:Help/Action/Open завантажує їх з файлу] чи [wiki:Uk:Help/Action/Download сервера OSM] та зберігає їх у пам’яті. Якщо ви змінюєте об’єкти або додаєте їх на вашу мапу, ви працюєте тільки з копіями об’єктів. Початкові об’єкти лишаються на сервері, звідки їх можуть завантажити інші учасники, а також на сервер можуть бути завантажені зміни інших маперів. Це означає, що ви ''не володієте'' об’єктами з якими зараз працюєте монопольно, ви робите це ''разом'' з іншими користувачами. Коли ви обмінюєтесь даними з сервером, ваша версія об’єктів може зіткнутись із чиєюсь версією, що була відіслана на сервер як оновлення. JOSM робить все можливе, щоб приховати ці колізії від вас, але іноді він не в змозі розв’язати відмінності між двома [wiki:Uk:Help/Concepts/Object версіями] автоматично. В цьому разі він створить '''конфлікт'''. '''Конфлікт''' — це різниця між двома версіями об’єкта, які JOSM не розв’язав автоматично. Кожен шар даних підтримує перелік нерозв’язаних конфліктів у [wiki:Uk:Help/Dialog/ConflictList діалозі переліку конфліктів]. З цього діалогу ви можете запускати [wiki:Uk:Help/Dialog/Conflict діалог для розв’язання конфліктів]. '''Розв’язання конфліктів''' означає, що вам потрібно вибрати між двома версіями об’єкта для кожної відмінності, яку з них ви бажаєте лишити, першу чи другу, іноді цей процес може називатись '''злиття'''. == Конфлікти під час завантаження/оновлення == #WarningAboutDetectedConflicts Коли ви завантажуєте об’єкти з сервера OSM у існуючий шар даних, об’єкти з сервера можуть "стикатись" з об’єктами, що вже є в цьому шарі. Часто, JOSM обробляє ці колізії автоматично, але іноді це неможливо. Наприклад: 1. Ви завантажили точку з id 1 з сервера, яка має значення теґу [http://wiki.openstreetmap.org/wiki/Uk:Key:name name] — `"My name"`. 2. Ви редагуєте цю точку змінюючи теґ name на `"Or is it this name?"`. У той самий час інший користувач теж завантажив точку, із мінив name на `"That's the name"`, та відіслав зміни на сервер. 3. Ви обираєте пункт меню [[Image(wiki:Help/Action/UpdateData:updatedata.png)]]''Файл->[wiki:Uk:Help/Action/UpdateData Оновити дані]''. Версія точки, отримана від сервера буде мати теґ [http://wiki.openstreetmap.org/wiki/Uk:Key:name name] із значенням `"That's the name"`, що конфліктує з вашим `"Or is it this name?"`. JOSM не може розв’язати таку ситуацію автоматично. Він створить '''конфлікт'''. Звичайно JOSM показує наступне повідомлення про помилки: [[Image(Help/Concepts/Conflict:conflict-update-data.png)]] == Conflict when uploading == If you upload objects to the OSM server, they might "collide" there with updates provided by other mappers. Sometimes, JOSM can handle these collisions automatically. If, for instance, you try to delete an already deleted object, JOSM will silently skip deleting and won't bother you with an error message. In most cases, though, JOSM can't deal with them automatically. Here's an example: 1. You've downloaded a node with id 1 from the server whose [http://wiki.openstreetmap.org/wiki/Key:name name] tag is set to `"My name"`. 2. Another mapper downloads the node with id 1 too, assigns it the name `"That's the name"`, and uploads it. 3. You change the name to `"Or is it this name?"` and upload to the server. 4. On the server, your upload collides with the upload from the other mapper. JOSM can't resolve this automatically. It creates a '''conflict'''. Typically JOSM displays an error message as follows: [[Image(conflict-upload-data.png)]] == Conflicts when merging == In JOSM you can merge the objects in one data layer into another data layer. Again, this can lead to "collisions" between different versions of the same objects. If JOSM can't resolve them automatically it creates '''conflicts''' too. == Resolving conflicts == Each data layer maintains a list of '''conflicts''' which are not resolved yet. You can consult this list in the [wiki:/Help/Dialog/ConflictList Conflict List Dialog]. For each '''conflict''' listed there you can (and should) launch the [wiki:/Help/Dialog/Conflict Conflict Resolution Dialog] and resolve it. Resolving conflicts is important. For instance, you can't upload your updates to the OSM server unless the list of unresolved conflicts is empty. == Technical background == For each change set that affects an object, the server assigns an increasing version number to that object. (This is shown in the history e.g. [http://api.openstreetmap.org/browse/way/1222/history way 1222].) JOSM remembers the version of the downloaded objects and reports it back to the server on upload. If the server has a higher version number (due to a change by another mapper), it rejects the uploaded change. In this situation JOSM creates a conflict. The version that is called "my" in conflict resolution dialog is the old, downloaded version, but with your local modifications applied. The version that is called "their" is the most current version on the server that is then automatically downloaded from the server. == See also == * [wiki:/Help/Dialog/ConflictList Conflict List Dialog] - displays the list of conflicts in the current data layer * [wiki:/Help/Dialog/Conflict Conflict Dialog] - you can use the conflict dialog to resolve a conflict ---- Back to [wiki:Help Main Help]