This patch adds a committed-path to the node revision table as opposed
to inserting rows in the changes table for automatic bubbling of
directories/branch points.
Reminder of other API changes:
* svn_fs_node_created_rev: Instead of returning the initial revision of
the NodeRevision, it returns the "Initial Revision that this
NodeRevision was available on this path".
* svn_fs_dirent_t: Add created_rev member.
* svn_fs_dir_entries: Sets created_rev member of dirent based on what
svn_fs_node_created_rev would return for the directory entry.
* svn_fs_revisions_changed: Exits immediately if copy history following
is disabled. This case returns a hash that has no elements added to it.
Additionally, I've added some new test cases to verify that this new
behavior works as expected.
Food for additional thought after this patch gets applied would be to
think about if it makes sense to expand the svn_fs_revisions_changed
interface to include items in the revision history that gives more
detail about the copy history. (i.e. copy source path and revision copy
was made)
Here's the rather long change log:
* include/svn_fs.h
(svn_fs_dirent_t) Add created_rev that sees through lazy copies and
is set to the first revision that a lazily copied node revision
appeared on the requested path.
* libsvn_fs/tree.c
(parent_path_t): Add members last_branch_id, in_lazy_land, and
last_path.
(make_parent_path): Add new parameters for new parent_path_t
members.
(get_id_path): Move earlier in the file, so that more functions can
call it. Also use new svn_fs__dag_get_committed_path instead of
processing rows in the changes table.
(is_child_lazily_copied): New function see through the laziness
of the tree.
(open_path): Keep track of last_branch_id so that it can be used in
parent_paths.
(choose_copy_id): Replace usage of svn_fs_compare_ids with a check
that is more restrictive then svn_fs_check_related. Also
levarage parent_path_t information to simplify the logic a bit.
(make_path_mutable): Ensure bubble up changes make it into the
changes table by calling add_change. Also pass the correct
committing path into svn_fs__dag_clone_child.
(txn_body_node_created_rev): Make use of information stored in
open_path's parent_path to return the correct created revision.
(txn_body_node_proplist): Skip lazy path detection for this call to
open_path.
(txn_body_change_node_prop): Have open_path perform lazy_path
detection.
(txn_body_props_changed): Skip the lazy detection for open_path.
(txn_body_merge): Formatting tweak.
(txn_body_dir_entries): Fixup the DAG directory entries with the
correct created revision.
(txn_body_make_dir): Ensure lazy path processing for open_path.
(txn_body_delete): Ensure lazy path processing for open_path.
(txn_body_copy): Ensure lazy path processing for open_path.
Additionally, pass the destination of the copy into
svn_fs__dag_copy.
(txn_body_copied_from): Skip laziness calculation in open_path.
(txn_body_make_file): Ensure lazy path processing for open_path.
Additionally, pass the path of the file into
svn_fs__dag_make_file.
(txn_body_contents_changed): Skip laziness calculation in open_path.
(revision_changed_args): Remove id and fs, and replace it with
path and root so txn_body_revisions_changed can call open_path.
(txn_body_revisions_changed): Make use of information from open_path
to correctly stop immediately if cross_copy_history is false
and the path in question only exists because of a copy.
(svn_fs_revisions_changed): Update with respect to
revision_changed_args changes.
* libsvn_fs/dag.h:
(svn_fs__dag_get_committed_path): New function.
(svn_fs__dag_clone_child): Added commit path of the cloned child.
(svn_fs__dag_make_dir): Added commit path of the created directory.
(svn_fs__dag_make_file): Added commit path of the created file.
(svn_fs__dag_copy): Added commit path of the copy destination.
* libsvn_fs/fs.h:
(svn_fs__node_revision_t): Add committed_path member.
* libsvn_fs/structure:
Added COMMIT-PATH to the node revision table.
* libsvn_fs/dag.c:
(copy_node_revision): Add committted_path parameter.
(svn_fs__dag_get_committed_path): New function that returns the
committed path for a given dag node.
(txn_body_dag_init_fs): Add a committed path value for the initial
root directory.
(set_entry): pass NULL into copy_node_revision.
(make_entry): Add commit path parameter and use it to set the new
noderevision commit path.
(svn_fs__dag_clone_child): Add commit path parameter and use it
to set the new noderevision commit path.
(delete_entry): Pass NULL into copy_node_revision.
(svn_fs__dag_make_file): Add commit path parameter and use it
to set the new noderevision commit path.
(svn_fs__dag_make_dir): Add commit path parameter and use it
to set the new noderevision commit path.
(svn_fs__dag_copy): Add commit path parameter and use it
to set the new noderevision commit path.
* libsvn_fs/util/fs_skels.c:
(is_valid_noderevision_skel): Adjust for the addition of COMMIT-PATH
to the node revision skel.
(svn_fs__parse_node_revision_skel): Add support for COMMIT-PATH.
(svn_fs__unparse_node_revision_skel): Add support for COMMIT-PATH.
* tests/libsvn_fs/fs-test.c:
(branch_test): Add validation code.
(lazy_copies_created_rev): New test case for svn_fs_node_created_rev
that tests the new ability of created_rev to differ based on
copies.
(lazy_copies_dir_entries): New test case for svn_fs_dir_entries
that tests the new ability of created_rev to differ based on
copies.
(lazy_copies_rev_changed): New test case for new !cross_copy_history
behavior in svn_fs_revisions_changed.
(test_funcs): Add new test cases: lazy_copies_created_rev,
lazy_copies_dir_entries, lazy_copies_rev_changed.
Bill
----
Do you want a dangerous fugitive staying in your flat?
No.
Well, don't upset him and he'll be a nice fugitive staying in your flat.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Dec 18 09:02:02 2002