Summary: When we add or remove something to a path, we need to ensure that all the directory nodes leading to that path entry have their checksums invalidated. This test verifies that behavior, and ensures that directory nodes that do *not* lead to the path entry are not invalidated.
Test Plan: pass unit test. found the bug in D3143825
Reviewers: lcharignon
Reviewed By: lcharignon
Subscribers: mitrandir, mjpieters, #sourcecontrol
Differential Revision: https://phabricator.fb.com/D3143832
Tasks: 10697482
Signature: t1:3143832:1460587147:1948e6c01a2799d5010174ff8be22830f0cb9c53
Summary: If the changes metadata structure is not updated, then we will not update the directory nodes as we walk up.
Test Plan: pass a unit test in a later diff.
Reviewers: lcharignon
Reviewed By: lcharignon
Subscribers: mitrandir, mjpieters, #sourcecontrol
Differential Revision: https://phabricator.fb.com/D3143825
Tasks: 10697482
Signature: t1:3143825:1459971608:9e5d91bf80020cf71cfc5aca6fb72c8cc67dce59
Summary: Not sure it's functional, but once it is, it's benchmark-able!
Test Plan: compiles and runs.
Reviewers: #sourcecontrol, rmcelroy
Reviewed By: rmcelroy
Subscribers: mitrandir, mjpieters
Differential Revision: https://phabricator.fb.com/D3141571
Signature: t1:3141571:1460071270:5bbb1d32bd97406d2cfd88955fabe29763132c7b
Summary: Incremented the wrong value. Caught this when running a unit test to update the checksum of an empty tree.
Test Plan: passes unit test now.
Reviewers: lcharignon
Reviewed By: lcharignon
Subscribers: mitrandir, mjpieters, #sourcecontrol
Differential Revision: https://phabricator.fb.com/D3140684
Tasks: 10697482
Signature: t1:3140684:1459903366:be1b970281e0df91b2a62e7fac2c1d417a8be221
Summary: Since I'm adding a .c file, TEST_HEADER_FILES is not really an accurate description.
Test Plan: pass unit tests.
Reviewers: #sourcecontrol, rmcelroy
Reviewed By: rmcelroy
Subscribers: mitrandir, mjpieters
Differential Revision: https://phabricator.fb.com/D3140374
Signature: t1:3140374:1460071293:77e11a27249196564f2ee816cc50e67951325a75
Summary: I need this to be able to access directory nodes for checksum testing.
Test Plan: passed unit tests
Reviewers: lcharignon
Reviewed By: lcharignon
Subscribers: mitrandir, mjpieters, #sourcecontrol
Differential Revision: https://phabricator.fb.com/D3140368
Tasks: 10697482
Signature: t1:3140368:1460584956:671cd08ca174795445a297ef75bee53d9f09a8ad
Summary: I'm planning on building a find_path traversal that exposes directories, and make it available for tests.
Test Plan: pass unit tests.
Reviewers: #sourcecontrol, rmcelroy
Reviewed By: rmcelroy
Subscribers: rmcelroy, mitrandir, mjpieters
Differential Revision: https://phabricator.fb.com/D3138945
Signature: t1:3138945:1460071138:3eb43a1742c8b0d856f0b97421eb499d9e328310
Summary: It's also in tree.c. Right now, it's a static function, but I'm planning on make it non-static.
Test Plan: pass unit tests
Reviewers: #sourcecontrol, rmcelroy
Reviewed By: rmcelroy
Subscribers: mitrandir, mjpieters
Differential Revision: https://phabricator.fb.com/D3138923
Signature: t1:3138923:1460071054:9105ffcbff2b4330faf22652755dc28d8313c5e2
Summary: As far as the consumers of this library are concerned, directories are a non-entity.
Test Plan: wrote a unit test. unit test fails. made the change in `test.c`, all unit tests pass.
Reviewers: lcharignon
Reviewed By: lcharignon
Subscribers: mitrandir, mjpieters, #sourcecontrol
Differential Revision: https://phabricator.fb.com/D3135694
Signature: t1:3135694:1459809348:5b120e527427032857aa976278cca2ef8d3f1372
Summary: Callers of `get_path` do not need to know the internal representation of a node. All they are interested in is the presence, the checksum, and the flags.
Test Plan: passed unit tests
Reviewers: lcharignon
Reviewed By: lcharignon
Subscribers: mitrandir, mjpieters, #sourcecontrol
Differential Revision: https://phabricator.fb.com/D3135625
Signature: t1:3135625:1459809298:4bd982091219fa94a1cfcc18238784c9c6e201b8
Summary: Support for removing a path from the tree. Prunes directory nodes so we don't leave empty ones around.
Test Plan: pass unit tests.
Reviewers: #sourcecontrol, rmcelroy
Reviewed By: rmcelroy
Subscribers: rmcelroy, lcharignon, mitrandir, mjpieters
Differential Revision: https://phabricator.fb.com/D3130263
Tasks: 10589043
Signature: t1:3130263:1460140241:8d3f1824990270d693265fa8389dd5a4893c4552
Summary: 0 is actually a legit index, so if someone checks that instead of the node pointer, then we might find the wrong thing.
Test Plan: pass unit tests.
Reviewers: #sourcecontrol, mitrandir
Reviewed By: mitrandir
Subscribers: mitrandir, mjpieters
Differential Revision: https://phabricator.fb.com/D3130262
Signature: t1:3130262:1459557188:661eae1363bf603a77e1d17960db0a5f8f33834b
Summary: Move the real work to `alloc_tree_helper()`. This allows us to have the jump to cleanup without the goto.
Test Plan: pass unit tests.
Reviewers: #sourcecontrol, lcharignon
Reviewed By: lcharignon
Subscribers: lcharignon, mitrandir, mjpieters
Differential Revision: https://phabricator.fb.com/D3128539
Tasks: 10670537
Signature: t1:3128539:1459962010:d58e7ea89802416128dd312e76d619de6d29dc42
Summary: On remove_path, we need to remove the implicit nodes that are empty after we remove the leaf node. Actually typing the nodes differently makes this easier.
Test Plan: pass unit tests.
Reviewers: #sourcecontrol, lcharignon
Reviewed By: lcharignon
Subscribers: mitrandir, mjpieters
Differential Revision: https://phabricator.fb.com/D3128497
Signature: t1:3128497:1459811588:d3132edc7044061263457c7d0b5ee072b67204c9
Summary:
Still missing:
== Code and tests: ==
* remove path
* contains path (but this is essentially the same as get path)
* read/write from file
== Tests: ==
* checksumming directories
Test Plan: well, it kind of builds.
Reviewers: durham, simpkins, lcharignon
Reviewed By: lcharignon
Subscribers: net-systems-diffs@, mitrandir, mjpieters, akushner, rmcelroy
Differential Revision: https://phabricator.fb.com/D3120166
Signature: t1:3120166:1459464981:60f19dd1e36d62776a69fa88c018122a4be27d87