Changeset 2933 in josm
- Timestamp:
- 2010-02-04T05:09:34+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java
r2845 r2933 218 218 Node targetNode = (Node)getMergeTarget(sourceNode); 219 219 if (targetNode != null) { 220 if ( !targetNode.isDeleted() &&targetNode.isVisible()) {220 if (targetNode.isVisible()) { 221 221 newNodes.add(targetNode); 222 222 } else { … … 245 245 if (targetMember == null) 246 246 throw new IllegalStateException(tr("Missing merge target of type {0} with id {1}", sourceMember.getType(), sourceMember.getUniqueId())); 247 if ( ! targetMember.isDeleted() &&targetMember.isVisible()) {247 if (targetMember.isVisible()) { 248 248 RelationMember newMember = new RelationMember(sourceMember.getRole(), targetMember); 249 249 newMembers.add(newMember); … … 275 275 if (! target.isVisible() && source.isVisible()) { 276 276 // should not happen 277 // 277 // FIXME: this message does not make sense, source version can not be lower than 278 // target version at this point 278 279 logger.warning(tr("Target object with id {0} and version {1} is visible although " 279 280 + "source object with lower version {2} is not visible. " … … 305 306 // same version, but target is deleted. Assume target takes precedence 306 307 // otherwise too many conflicts when refreshing from the server 308 // but, if source has referrers there is a conflict 309 if (!source.getReferrers().isEmpty()) { 310 conflicts.add(target, source); 311 } 307 312 } else if (target.isDeleted() != source.isDeleted()) { 308 313 // differences in deleted state have to be resolved manually. This can … … 313 318 // target not modified. We can assume that source is the most recent version. 314 319 // clone it into target. But check first, whether source is deleted. if so, 315 // make sure that target is not referenced any more in myDataSet. 316 // 320 // make sure that target is not referenced any more in myDataSet. If it is there 321 // is a conflict 317 322 if (source.isDeleted()) { 318 deletedObjectsToUnlink.add(source); 319 } 320 target.mergeFrom(source); 321 objectsWithChildrenToMerge.add(source.getPrimitiveId()); 323 if (!target.getReferrers().isEmpty()) { 324 conflicts.add(target, source); 325 } 326 } else { 327 target.mergeFrom(source); 328 objectsWithChildrenToMerge.add(source.getPrimitiveId()); 329 } 322 330 } else if (! target.isModified() && !source.isModified() && target.getVersion() == source.getVersion()) { 323 331 // both not modified. Merge nevertheless.
Note:
See TracChangeset
for help on using the changeset viewer.