Checkout Tools
  • last updated 2 hours ago
Constraints: committers
Constraints: files
Constraints: dates

Changeset 1295152 is being indexed.

Purge trailing whitespace, in the spirit of r1138109.

  1. … 97 more files in changeset.
* subversion/libsvn_wc/wc_db_wcroot.c

(get_path_kind): Remove obsolete information in comment.

* subversion/libsvn_wc/wc_db_wcroot.c

(svn_wc__db_wcroot_parse_local_abspath): Following up on r1245935, allow a

few more errors to indicate that a node is unversioned.

When hunting for a wcroot through a symlink that points to a directory,

and a WC is found in a parent directory of the symlink, ignore non-conflicted

not-present or excluded nodes that overlap with the symlink.

This allows unversioned symlinks to redirect the wcroot search even

if 'invisible' nodes exist at the symlink's location in the parent WC.

The benefit of this hack is coherent behaviour for unversioned symlinks

pointing to externals, at least from the user's point of view.

Before this change, Subversion would error out with "path not found"

if an unversioned symlink was obstructing a, for instance, not-present

node, and this error magically disappeared after an update which removed

the not-present node.

Now, Subversion prefers using the external's wcroot unless there is

something important to show for the node corresponding to the symlink

in the parent WC. It is somewhat unfortunate that the decision about what

is important is made at a very low layer within the guts of libsvn_wc.

But I saw no better way of working around this. This hack will become

unnecessary once externals are moved into the parent's wc.db.

* subversion/libsvn_wc/wc_db_wcroot.c

(svn_wc__db_wcroot_parse_local_abspath): Ignore non-conflicted not-present

or excluded nodes beneath symlinks pointing at directories, for reasons

described above.

* subversion/libsvn_wc/wc_db_wcroot.c

(svn_wc__db_wcroot_parse_local_abspath): Add a comment about not-present

symlinks. They can cause 'svn info' to return with a "path not found" error,

even if there is an unversioned on-disk symlink that points to an external.

For issues #4102 and #4120, both describing problems with symlinks

pointing to externals with various operations (add/status/diff and more),

change the way we resolve working copy roots for symlinks.

* subversion/libsvn_wc/wc_db_private.h

(svn_wc__db_t): Use svn_kind_t rather than svn_node_kind_t in the

parse cache. This allows symlinks to be represented.

* subversion/libsvn_wc/wc_db_wcroot.c

(get_path_kind): Return svn_kind_t instead of svn_node_kind_t. This allows

symlinks to be represented. This function used to force symlinks to always

be treated like directories, which prevents symlinks pointing to externals

from being handled as part of the external's parent working copy.

(svn_wc__db_wcroot_parse_local_abspath): If we locate a wcroot via a

symlink that points to a directory, first treat the symlink like a

normal file, i.e. walk upwards from the symlink's parent dir.

If we find a db, and the symlink is versioned in it, use this DB.

Else, try again, this time treating the symlink like a directory,

which means we'll find a nested wcroot in case the symlink points

to a nested working copy (e.g. an external).

This strategy allows versioned symlinks pointing to externals to work

within the external's parent wc, and also allows unversioned symlinks

to point to nested WCs (this is required for our test suite).

