Changeset 2070 in josm for trunk/src/org/openstreetmap/josm/data/osm/visitor/MergeVisitor.java
- Timestamp:
- 2009-09-06T23:07:33+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/MergeVisitor.java
r2025 r2070 236 236 if (myPrimitivesWithDefinedIds.containsKey(other.getId())) { 237 237 P my = myPrimitivesWithDefinedIds.get(other.getId()); 238 if (my. version <= other.version) {238 if (my.getVersion() <= other.getVersion()) { 239 239 if (! my.isVisible() && other.isVisible()) { 240 240 // should not happen … … 243 243 + "their primitive with lower version {2} is not visible. " 244 244 + "Can't deal with this inconsistency. Keeping my primitive. ", 245 Long.toString(my.getId()),Long.toString(my. version), Long.toString(other.version)245 Long.toString(my.getId()),Long.toString(my.getVersion()), Long.toString(other.getVersion()) 246 246 )); 247 247 merged.put(other, my); … … 270 270 // 271 271 merged.put(other, my); 272 } else if (my.isDeleted() && ! other.isDeleted() && my. version == other.version) {272 } else if (my.isDeleted() && ! other.isDeleted() && my.getVersion() == other.getVersion()) { 273 273 // same version, but my is deleted. Assume mine takes precedence 274 274 // otherwise too many conflicts when refreshing from the server … … 288 288 my.cloneFrom(other); 289 289 merged.put(other, my); 290 } else if (! my.isModified() && !other.isModified() && my. version == other.version) {290 } else if (! my.isModified() && !other.isModified() && my.getVersion() == other.getVersion()) { 291 291 // both not modified. Keep mine 292 292 // 293 293 merged.put(other,my); 294 } else if (! my.isModified() && !other.isModified() && my. version < other.version) {294 } else if (! my.isModified() && !other.isModified() && my.getVersion() < other.getVersion()) { 295 295 // my not modified but other is newer. clone other onto mine. 296 296 // 297 297 my.cloneFrom(other); 298 298 merged.put(other,my); 299 } else if (my.isModified() && ! other.isModified() && my. version == other.version) {299 } else if (my.isModified() && ! other.isModified() && my.getVersion() == other.getVersion()) { 300 300 // my is same as other but mine is modified 301 301 // => keep mine
Note:
See TracChangeset
for help on using the changeset viewer.