Checkout
 

rassilon in subversion

Ok folks, this is the big URL stability/rename patch. This supports

tracking moves in the changes table, fixes issue #1003, and handling

the annoying rename cases.

Additional follow on patches for other folks to contemplate:

* Add support for getting rename information out of the changes table

with appropriate test cases.

* Implement TODOs in tree.c's directory merge routine to detect rename

conflicts, as well as test cases for them.

* Don't pass the path in txn_body_delete's add_change call when

!parent_path->in_lazy_land.

* Leverage open_path's new common path prefix support in other APIs that

make use of two open_path calls.

The reason for picking the various schema changes this patch does are

handling #1003, being able to easily discover moves during the log

generation process of files/directories that aren't at the top of the

actual move operation, and not increasing the cost of the open_path

operation.

This set of bits passes fs-test, and changes-test.

* include/svn_fs.h (svn_fs_change_kind_t): Added svn_fs_change_moved.

* libsvn_fs/tree.c (parent_path_t): Added inherit member.

(make_parent_path): Add inherit parameter.

(get_id_path): Remove path concicalization.

(compute_parent_path_info): Renamed from is_child_lazy_copied. Also

merged in choose_copy_id logic into this function.

(open_path): Support passing in common constructor parent_paths via parent_path_p.

This is required for any two path modifying function, and a possible

perf win for other multi-path operations since this allows you to

cache the open_path lazy/copyid computations. Another one of the

fallout consequences is that the paths used in open path aren't canocalized.

(choose_copy_id): Merged into compute_parent_path_info.

(make_path_mutable): No longer call choose_copy_id.

(add_change): Added path parameter.

(txn_body_created_rev, txn_body_proplist, txn_body_props_changed,

txn_body_contents_changed, txn_body_revisions_changed):

Initalize parent_path to NULL.

(txn_body_change_node_prop, txn_body_make_dir, txn_body_make_file,

txn_body_apply_textdelta, txn_body_apply_text): Initalize

parent_path to NULL, and fixup add_change call.

(undelete_change): Fixup add_change call.

(txn_body_dir_entries): Initialize parent_path to NULL, dump path

canocalization, and call compute_parent_path_info.

(txn_body_delete): Fixup svn_fs__dag_delete_tree call.

(txn_body_rename): New function.

(svn_fs_rename): Implement using txn_body_rename.

(txn_body_copy): Initialize parent_path to NULL, fixup svn_fs__dag_copy call, and

fixup add_change call.

* libsvn_fs/dag.h (svn_fs__dag_delete_tree): Added delete_mutables

parameter. Rename doesn't want the mutables deleted thank you.

(svn_fs__dag_copy): Added output param for created to_id. Added

kind, and from_txn_id parameters. The from_txn_id parameter is to

reduce unecessary db reads.

* libsvn_fs/bdb/copies-table.h (svn_fs__bdb_create_copy): Add kind parameter.

* libsvn_fs/bdb/copies-table.c (svn_fs__bdb_create_copy): Add and use

new kind parameter.

* libsvn_fs/bdb/changes-table.c (svn_fs__bdb_changes_fetch): If the

PATH isn't in the row then get the PATH from ID.COMMIT-PATH.

* libsvn_fs/fs.h (svn_fs__copy_kind_t): New enumeration to distinguish

between copies and moves. Eventually, it's likely that a merge-add

copy_kind will be added.

(svn_fs__change_t): Added kind and path memebers.

* libsvn_fs/structure: Update Changes and Copy table descriptions.

* libsvn_fs/dag.c (txn_body_dag_init_fs): Fixup svn_fs__bdb_create_copy call.

(delete_entry): Add delete_mutables parameter.

(svn_fs__dag_delete_tree): Add delete_mutables parameter.

(svn_fs__dag_delete): Fixup delete_entry call.

(svn_fs__dag_copy): Add new parameters.

* libsvn_fs/util/fs_skels.c (is_valid_copy_skel, is_valid_change_skel,

svn_fs__parse_copy_skel, svn_fs__parse_change_skel,

svn_fs__unparse_change_skel,

svn_fs__unparse_copy_skel): Deal with new table columns.

* tests/libsvn_fs/changes-test.c (add_standard_changes,

add_standard_fs_changes): Set change.path to NULL.

* tests/libsvn_fs/fs-test.c (rename_test): Add and extend Philip's rename tests.

(branch_test): Add comments to help other people to understand

what's supposed to happen.

    • -218
    • +349
    /branches/issue-1003-dev/subversion/libsvn_fs/tree.c