I had to introduce a 'goto' here to avoid major refactoring :(

This function should probably be refactored in a later commit

to get rid of the 'goto'.

* subversion/tests/cmdline/

(externals_as_symlink_targets): Remove XFail marker.

  1. … 2 more files in changeset.
* subversion/libsvn_wc/wc_db_wcroot.c

(verify_no_work): Add a doc string.

Resolve a few related issues (issue #2557, #3987) that all occur because we

assumed that a directly referenced symlink is never a working copy root, while

-as these issues show- it can be.

* subversion/libsvn_wc/wc_db_wcroot.c

(get_path_kind): Reorder arguments to match convention. Set kind to directory

for symlinks to check them to be a working copy root.

(svn_wc__db_wcroot_parse_local_abspath): Update caller.

Followup to r1140505. Fix indentation.

* [everywhere]: Fix indentation fallout from the

svn_error_return() -> svn_error_trace() rename.

Patch by: Noorul Islam K M <noorul{_AT_}>

  1. … 37 more files in changeset.
Rename the 'svn_error_return' macro to 'svn_error_trace'.

See email thread "[RFC] Rename 'svn_error_return' to 'svn_error_trace'?" on

2011-06-23, <>.

* subversion/include/svn_error.h

(svn_error_return): Rename to svn_error_trace.

(SVN_ERR, svn_error_purge_tracing): Track the rename.

* [everywhere]: Track the rename.

  1. … 120 more files in changeset.
The semi-annual trailing whitespace cleansing ritual.

* everywhere:

for extsn in c h cpp java py pl rb; do

sed -i -e 's/[ \t]*$//' `find . -name "*.$extsn" | xargs grep '[ \t]$' -l`


  1. … 144 more files in changeset.
Install WC DB validation triggers as temporary triggers on opening the DB.

* subversion/libsvn_wc/wc-checks.sql

(no_repository_updates, validation_01, validation_02, validation_03):

Declare these as temporary.

* subversion/libsvn_wc/wc_db_wcroot.c

(svn_wc__db_wcroot_parse_local_abspath): After opening the DB, install

the validation triggers.

  1. … 1 more file in changeset.
Make all WC test programs use svn_wc__db_util_open_db() instead of calling

svn_sqlite__open() directly, to ensure that the SQLite user-defined function

'relpath_depth' gets installed in the DB connection. That function will be

needed by the validation triggers in wc-checks.c as soon as we activate


* subversion/libsvn_wc/wc_db_private.h,


(svn_wc__db_util_open_db): Add an optional parameter to specify the list

of statements to prepare instead of the default set. Write a doc string.

* subversion/libsvn_wc/wc_db.c

(create_db): Update the call to svn_wc__db_util_open_db().

[Accidentally missed in this commit; committed in r1127902.]

* subversion/libsvn_wc/wc_db_wcroot.c

(svn_wc__db_wcroot_parse_local_abspath): Same.

* subversion/tests/libsvn_wc/db-test.c

(create_fake_wc): Call svn_wc__db_wcroot_parse_local_abspath() instead of


* subversion/tests/libsvn_wc/entries-compat.c

(make_one_db): Same.

* subversion/tests/libsvn_wc/op-depth-test.c

(open_wc_db): Same.

  1. … 5 more files in changeset.
SVN status will try to read the .format file for every folder in

the working copy. That is very expensive, so do a stat call

to check whether the .format file exists - which it won't for

wc-ng w/cs.

* subversion/libsvn_wc/wc_db_wcroot.c

(get_old_version): early exit upon failed stat

Reverse merged revision(s) 1103589 from subversion/trunk

after discussion with Bert.

  1. … 3 more files in changeset.
Reverted in r1103671.

Eliminate unnecessary stat calls during checkout, part 2 of 2.

If provided as parameter, svn_wc__db_wcroot_parse_local_abspath

does not need to use a stat call to detect the kind of node

behind the given abspath. For many *frequent* callers that

is known.

* subversion/libsvn_wc/wc_db_private.h

(svn_wc__db_wcroot_parse_local_abspath): add kind parameter

* subversion/libsvn_wc/wc_db_wcroot.c

(svn_wc__db_wcroot_parse_local_abspath): stat for kind of

if it is not already known

* subversion/libsvn_wc/wc_db_pristine.c

(svn_wc__db_pristine_get_path, svn_wc__db_pristine_read,

svn_wc__db_pristine_get_tempdir, svn_wc__db_pristine_install,

svn_wc__db_pristine_get_md5, svn_wc__db_pristine_get_sha1,

svn_wc__db_pristine_remove, svn_wc__db_pristine_cleanup,

svn_wc__db_pristine_check): don't use the optimization

* subversion/libsvn_wc/wc_db.c

(kind_by_filesize): new utility function

(get_statement_for_path, svn_wc__db_to_relpath,

svn_wc__db_from_relpath, svn_wc__db_get_wcroot,

svn_wc__db_base_add_symlink, add_absent_excluded_not_present_node,

svn_wc__db_base_get_info, svn_wc__db_base_get_children,

svn_wc__db_base_clear_dav_cache_recursive, svn_wc__db_external_add_file,

svn_wc__db_external_add_symlink, svn_wc__db_external_remove,

svn_wc__db_external_read, svn_wc__db_external_read_pristine_props,

svn_wc__db_external_read_props, svn_wc__db_op_copy,

svn_wc__db_op_copy_shadowed_layer, svn_wc__db_op_copy_file,

svn_wc__db_op_copy_symlink, svn_wc__db_op_add_symlink,

svn_wc__db_op_set_props, svn_wc__db_op_set_changelist,

svn_wc__db_op_mark_resolved, svn_wc__db_op_set_tree_conflict,

svn_wc__db_op_revert, svn_wc__db_revert_list_read,

svn_wc__db_revert_list_notify, svn_wc__db_op_read_all_tree_conflicts,

svn_wc__db_op_read_tree_conflict, svn_wc__db_op_remove_node,

svn_wc__db_temp_op_remove_working, svn_wc__db_op_delete,

svn_wc__db_read_info, svn_wc__db_read_pristine_info,

svn_wc__db_read_node_install_info, svn_wc__db_read_url,

svn_wc__db_read_props, svn_wc__db_read_props_streamily,

svn_wc__db_read_pristine_props, svn_wc__db_read_children_of_working_node,

svn_wc__db_node_check_replace, svn_wc__db_read_children,

svn_wc__db_global_commit, svn_wc__db_global_update,

svn_wc__db_op_bump_revisions_post_update, svn_wc__db_lock_add,

svn_wc__db_lock_remove, svn_wc__db_scan_base_repos,

svn_wc__db_scan_addition, svn_wc__db_scan_deletion,

svn_wc__db_wq_add, svn_wc__db_wq_fetch, svn_wc__db_wq_completed,

svn_wc__db_read_conflict_victims, svn_wc__db_read_conflicts,

svn_wc__db_read_kind, svn_wc__db_node_hidden, svn_wc__db_is_wcroot,

svn_wc__db_temp_wcroot_tempdir, svn_wc__db_wclock_obtain,

svn_wc__db_wclock_release, svn_wc__db_wclock_owns_lock,

svn_wc__db_temp_op_start_directory_update, svn_wc__db_temp_op_make_copy,




svn_wc__db_info_below_working, svn_wc__db_get_not_present_descendants,

svn_wc__db_min_max_revisions, svn_wc__db_is_sparse_checkout,

svn_wc__db_has_switched_subtrees, svn_wc__db_get_absent_subtrees,

svn_wc__db_has_local_mods, svn_wc__db_revision_status,

svn_wc__db_base_get_lock_tokens_recursive, svn_wc__db_verify):

don't use the optimization

(svn_wc__db_base_add_directory, svn_wc__db_base_get_children_info,

svn_wc__db_external_add_dir, svn_wc__db_op_copy_dir,

svn_wc__db_op_add_directory, svn_wc__db_op_set_base_depth,

svn_wc__db_read_children_info, svn_wc__db_read_children_walker_info,

svn_wc__db_global_relocate, svn_wc__db_temp_get_format,

svn_wc__db_temp_get_access, svn_wc__db_temp_set_access,

svn_wc__db_temp_close_access, svn_wc__db_temp_clear_access,

svn_wc__db_temp_borrow_sdb, svn_wc__db_temp_op_end_directory_update):

path parameters are known to be directories

(svn_wc__db_base_add_file, svn_wc__db_op_add_file):

path parameters are known to be files

(svn_wc__db_external_record_fileinfo, svn_wc__db_global_record_fileinfo):

path parameters are files, if the file length is > 0.

  1. … 3 more files in changeset.
Remove svn_wc__db_openmode_t and its references. We no longer use it, and

SQLite handles its functionality for us automatically.

* subversion/tests/libsvn_wc/db-test.c

(create_open): Remove smode param, and don't use it to open the database.

(test_getting_info, test_inserting_nodes, test_children, test_working_info,

test_pdh, test_scan_addition, test_scan_deletion, test_global_relocate,

test_work_queue): Update callers.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_openmode_t): Remove.

(svn_wc__db_open): Remove openmode_t param, and update docstring.

* subversion/libsvn_wc/wc_db_wcroot.c

(svn_wc__db_open): Remove param, and don't set it in the struct.

* subversion/tests/libsvn_wc/entries-compat.c


* subversion/libsvn_wc/adm_ops.c


* subversion/libsvn_wc/adm_files.c


* subversion/libsvn_wc/context.c


* subversion/libsvn_wc/upgrade.c


* subversion/libsvn_wc/cleanup.c


* subversion/libsvn_wc/lock.c

(alloc_db, svn_wc_adm_probe_open3):

Update callers.

* subversion/libsvn_wc/wc_db_private.h

(svn_wc__db_t): Remove mode member.

  1. … 10 more files in changeset.
Make the 'always open wc.db as readwrite' hack official. This change just

makes official what we've been doing for a while.

Even if requested to open in read/write mode, if the underlying filesystem is

read-only, the open will still succeed, and only fail upon an attempt to write

the database.

* subversion/libsvn_wc/wc_db_wcroot.c

(svn_wc__db_wcroot_parse_local_abspath): Codify our decision to always open

the sqlite database as read/write.

* subversion/libsvn_wc/wc_db_private.h

(svn_wc__db_wcroot_parse_local_abspath): Remove param and update docs.

* subversion/libsvn_wc/wc_db.c,


Update callers.

  1. … 3 more files in changeset.
* subversion/libsvn_wc/wc_db_wcroot.c

(get_path_kind): Use svn_stringbuf_set()'s code for growing the buffer

instead of reimplementing that function locally.

* subversion/libsvn_wc/wc_db_wcroot.c

(header): Fix filename in comment.

PDHs are dead, long live the WCROOT!

* subversion/libsvn_wc/wc_db_pdh.c:

Renamed to...

* subversion/libsvn_wc/wc_db_wcroot.c


  1. … 1 more file in changeset.