Commit Graph

15 Commits

Author SHA1 Message Date
Bryan Housel
ca02cf4b96 Graph#revert accept id instead of entity ref
trivial test cases (revert across create/update/delete) all pass
2015-04-28 11:22:46 -04:00
Bryan Housel
587d1451be More tests for Graph#revert (reverting new things should remove them) 2015-04-27 12:02:59 -04:00
Bryan Housel
6b18066dd6 Graph#revert (see #537) 2015-04-26 01:07:48 -04:00
Bryan Housel
cb0e8ab66c Initial support for Multi Fetch GET
It will also be much faster to fetch the remote entities in batches
rather than one at a time through LoadEntity.

One bonus/hazard with Multi Fetch GET is that it will get deleted entities
with `visible=false`, rather than returning a HTTP Status Code 410 (Gone).

This will be the only way that we can really do proper undeletion
(Incrementing the current version by 1 is not guaranteed to work.  And
if a way is moved, fetching way/full will tell us whether the childnodes
are part of the way, but not necessarily whether they exist or not.)

We must be careful never to merge deleted entities into the real graph.
e.g, a deleted node will not have a 'loc' attribute, so code that assumes
every node must have a `loc` will be broken.

So because deleted entities are very special, the output from `loadMultiple`
should only be used for conflict resolution for now.
2015-03-03 20:54:09 -05:00
Bryan Housel
d9f204cf45 Remove Graph#freeze 2015-01-07 11:52:17 -05:00
Bryan Housel
d85da08cfe fix "inherits entities from base prototypally" test 2014-12-10 00:11:09 -05:00
Bryan Housel
1c3d198b96 add force option for rebase to overwrite existing entities
related: openstreetmap/iD#2467
2014-12-04 19:50:32 -05:00
John Firebaugh
4bf21cbc8a Restore deleted nodes that are discovered to have extant parents
This bug has existed since 1.0!

Fixes #2085
2014-01-06 16:23:15 -08:00
John Firebaugh
492fc88aa4 Make the Graph#rebase argument an array 2013-10-31 16:24:31 -07:00
John Firebaugh
14bfc52e33 Remove repetition of entity IDs in tests
There were several places where the key and entity id
didn't match up.
2013-10-31 15:57:47 -07:00
John Firebaugh
affdc987e4 Rename removeMember -> removeMembersWithID 2013-05-22 17:28:51 -07:00
John Firebaugh
293bb23876 Graph#rebase must invalidate transients 2013-05-18 09:20:57 -07:00
John Firebaugh
c50c3121d8 Make Graph#entity strict
Use Graph#hasEntity for the previous behavior.
2013-04-24 09:27:37 -07:00
John Firebaugh
5e66307500 Fix incorrect parentWays after reloading a split way
When recalculating parent ways/relations during rebase, a
graph should not add modified or deleted entities as parents.
Such entities will already be correctly marked as parents or
not.

Graph had the correct behavior for deleted entities, but not for
modified entities. This had the effect that if you split a way
that was partially off screen, and then panned so that the way was
re-retrieved, Graph#rebase would mistakenly add back the original
way as a parent of all the nodes that were split into the new
section, making them appear as shared.

Fixes #751.
2013-02-13 16:03:23 -08:00
John Firebaugh
843baa11c0 graph -> core
This matches how it's described in ARCHITECTURE.md.
2013-02-09 15:18:54 -08:00