Philip noticed I missed reading this diff to the 1003 branch.
Re-patch in the changes that were on the 1003 branch
    • -95
    • +366
    /branches/issue-1003-dev/subversion/libsvn_fs/tree.c
Recreate the 1003 branch.
    • ?
    /branches/issue-1003-dev/subversion/libsvn_subr/config.c
    • binary
    /branches/issue-1003-dev/doc/book/book/images/ch02dia5.png
    • ?
    /branches/issue-1003-dev/www/project_status.html
  1. … 991 more files in changeset.
Removing hosed branch.
  1. /branches/issue-1003-dev/subversion/libsvn_fs
  2. /branches/issue-1003-dev/subversion/include
  3. /branches/issue-1003-dev/subversion/tests
  4. … 971 more files in changeset.
For issue #1003: This completes the fix for #1003 by completing the test

code changes, and schema changes discussed for this fix. i.e. Adding a

committed-path to the NodeRevision table, and removing the path column

from the Changes table.

* subversion/libsvn_fs/structure (Change table): Remove PATH as a column

of the changes table.

* subversion/libsvn_fs/bdb/changes-table.c (dag.h): Add include.

(fold_change): Add change_path parameter.

(svn_fs__bdb_changes_fetch): Call svn_fs__dag_get_committed_path

in order to pass the change_path into fold_change.

* subversion/libsvn_fs/util/fs_skels.c (is_valid_copy_skel,

svn_fs__parse_change_skel): Adjust the skel parsing for the schema

change.

* subversion/libsvn_fs/fs.h:

(svn_fs__change_t): Remove the path member since this is no longer

needed given the new svn_fs__dag_get_committed_path API.

* subversion/libsvn_fs/tree.c:

(add_change): Remove path parameter.

(txn_body_change_node_prop, undelete_change, txn_body_make_dir,

txn_body_delete, txn_body_copy, txn_body_make_file,

txn_body_apply_textdelta, txn_body_apply_text): Fixup add_change

callsites.

(txn_body_node_created_rev, txn_body_dir_entries): Fixup

formatting.

* subversion/tests/libsvn_fs/fs-test.c (branch_test,

lazy_copies_created_rev): Adjust svn_create_error callsites due to

changes on trunk.

* subversion/tests/libsvn_fs/changes-test.c (SET_STR): Borrow the SET_STR

macro from fs-test.c.

(standard_txns, standard_changes, get_ideal_changes): Renumber the

transactions starting at 1 to reflect behavior with normal FS

API calls instead of via direct table manipulation.

(add_standard_changes): Remove setting change.path.

(add_standard_fs_changes): New version of add_standard_changes

that uses FS API function calls as opposed to direct table

manipulation.

(changes_fetch_raw): Remove PATH verification test.

(changes_fetch): Modify test case to use new FS APIs that test the

new schema change by calling add_standard_fs_changes.

Merge the 4325:4389 changes from the trunk into the issue-1003-dev

branch.

    • -0
    • +0
    /branches/issue-1003-dev/www/project_tasks.html
    • -0
    • +0
    /branches/issue-1003-dev/doc/book/outline.txt
    • -0
    • +0
    /branches/issue-1003-dev/notes/difftools/README
  1. … 718 more files in changeset.
* subversion/libsvn_subr/libsvn_subr.dsp: Rollback the change from

4369 that slipped into the propset commit and link to shfolder.lib

instead of shell32.lib.

* Just about everything else that wasn't test output, a binary file,

or already to set to CRLF: Set svn:eol-style to native.

    • -0
    • +0
    /trunk/notes/old/draft-korn-vcdiff-01.txt
    • -0
    • +0
    /trunk/subversion/bindings/java/jni/revision.h
  1. … 644 more files in changeset.
* *.dsp: Set property svn:eol-style to CRLF.

* subversion.dsw: Set property svn:eol-style to CRLF.

* subversion/bindings/com/SVN.rgs: Set property svn:eol-style to CRLF.

* subversion/bindings/com/SVNCOM.idl: Set property svn:eol-style to CRLF.

* subversion/bindings/com/SVNCOM.rc: Set property svn:eol-style to CRLF.

* subversion/bindings/com/SVNStatus.rgs: Set property svn:eol-style to CRLF.

* subversion/bindings/com/SVNCOM.def: Set property svn:eol-style to CRLF.

* subversion/bindings/com/SVNCOMps.def: Set property svn:eol-style to CRLF.

* subversion/bindings/com/SVNCOMps.mk: Set property svn:eol-style to CRLF.

