Changeset 1694 in josm
- Timestamp:
- 2009-06-24T22:07:18+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/MergeVisitor.java
r1692 r1694 6 6 import java.util.Collection; 7 7 import java.util.HashMap; 8 import java.util.Iterator;9 8 import java.util.LinkedList; 10 9 import java.util.Map; … … 103 102 return; 104 103 } else { 105 // try to merge onto a primitive withwhich has no id assigned104 // try to merge onto a primitive which has no id assigned 106 105 // yet but which is equal in its semantic attributes 107 106 // … … 235 234 // 236 235 conflicts.put(my,other); 236 } else if (my.incomplete) { 237 // my is incomplete, other completes it 238 // => merge other onto my 239 // 240 my.incomplete = false; 241 my.cloneFrom(other); 242 merged.put(other, my); 243 } else if (my.deleted != other.deleted) { 244 // differences in deleted state have to be resolved manually 245 // 246 conflicts.put(my,other); 237 247 } else if (! my.modified && other.modified) { 238 248 // my not modified. We can assume that other is the most recent version. … … 245 255 my.cloneFrom(other); 246 256 merged.put(other, my); 247 } else if (! my.modified && !other.modified ) {257 } else if (! my.modified && !other.modified && my.version == other.version) { 248 258 // both not modified. Keep mine 249 259 // 260 merged.put(other,my); 261 } else if (! my.modified && !other.modified && my.version < other.version) { 262 // my not modified but other is newer. clone other onto mine. 263 // 264 my.cloneFrom(other); 250 265 merged.put(other,my); 251 266 } else if (my.modified && ! other.modified && my.version == other.version) { … … 253 268 // => keep mine 254 269 merged.put(other, my); 255 } else if (my.deleted != other.deleted) {256 // if we get here my is modified. Differences in deleted state257 // have to be resolved manually258 //259 conflicts.put(my,other);260 270 } else if (! my.hasEqualSemanticAttributes(other)) { 261 271 // my is modified and is not semantically equal with other. Can't automatically
Note:
See TracChangeset
for help on using the changeset viewer.