Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed empty edits to be visible.

  • Loading branch information...
commit 826d8e5db40a8c96b2d2538ab4006b8b93f5f91f 1 parent 0f29d2b
@zerebubuth authored
Showing with 3 additions and 3 deletions.
  1. +2 −2 change_bot.rb
  2. +1 −1  test_node.rb
View
4 change_bot.rb
@@ -63,7 +63,7 @@ def actions
else
:unclean
end
-
+
# if this is not a clean version, then the only part
# of the patch we can apply is the deletions, by the
# 'deletions are always OK' rule.
@@ -109,7 +109,7 @@ def actions
#not (geom_patch.only_deletes? and tags_patch.only_deletes?))
visibility = ((status == :unclean) ?
tags_patch.only_deletes? && geom_patch.only_deletes? :
- new_tags != base_obj.tags || new_geom != base_obj.geom || status == :acceptor_edit)
+ new_tags != base_obj.tags || new_geom != base_obj.geom || status == :acceptor_edit || status == :empty)
xactions << Redact[obj.class, obj.element_id, obj.version, visibility ? :visible : :hidden]
end
View
2  test_node.rb
@@ -56,7 +56,7 @@ def test_simple_node_unclean_multiple_edit
actions = bot.action_for(history)
assert_equal([Delete[OSM::Node, 1],
Redact[OSM::Node, 1, 1, :hidden],
- Redact[OSM::Node, 1, 2, :hidden]
+ Redact[OSM::Node, 1, 2, :visible] # <- trivial edit, so visible.
], actions)
end
Please sign in to comment.
Something went wrong with that request. Please try again.