* subversion/bindings/com/resource.h: Set property svn:eol-style to CRLF.

    • -0
    • +0
    /trunk/subversion/svnserve/svnserve.dsp
    • -0
    • +520
    /trunk/subversion/libsvn_fs/libsvn_fs.dsp
    • -0
    • +0
    /trunk/subversion/bindings/com/resource.h
    • -0
    • +0
    /trunk/subversion/bindings/com/SVN.rgs
    • -0
    • +94
    /trunk/subversion/libsvn_ra/libsvn_ra.dsp
  1. … 30 more files in changeset.
Merges the 4323:4325 changes from trunk into the issue-1003-dev

branch.

  1. … 7 more files in changeset.
Merges the 4156:4322 changes from trunk into the issue-1003-dev

branch.

    • -7
    • +7
    /branches/issue-1003-dev/subversion/libsvn_wc/copy.c
    • -0
    • +60
    /branches/issue-1003-dev/notes/repeated-merging
    • -1
    • +1
    /branches/issue-1003-dev/subversion/bindings/com/SVN.h
  1. … 484 more files in changeset.
* subversion/libsvn_ra_dav/props.c:

(svn_ra_dav__get_props) Use error helper function to ensure

that the HTTP reason string gets included in the error context.

* subversion/libsvn_ra_dav/util.c:

(svn_ra_dav__parsed_request, svn_ra_dav__request_dispatch) Adjust

the code knowing that Neon can return NE_OK while still having

a failure status code. e.g.: Proxy error status codes.

    • -5
    • +3
    /trunk/subversion/libsvn_ra_dav/props.c
    • -26
    • +11
    /trunk/subversion/libsvn_ra_dav/util.c
Fixes issue #1003:

* 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_flags_t): Add open_path_skip_lazy_detection enum member.

