Ticket #2510: property-conflict.patch

File property-conflict.patch, 1000 bytes (added by Gubaer, 17 years ago)
  • PropertyConflict.java

     
    2727
    2828    @Override public void apply(OsmPrimitive target, OsmPrimitive other) {
    2929        target.put(key, other.get(key));
    30         target.version = Math.max(target.version, other.version);
     30        // sync versions.  target.version = Math.max(target.version, other.version)
     31        // is not sufficient. Consider a conflict where the user decided to keep his
     32        // local data. the local primitive ('other' in  this case) should have the
     33        // higher version, too.
     34        //    target               other
     35        //       key=value1         key=value2
     36        //       version=21         version=20
     37        int newversion = Math.max(target.version, other.version);
     38        target.version = newversion;
     39        other.version = newversion;
    3140    }
    3241}
     42 No newline at end of file