All the way back since r1, the documentation of pool usage for svn_fs_revision_root, svn_fs_txn_root, and svn_fs_close_root has been incorrect: they claim that roots are allocated in the pool given to the constructor and that svn_fs_close_root is equivalent to destroying that pool, but in fact the root is allocated in a private subpool. The reporter relies on this behavior (because it passes the same pool to multiple calls to svn_fs_revision_root and closes them independently with svn_fs_close_root).
- Fixes the documentation of these functions.
- Moves the subpool creation from the individual backends to the FS loader.
- Fixes a leak in BDB: the node cache is allocated in the enclosing pool, not the root-specific pool, so during (eg) a reporter run, the caches are not released until the end of the entire report rather than when their root is destroyed.
* subversion/include/svn_fs.h (svn_fs_revision_root, svn_fs_txn_root): Document how to destroy the root. (svn_fs_close_root): Document when to use this function, without lies.
* subversion/libsvn_fs/fs-loader.c (svn_fs_revision_root, svn_fs_txn_root): Create subpool and pass it to vtable call.
* subversion/libsvn_fs_base/tree.c, subversion/libsvn_fs_fs/tree.c (make_root): Just use the pool passed in for everything.
* subversion/libsvn_fs/fs-loader.h (svn_fs_root_t): Document that pool is root-specific.