(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 to_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.

    • -9
    • +33
    /branches/issue-1003-dev/subversion/libsvn_fs/dag.c
    • -84
    • +355
    /branches/issue-1003-dev/subversion/libsvn_fs/tree.c
    • -5
    • +17
    /branches/issue-1003-dev/subversion/libsvn_fs/dag.h
    • -5
    • +7
    /branches/issue-1003-dev/subversion/libsvn_fs/structure
    • -0
    • +4
    /branches/issue-1003-dev/subversion/include/svn_fs.h
    • -0
    • +3
    /branches/issue-1003-dev/subversion/libsvn_fs/fs.h
    • -6
    • +547
    /branches/issue-1003-dev/subversion/tests/libsvn_fs/fs-test.c
URL Stability branch creation approved by cmpilato
    • ?
    /branches/issue-1003-dev/subversion/libsvn_subr/config.c
    • binary
    /branches/issue-1003-dev/doc/book/book/images/ch02dia5.png
    • ?
    /branches/issue-1003-dev/www/project_status.html
  1. … 941 more files in changeset.
* subversion.dsw: (tests_libsvn_fs_fs): Add dependancy to libsvn_repos.

* libsvn_delta/libsvn_delta.dsp: Add pipe_editors.c.

* libsvn_wc/libsvn_wc.dsp: Add diff.c.

* libsvn_repos/libsvn_repos.dsp: Add repos.c.

* libsvn_ra_local/libsvn_ra_local.dsp: Add update_editor.c.

    • binary
    /trunk/subversion/libsvn_wc/libsvn_wc.dsp
* libsvn_ra_dav/commit.c: (commit_resource) Add cast to (void *) to make MSVC happy.

* libsvn_ra_dav/session.c: Include apr_general.h to pick up strcasecmp prototype.

    • -1
    • +5
    /trunk/subversion/libsvn_ra_dav/commit.c
    • -0
    • +1
    /trunk/subversion/libsvn_ra_dav/session.c
* subversion/libsvn_repos/libsvn_repos.dsp: Add lock.c as another source file to bulid. This fixes the svn_repos_open symbol problem.

* subversion/libsvn_subr/libsvn_subr.dsp: Remove keysort.c. Add sorts.c.

* subversion/libsvn_fs/fs.c: (svn_fs_delete_berkeley) Use APR_STATUS_IS_ENOENT instead of APR_ENOENT.

All projects build on Win32, and all of the binary test harneses pass except repos-test which is currently crashing for me due to a problem with closing down a pool in test #1.

* subversion.dsw: Added new projects: tests_libsvn_repos_test and tests_libsvn_subr_target_test.

* subversion/tests/libsvn_subr/tests_libsvn_subr_target_test.dsp: New project.

* subversion/tests/libsvn_repos/tests_libsvn_repos_test.dsp: New project.

* subversion/tests/libsvn_fs/skel-test.c: Use casts instead of changing the type.

    • -48
    • +48
    /trunk/subversion/tests/libsvn_fs/skel-test.c
    • -0
    • +106
    /trunk/subversion/tests/libsvn_repos/tests_libsvn_repos_test.dsp
I can now compile all of the Win32 projects except libsvn_ra_dav since I don't

have the Apache/mod_dav headers installed.

* subversion.dsw: Add libsvn_delta, libsvn_fs as dependancies of tests_libsvn_fs_fs.

* svn_config.dsp: Remove non-existant sw_private_config.hw.in from .dsp.

* subversion/client/subversion_client.dsp: MSDEV decided to remove an extra space.

* subversion/libsvn_client/commit.c: Use new_entry parameter per the function docs, instead of random stack data.

* subversion/libsvn_repos/libsvn_repos.dsp: Add file.

* subversion/libsvn_subr/libsvn_subr.dsp: Added missing target.c file.

* subversion/tests/libsvn_delta/deltaparse-test.c,

subversion/tests/libsvn_wc/commit-test.c:

MSVC throws a syntax error when it encountered this empty array. Populate

with two zero's per the test case spec.

* subversion/tests/libsvn_fs/fs_test.dsp: Link against the new Berkely DB drop

* subversion/tests/libsvn_fs/skel-test.c: Replace some occurances of int with apr_byte_t. MSVC warned mightly (> 10-15 times) about this.

    • binary
    /trunk/subversion/tests/libsvn_fs/fs_test.dsp
    • -3
    • +1
    /trunk/subversion/libsvn_client/commit.c
    • -1
    • +1
    /trunk/subversion/tests/libsvn_wc/commit-test.c
    • -16
    • +17
    /trunk/subversion/tests/libsvn_fs/skel-test.c
    • -0
    • +104
    /trunk/subversion/libsvn_repos/libsvn_repos.dsp
    • binary
    /trunk/subversion/client/subversion_client.dsp
2001-02-18 Bill Tutt <rassilon@lyra.org>:

* include/svn_fs.h: (svn_fs_get_editor) Make prototype match usage in libsvn_fs/editor.c.

* libsvn_fs/libsvn_fs.dsp: Update file list so it builds again.

    • binary
    /trunk/subversion/libsvn_fs/libsvn_fs.dsp
SVN.cpp (CSVNWorkingCopy::wc_statuses): Rename apr_make_hash to apr_hash_make to follow APR's lead.

    • -1
    • +1
    /trunk/subversion/clients/win32/svn_com/SVN.cpp
Prime the tree view for being rooted at "My Computer", drive, or folder, and create beginning of directory combo box to assist in changing the tree view's root.

2001-02-02 Bill Tutt <rassilon@lyra.org>

* DriveHelpers.bas: Added new helper functions PathSkipTail and PathGetTail.

* frmMain.bas: Added new ImageCombo drop down, and associated list box.

The intended purpose of this is to help assist in narrowing the scope of the left

pane. Moved Tree View event hooks into ExplorerViewHelper.

* frmMain.frx: New imagelist data for the drive combo box.

* ExplorerViewHelpers.bas: Renamed to ExplorererViewHelpers.cls. (VB only

lets you hook events from forms, and classes.)

* ExplorerViewHelpers.cls: New file. Recipient of all Tree View event hooks from

frmMain.bas. Moved node creation into ExpandNodes for use by initial tree

loading code. Tweaked tree population code to handle having "My Computer", a drive, or a folder as the root node of a tree.

* WinSVN.vbp: VB munging for renamed files, etc.

2001-02-02 Bill Tutt <rassilon@lyra.org>

* AUTHORS: Greg was nice enough to toss me a slightly more convenient

address.

2001-02-01 Bill Tutt <rassilon@lima.mudlib.org>

* IDEAS: Add idea tor common diff output parsing code in order to calculate the

required data for a visual diff.

2001-02-01 Bill Tutt <rassilon@lima.mudlib.org>

* SVN.cpp (CSVNWorkingCopy::wc_statuses): Add cast to remove

compiler warning.

* MarshalArray.h: Document limitation with current code not following all of the

connection point rules atm.

    • -1
    • +1
    /trunk/subversion/clients/win32/svn_com/SVN.cpp
* SVN.cpp (CSVNWorkingCopy::wc_statuses): Fix apr_hash_count call to current prototype.

    • -1
    • +1
    /trunk/subversion/clients/win32/svn_com/SVN.cpp