Checkout Tools
  • last updated 7 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Fix undefined behavior when constructing ID for txn_node_cache in fsfs.

In make_txn_root() function, the txn variable of type svn_fs_fs__id_part_t *

is passed to apr_pstrcat() function, leading to the undefined behavior.

I can assume that originally it was planned to pass a textual representation

of the txn, instead of passing the txn itself.

Although ID is not used anywhere, except debug-only calls of

svn_cache__get_info() and svn_cache__format_info() functions, the improper call

to apr_pstrcat() may cause a potential crash, etc.

* subversion/libsvn_fs_fs/tree.c

(make_txn_root): Pass a textual representation of the txn to apr_pstrcat()

Patch by: Denis Kovalchuk <denis.kovalchuk@visualsvn.com>

Fix various typos detected by codespell

* libsvn_client/add.c, libsvn_client/blame.c, libsvn_client/commit_util.c,

libsvn_client/conflicts.c, libsvn_client/copy.c, libsvn_client/diff.c,

libsvn_client/export.c, libsvn_client/import.c, libsvn_client/merge.c,

libsvn_client/mergeinfo.c, libsvn_client/mergeinfo.h, libsvn_client/patch.c,

libsvn_client/switch.c, libsvn_client/update.c, libsvn_delta/branch_compat.c,

libsvn_delta/compat.c, libsvn_delta/compose_delta.c, libsvn_delta/svndiff.c,

libsvn_delta/xdelta.c, libsvn_diff/deprecated.c, libsvn_diff/diff_file.c,

libsvn_fs/fs-loader.c, libsvn_fs_base/bdb/locks-table.c, libsvn_fs_base/fs.c,

libsvn_fs_base/key-gen.c, libsvn_fs_base/notes/fs-history,

libsvn_fs_base/reps-strings.c, libsvn_fs_base/tree.c,

libsvn_fs_fs/cached_data.c, libsvn_fs_fs/hotcopy.c, libsvn_fs_fs/index.c,

libsvn_fs_fs/low_level.c, libsvn_fs_fs/pack.c, libsvn_fs_fs/structure,

libsvn_fs_fs/temp_serializer.c, libsvn_fs_fs/transaction.c,

libsvn_fs_fs/tree.c, libsvn_fs_fs/util.h, libsvn_fs_x/cached_data.c,

libsvn_fs_x/caching.c, libsvn_fs_x/hotcopy.c, libsvn_fs_x/id.h,

libsvn_fs_x/index.c, libsvn_fs_x/low_level.c, libsvn_fs_x/pack.c,

libsvn_fs_x/rev_file.c, libsvn_fs_x/structure, libsvn_fs_x/temp_serializer.c,

libsvn_fs_x/transaction.c, libsvn_fs_x/tree.c, libsvn_fs_x/util.h,

libsvn_ra/ra_loader.c, libsvn_ra/ra_loader.h, libsvn_ra/util.c,

libsvn_ra/wrapper_template.h, libsvn_ra_local/ra_plugin.c,

libsvn_ra_serf/commit.c, libsvn_ra_serf/get_file.c,

libsvn_ra_serf/property.c, libsvn_ra_serf/ra_serf.h, libsvn_ra_serf/update.c,

libsvn_ra_serf/util.c, libsvn_ra_svn/client.c, libsvn_ra_svn/cyrus_auth.c,

libsvn_ra_svn/marshal.c, libsvn_repos/authz_parse.c, libsvn_repos/commit.c,

libsvn_repos/compat.c, libsvn_repos/hooks.c, libsvn_repos/load.c,

libsvn_repos/log.c, libsvn_repos/notify.c, libsvn_repos/repos.c,

libsvn_repos/repos.h, libsvn_subr/cache-memcache.c, libsvn_subr/cmdline.c,

libsvn_subr/config_file.c, libsvn_subr/date.c, libsvn_subr/gpg_agent.c,

libsvn_subr/io.c, libsvn_subr/object_pool.c, libsvn_subr/path.c,

libsvn_subr/prompt.c, libsvn_subr/string.c, libsvn_subr/sysinfo.c,

libsvn_subr/temp_serializer.c, libsvn_subr/utf.c, libsvn_subr/utf8proc.c,

libsvn_subr/version.c, libsvn_subr/win32_xlate.c, libsvn_subr/x509parse.c,

libsvn_wc/conflicts.c, libsvn_wc/conflicts.h, libsvn_wc/copy.c,

libsvn_wc/lock.c, libsvn_wc/wc_db.c, libsvn_wc/wc_db.h,

libsvn_wc/wc_db_private.h:

(): Spelling fixes

  1. … 97 more files in changeset.
Following up on r1847572, trace the errors constructed with the new helper.

* subversion/libsvn_fs_fs/tree.c

(open_path): Wrap the err_not_directory() return values with

svn_error_trace().

Suggested by: brane

fsfs: Fix SVN-4791, an issue with the DAG open_path() that was causing

unexpected SVN_ERR_FS_NOT_DIRECTORY errors when attempting to open a path

with `open_path_node_only | open_path_allow_null` flags.

The implication of this is that certain svn_fs_closest_copy() calls could be

returing unexpected errors as well. For the end user, this means that such

errors were possible, for example, during certain `svn update`s.

The root cause of this behavior is the implementation of the optimization

within the open_path() routine. The optimization attempts to do a cache

lookup of the prospective parent directory of the path to be opened.

If the cache lookup is successful, the parent node is assumed — but not

checked — to be a directory. The absense of the check was causing

unexpected errors instead of returning `NULL` in a case where:

- open_path() is called with `open_path_node_only | open_path_allow_null`

- the path to be opened points to a non-existing path, but its parent path

is a file

- the DAG node of the "parent" file is cached

See https://lists.apache.org/thread.html/693a95b0da834387e78a7f08df2392b634397d32f37428c81c02f8c5@%3Cdev.subversion.apache.org%3E

* subversion/libsvn_fs_fs/tree.c

(err_not_directory): New helper function factored out from...

(open_path): ...here. Check the kind of the DAG node for the prospective

parent returned from cache in the `open_path_node_only` optimization.

Handle the case where it is not a directory; utilize the new helper to

construct the appropriate error.

* subversion/tests/libsvn_fs/fs-test.c

(test_closest_copy_file_replaced_with_dir): New regression test.

(test_funcs): Run new test.

  1. … 1 more file in changeset.
Improve error message when DAG lookup fails in FSFS.

Suggested by: Orivej Desh <orivej{_AT_}gmx.fr>

* subversion/libsvn_fs_fs/tree.c

(open_path): Report the txn / rev in which we were looking for PATH.

Fix issue #4677.

When non-exitent paths are allowed as a result of a DAG-walk

(as opposed to creating a "path not found" error on those),

we may encounter file nodes in the "parent" path. Those are

not an error but simply an indication that there won't be any

sub-paths.

* subversion/libsvn_fs_fs/tree.c

(open_path): If n/a paths are allowed, non-dir parents are, too.

* subversion/libsvn_fs_x/dag_cache.c

(svn_fs_x__get_dag_path): Same.

* subversion/tests/libsvn_fs/fs-test.c

(closest_copy_test_svn_4677): Add regression test.

(test_funcs): Register new test.

  1. … 2 more files in changeset.
First step towards making svn_ra_get_mergeinfo streamy instead of using

unbound amounts of memory.

The server-side implementation of svn_ra_get_mergeinfo does not scale

well as it collects all m/i into a catalog first before sending the data

over the wire. Using callbacks to process the mergeinfo immediately at

the point it was found will fix this issue.

In this first step, we switch the FS API layer to using callbacks.

* subversion/include/svn_fs.h

(svn_fs_mergeinfo_receiver_t): Declare new callback.

(svn_fs_get_mergeinfo3,

svn_fs_get_mergeinfo2): Bump API.

* subversion/libsvn_fs/deprecated.c

(mergeinfo_receiver,

svn_fs_get_mergeinfo2): Implement the old API in terms of the new one.

* subversion/libsvn_fs/fs-loader.h

(root_vtable_t): Adapt the FS Vtable to mirror the API change.

* subversion/libsvn_fs/fs-loader.c

(svn_fs_get_mergeinfo3): The bumped API replaces ...

(svn_fs_get_mergeinfo2): ... this old one.

* subversion/libsvn_fs_fs/tree.c

(crawl_directory_dag_for_mergeinfo): Invoke the receiver callback instead

of accumulating the result. No more

need for the RESULT_POOL, either.

(add_descendant_mergeinfo): Pass new signature through.

(get_mergeinfos_for_paths): Invoke the receiver callback instead of

accumulating the result. No more need for the

RESULT_POOL, either.

(fs_get_mergeinfo): Pass new signature through.

* subversion/libsvn_fs_x/tree.c

(crawl_directory_dag_for_mergeinfo,

add_descendant_mergeinfo,

get_mergeinfos_for_paths,

x_get_mergeinfo): Same changes as for FSFS.

* subversion/libsvn_fs_base/tree.c

(get_mergeinfo_data_and_entries_baton,

txn_body_get_mergeinfo_data_and_entries,

crawl_directory_for_mergeinfo,

get_mergeinfos_for_paths): Invoke the receiver callback instead of

accumulating the result. No more need

for the RESULT_POOL, either.

(base_get_mergeinfo): Pass new signature through.

  1. … 6 more files in changeset.
Make FSFS packing with restricted memory testable and add a test for it.

We basically expose the MAX_MEM parameter used internally at our private

FSFS API level and call that in the test. We could also expose it in the

public FS API but that doesn't seem to be necessary ATM.

* subversion/libsvn_fs_fs/pack.h

(svn_fs_fs__pack): Add optional MAX_MEM parameter.

* subversion/libsvn_fs_fs/pack.c

(pack_baton,

pack_shard): Take the MAX_MEM parameter from the baton now.

(svn_fs_fs__pack): Pass the optional parameter on to the baton.

* subversion/libsvn_fs_fs/fs.c

(fs_pack): Update caller.

* subversion/libsvn_fs_fs/tree.c

(svn_fs_fs__commit_txn): Same.

* subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c

(create_non_packed_filesystem): Extract this new utility function out

from ...

(create_packed_filesystem): ... this.

(pack_with_limited_memory): New test.

(test_funcs): Register the new test.

  1. … 4 more files in changeset.
In FSFS, introduce the concept of a get_changes context.

Everything above svn_fs_fs__get_changes is now "final".

This replicates most of r1733804 and its follow-up r1733830.

* subversion/libsvn_fs_fs/fs.h

(svn_fs_fs__changes_context_t): Define new internal data type.

* subversion/libsvn_fs_fs/cached_data.h

(svn_fs_fs__create_changes_context): Declare new constructor.

(svn_fs_fs__get_changes): Take inputs from the CONTEXT now and use the

two-pool paradigm.

* subversion/libsvn_fs_fs/cached_data.c

(svn_fs_fs__create_changes_context): Implement.

(svn_fs_fs__get_changes): CONTEXT provides most of the parameters and

variables now. SCRATCH_POOL is provided by

the caller. Be sure to update the CONTEXT

according to the *CHANGES returned and make

sure to close the rev file in the last call.

* subversion/libsvn_fs_fs/stats.c

(get_phys_change_count): Update caller. We can now use a normal ITERPOOL

Instead of a SUBPOOL.

* subversion/libsvn_fs_fs/transaction.c

(svn_fs_fs__paths_changed): Update the backward compat code.

* subversion/libsvn_fs_fs/tree.c

(fs_revision_changes_iterator_data_t,

fs_revision_changes_iterator_get,

fs_report_changes): Fetch the changes iteratively now - even though the

underlying layer will return them in one block, ATM.

  1. … 5 more files in changeset.
Follow-up to r1745055: Unbreak Windows build.

* subversion/libsvn_fs_fs/tree.c

(fs_txn_changes_iterator_get): Use the correct, portable data type.

In FSFS, add basic native support for svn_fs_paths_changed3 by merging /

replicating r1730365 from FSX.

* subversion/libsvn_fs_fs/tree.c

(convert_path_change,

fs_txn_changes_iterator_data_t,

fs_txn_changes_iterator_get,

txn_changes_iterator_vtable,

fs_revision_changes_iterator_data_t,

fs_revision_changes_iterator_get,

rev_changes_iterator_vtable): Implement iterators for in-txn and

in-revision changed paths lists.

(fs_report_changes): Implement the report_changes vtable entry.

(root_vtable): Update the vtable.

Define a callback-based FS API to report changed paths.

The old API is not going to be deprecated until the majority of users have

been migrated. Also, there is no backend that implements the new API, so

this will simply segfault when being called. The next patch will fix this

by adding a fallback implementation for it.

* subversion/include/svn_fs.h

(svn_fs_path_change3_t): Declare the new path change data type. Lose

the unusable noderev ID and add the path, so

this struct is now self-sufficient.

(svn_fs_path_change3_create): Declare a suitable constructor to help

future binary compatibility.

(svn_fs_path_change_receiver_t,

svn_fs_paths_changed3): The actual new API & callback function type.

* subversion/include/private/svn_fs_util.h

(svn_fs__path_change_create_internal2): Declare a suitable private API

to instantiate the new data

struct - similar to the old one.

* subversion/libsvn_fs_util/fs-util.c

(svn_fs__path_change_create_internal2): Implement the new internal API

similar to the old one.

* subversion/libsvn_fs/fs-loader.h

(root_vtable_t): Add entry for the new API.

* subversion/libsvn_fs/fs-loader.c

(svn_fs_paths_changed3): Implement as simple vtable call. This will

actually segfault for now b/c nobody provides

the function.

(svn_fs_path_change3_create): Implement like svn_fs_path_change2_create.

* subversion/libsvn_fs_base/tree.c

* subversion/libsvn_fs_fs/tree.c

* subversion/libsvn_fs_x/tree.c

(root_vtable): None of these backends actually implement the new API.

  1. … 7 more files in changeset.
Follow-up to r1723834: Inline one line static function.

* subversion/libsvn_fs_fs/tree.c

(node_kind): Inline to ...

(svn_fs_fs__check_path): ... here. Use standard error handling.

Simplify svn_fs_check_path() implementation for FSFS.

* tree.c

(node_kind): Obtain dag_node_t instance directly via get_dag_node() instead

of svn_fs_fs__node_id() + svn_fs_fs__dag_get_node().

Use more specific error code in FSFS implementation of svn_fs_contents_changed()

and svn_fs_contents_different().

Suggested by: rhuijben

* subversion/libsvn_fs_fs/tree.c

(fs_contents_changed): Use SVN_ERR_FS_NOT_FILE instead of SVN_ERR_FS_GENERAL

error code if one of provided path is not a file.

Avoid double DAG lookup in FSFS implementation of svn_fs_contents_changed()

and svn_fs_contents_different().

It also slightly changes error message when these invoked functions invoked

for non-existent path: before this change error message was "'/non-existent'

is not a file" now it will be "File not found: revision 1, path

'/non-existent'"

* subversion/libsvn_fs_fs/tree.c

(fs_contents_changed): Use svn_fs_fs__dag_node_kind() to get node kind of

already obtained dag_node_t instead of calling to svn_fs_fs__check_path().

* subversion/tests/libsvn_fs/fs-test.c

(compare_contents): Extend test to test behavior of

svn_fs_contents_changed() and svn_fs_contents_different() with directories

and non-existent paths.

  1. … 1 more file in changeset.
Following up on r1709388, undo the behavior change of the calling sites of

svn_fs_contents_different() and svn_fs_props_different() that is not required

nor justified in the context of fixing issue #4598, "No-op changes no longer

dumped by 'svnadmin dump' in 1.9".

This commit also restores the hack required for blame -g for old clients

(see r1686478, r1686888) in rev_hunt.c:send_path_revision(). Perhaps there

is a better replacement for it, since we now have the original behavior of

svn_fs_contents_changed() available, but this can be handled separately.

* subversion/libsvn_fs_fs/dag.c

(svn_fs_fs__dag_things_different): Tweak the related comment within this

function.

* subversion/libsvn_fs_fs/tree.c

(merge): Compare the property lists based on their contents.

* subversion/libsvn_repos/delta.c

(delta_proplists): Use svn_fs_props_different() when comparing property

lists.

(svn_repos__compare_files): Call svn_fs_contents_different() instead of

reimplementing the content comparison in this function.

(delta_files): Call svn_fs_contents_different(), as we were doing prior

to r1709388.

* subversion/libsvn_repos/reporter.c

(delta_proplists): Use svn_fs_props_different() when comparing property

lists.

* subversion/libsvn_repos/rev_hunt.c

(send_path_revision): Call svn_fs_contents_different(). Restore the

blame -g compatibility hack.

* subversion/include/svn_ra.h

(svn_ra_get_file_revs2): Restore the original @note in the docstring.

* subversion/include/svn_repos.h

(svn_repos_get_file_revs2): Restore the original @note in the docstring.

  1. … 6 more files in changeset.
Minor speedup of the DAG node L1 cache lookup in FSFS.

* subversion/libsvn_fs_fs/tree.c

(get_dag): Prevent double cache lookups when the path is normalized

while not incurring a performance hit for non-normalized

paths.

Minor refactoring of FSFS' L1 dag node cache access.

Split lookup and insertion into two separate functions. That comes at

the cost of calculating the hash twice but allows us to delay the cache

auto-clear call until we actually have an L2 item that we can promote

to L1. The redcution in cache misses will often compensate for the hash

calculation overhead.

* subversion/libsvn_fs_fs/tree.c

(hash_func): Move out of cache_lookup.

(cache_lookup): Don't clear the entry when we found a mismatch and

return the node - if found - instead of the whole bucket.

(cache_insert): New function.

(dag_node_cache_get): Update and slightly simplify the caller.

Restore the 1.8 behavior of svn_fs_contents_changed() and _props_changed()

API. Switch all calling sites of the new API, svn_fs_contents_different()

and _props_different(), back to using the old functions.

There are no user-visible problems associated with the old code. The new

API doesn't improve any real use cases in the current code, but is causing

problems:

- We had a problem with misbehaving svn blame -g

(http://svn.haxx.se/dev/archive-2015-06/0069.shtml, "Blame behaviour

change in 1.9").

- We have an issue with repositories behaving differently in client-side

operations like 'svn log' after dump/load

(http://svn.haxx.se/dev/archive-2015-09/0269.shtml, "No-op changes no

longer dumped by 'svnadmin dump' in 1.9"; also see issue #4598 in

https://issues.apache.org/jira/browse/SVN-4598).

- We could experience same problems originating from other callers of the

new API, because the low level behavior change associated with switching

to it propagates up to higher levels like svn_repos or svn_ra and alters

the behavior of many different callers like svn_ra_get_file_revs2() or

the update reporter. Third-party API callers could not be ready for it

as well, because public API functions like svn_ra_get_file_revs2() didn't

receive an erratum or a bump.

See the discussion in http://svn.haxx.se/dev/archive-2015-10/0022.shtml

("Re: No-op changes no longer dumped by 'svnadmin dump' in 1.9").

* subversion/libsvn_fs_base/dag.c

(svn_fs_base__things_different): Compare the uniquifiers, as we did in 1.8.

* subversion/libsvn_fs_base/fs.h

(node_revision_t.data_key_uniquifier): Remove the comment about not using

this field.

* subversion/libsvn_fs_fs/fs_fs.c

(svn_fs_fs__noderev_same_rep_key): Reintroduce this helper function.

(svn_fs_fs__file_text_rep_equal, svn_fs_fs__prop_rep_equal): Always

assume the strict mode in these helpers.

* subversion/libsvn_fs_fs/fs_fs.h

(svn_fs_fs__noderev_same_rep_key): Declare this re-added helper.

(svn_fs_fs__file_text_rep_equal, svn_fs_fs__prop_rep_equal): Update the

docstrings for these helper functions.

* subversion/libsvn_fs_fs/dag.c

(svn_fs_fs__dag_things_different): Preserve the current comparison behavior

in strict mode. Restore the 1.8 way of comparing the representation keys

in non-strict mode.

* subversion/libsvn_fs_fs/tree.c

(merge): Restore the 1.8 way of comparing property lists.

* subversion/libsvn_fs_fs/fs.h

(representation_t.uniquifier): Remove the comment about not using this

field.

* subversion/libsvn_repos/delta.c

(delta_proplists): Switch back to using svn_fs_props_changed().

(svn_repos__compare_files): Restore this function to its 1.8 state.

(delta_files): Restore the 1.8 way of comparing files.

* subversion/libsvn_repos/dump.c

(dump_node): Switch back to using svn_fs_contents_changed() and

svn_fs_props_changed().

* subversion/libsvn_repos/reporter.c

(delta_proplists): Switch back to using svn_fs_props_changed().

* subversion/libsvn_repos/rev_hunt.c

(send_path_revision): Switch back to using svn_fs_contents_changed().

Remove the no longer necessary hack for svn blame -g with older clients.

* subversion/include/svn_ra.h

(svn_ra_get_file_revs2): Update @note in the docstring.

* subversion/include/svn_repos.h

(svn_repos_get_file_revs2): Update @note in the docstring.

* subversion/tests/cmdline/svnadmin_tests.py

(dump_no_op_change): No longer fails with fsfs and bdb.

  1. … 13 more files in changeset.
Eliminate most of the directory representation I/O during typical history

traversal in FSFS. This effectively replicates the FSX change of r1680529.

To determine when & where the next relevant copy operation for a given path

happened, we need to inspect the copy-from info for all parent folders.

Prior to this patch, we would do that crawl for each reported revision.

Now we remember the next copy revision number and simply follow the path's

node revision chain until then.

* subversion/libsvn_fs_fs/tree.c

(fs_history_data_t): Add elements to remember the current noderev and

the next copy we found.

(assemble_history): Store the new optional structure elements.

(fs_node_history): Update caller - new optional info not available.

(history_prev): Add a quick code path for following a linear history.

Provide & reuse the "next copy" and "noderev" info.

(fs_history_prev): Update caller - new optional info not available.

Following up on r1673170, add the first fsfs tweaks to optimize obtaining the

boolean whether there are properties on a node.

* subversion/libsvn_fs_fs/cached_data.h

(svn_fs_fs__has_props): New function.

* subversion/libsvn_fs_fs/dag.c

(svn_fs_fs__dag_has_props): New function.

* subversion/libsvn_fs_fs/dag.h

(svn_fs_fs__dag_has_props): New function.

* subversion/libsvn_fs_fs/tree.c

(fs_node_has_props): Use svn_fs_fs__dag_has_props.

  1. … 3 more files in changeset.
Add an fs layer api that allows obtaining just a boolean indicating whether

properties exist on a node, instead of always obtaining the properties and

checking their count.

This is by far the most expensive operation on 'svn ls -v' in Subversion <=

1.8.x on huge directories as it requires fetching much 'new' data, and has

the risk of trashing the node cache.

r1673153 made new 'svn' clients stop asking for this information for this

scenario but existing clients do ask and so will most likely many third

party clients (confirmed for TortoiseSVN), will keep asking for this

information.

This function introduces the FS api and updates callers, but doesn't provide

optimized implementations yet, so the result is that this doesn't change

runtime behaviour yet, but just moves the implementation into the fs layer.

I hope this patch will be accepted for 1.9.0 to allow further improvements

in later patches, potentially after 1.9.0.

* subversion/include/svn_fs.h

(svn_fs_node_has_props): New function.

* subversion/libsvn_fs/fs-loader.c

(svn_fs_node_has_props): New function.

* subversion/libsvn_fs/fs-loader.h

(root_vtable_t): Add node_has_props.

* subversion/libsvn_fs_base/tree.c

(base_node_has_props): New function.

(root_vtable): Add function.

* subversion/libsvn_fs_fs/tree.c

(fs_node_has_props): New function.

(root_vtable): Add function.

* subversion/libsvn_fs_x/tree.c

(x_node_has_props): New function.

(root_vtable): Add function.

* subversion/libsvn_ra_local/ra_plugin.c

(svn_ra_local__get_dir): Use new optimized fs call. Rename subpool

to iterpool.

* subversion/libsvn_repos/repos.c

(svn_repos_stat): Use new optimized fs call.

* subversion/mod_dav_svn/liveprops.c

(insert_prop_internal): Use optimized code for svn clients.

* subversion/svnserve/serve.c

(get_dir): Use optimized fs code.

* subversion/tests/libsvn_ra/ra-test.c

(ra_list_has_props): New function.

(test_funcs): Add ra_list_has_props.

  1. … 10 more files in changeset.
FS API change:

The new svn_fs_dir_optimal_order shall follow the two pool paradigm.

* subversion/include/svn_fs.h

(svn_fs_dir_optimal_order): Switch to the appropriate new paradigm.

* subversion/libsvn_fs/fs-loader.c

(svn_fs_dir_optimal_order): Update API implementation.

* subversion/libsvn_fs/fs-loader.h

(root_vtable_t): Update v-table.

* subversion/libsvn_fs_base/tree.c

(base_dir_optimal_order): Update BDB implementation.

* subversion/libsvn_fs_fs/tree.c

(fs_dir_optimal_order): Update FSFS vtable implementation.

* subversion/libsvn_fs_fs/pack.h

(svn_fs_fs__order_dir_entries): Update internal function signature.

* subversion/libsvn_fs_fs/pack.c

(svn_fs_fs__order_dir_entries): Update "actual" FSFS implmenentation.

* subversion/libsvn_fs_x/tree.c

(x_dir_optimal_order): Update FSX vtable implementation.

* subversion/libsvn_fs_x/pack.h

(svn_fs_x__order_dir_entries): Update internal function signature.

* subversion/libsvn_fs_x/pack.c

(svn_fs_x__order_dir_entries): Update "actual" FSX implmenentation.

* subversion/libsvn_repos/reporter.c

(delta_dirs): Update caller to provide a scratch pool as well.

* subversion/tests/libsvn_fs/fs-test.c

(test_dir_optimal_order): Same.

  1. … 11 more files in changeset.
FS API change: Rename svn_fs_node_same to svn_fs_node_unchanged.

Note that we currently (ab-)use the same enum in the FS implementation for

ID relationships but this is a mere convenience. They don't have the same

semantics wrt. to edge cases and don't expose their use of the enum through

the FS API.

* subversion/include/svn_fs.h

(svn_fs_node_relation_t): Rename said element and document the semantics

of all elements in terms of (root, path) pairs

other FS API concepts. Be as strict as feasible.

Remove references to #svn_fs_compare_ids as it

does _not_ have the same strictness guarantees.

* subversion/libsvn_fs_base/id.c

(svn_fs_base__id_compare): Update enum element name.

* subversion/libsvn_fs_base/tree.c

(txn_body_copy): Same.

* subversion/libsvn_fs/editor.c

(can_modify): Same.

* subversion/libsvn_fs_fs/id.c

(svn_fs_fs__id_compare): Same.

* subversion/libsvn_fs/fs-loader.c

(svn_fs_compare_ids): Same.

* subversion/libsvn_fs_fs/tree.c

(fs_node_relation): Same.

* subversion/libsvn_fs_x/fs_id.c

(id_compare): Same.

* subversion/libsvn_fs_x/tree.c

(x_node_relation): Same.

* subversion/libsvn_repos/delta.c

(svn_repos_dir_delta2): Same.

* subversion/mod_dav_svn/repos.c

(do_out_of_date_check): Same.

* subversion/mod_dav_svn/util.c

(dav_svn__get_safe_cr): Same.

* subversion/mod_dav_svn/version.c

(dav_svn__checkout): Same.

* subversion/tests/libsvn_fs/fs-test.c

(check_related,

check_txn_related): Same.

  1. … 13 more files in changeset.
Follow-up to r1665894: Don't falsly report transaction roots noderevs

to be the same as the root noderev of their base revision.

* subversion/libsvn_fs_fs/tree.c

(fs_node_relation): As it turns out, txn root objects report their base

revisions instead of "-1" in REV.

* subversion/libsvn_fs_x/tree.c

(x_node_relation): Same.

  1. … 1 more file in changeset.
* subversion/libsvn_fs_fs/tree.c

(fs_node_relation): Clarify comment. No functional change.

Suggested by: julianfoad

Fix the noderev relatedness check for FSFS and FSX when both noderevs / IDs

belong to different transactions. Provide a test case for it.

Due to a misread of the 1.8.x logic, the new code in 1.9 reported noderevs

from different txns as "unrelated". The actual problem that exists in FSFS

is that node-IDs that just got created (as added w/o history) in a txn have

only a txn-local ID. Hence, they may clash between txns. OTOH, uncommitted

new nodes from different txns cannot be related. So, the relation check

can be implemented for all possible cases in FSFS but requires extra logic.

BDB did the right thing from the start. FSX had code added to mimic FSFS'

restriction and that code can simply be removed.

Found by: julianfoad

* subversion/libsvn_fs_fs/id.c

(svn_fs_fs__id_check_related): Use a more obvious check for the

"same tmp node-ID but different txn" case.

* subversion/libsvn_fs_fs/tree.c

(fs_node_relation): Re-implement the logic for nodes from different txns.

* subversion/libsvn_fs_x/fs_id.c

(id_compare): Remove the "different txns implies unrelated nodes" block.

* subversion/libsvn_fs_x/tree.c

(x_node_relation): Same.

* subversion/tests/libsvn_fs/fs-test.c

(check_txn_related): New test, inspired by check_txn_related.

(test_funcs): Register the new test.

  1. … 4 more files in changeset.
Apply the standard pre-branch whitespace cleanup via

tools/dev/remove-trailing-whitespace.zsh

There should be no functional changes.

* .ycm_extra_conf.py

* build/generator/gen_win.py

* build/generator/gen_win_dependencies.py

* subversion/bindings/javahl/native/EditorProxy.h

* subversion/bindings/javahl/native/StateReporter.cpp

* subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigImpl_Category.cpp

* subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c

* subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h

* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c

* subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c

* subversion/bindings/swig/ruby/test/test_fs.rb

* subversion/bindings/swig/ruby/test/util.rb

* subversion/bindings/swig/ruby/test/windows_util.rb

* subversion/include/private/svn_fs_fs_private.h

* subversion/include/private/svn_packed_data.h

* subversion/include/private/svn_repos_private.h

* subversion/include/private/svn_sorts_private.h

* subversion/include/private/svn_subr_private.h

* subversion/include/private/svn_wc_private.h

* subversion/include/svn_auth.h

* subversion/include/svn_cache_config.h

* subversion/include/svn_client.h

* subversion/include/svn_cmdline.h

* subversion/include/svn_diff.h

* subversion/include/svn_fs.h

* subversion/include/svn_io.h

* subversion/include/svn_ra.h

* subversion/include/svn_repos.h

* subversion/include/svn_string.h

* subversion/libsvn_client/blame.c

* subversion/libsvn_client/commit.c

* subversion/libsvn_client/commit_util.c

* subversion/libsvn_client/copy.c

* subversion/libsvn_client/diff.c

* subversion/libsvn_client/externals.c

* subversion/libsvn_client/log.c

* subversion/libsvn_client/patch.c

* subversion/libsvn_client/ra.c

* subversion/libsvn_client/update.c

* subversion/libsvn_delta/svndiff.c

* subversion/libsvn_diff/parse-diff.c

* subversion/libsvn_fs/fs-loader.c

* subversion/libsvn_fs_base/lock.c

* subversion/libsvn_fs_fs/cached_data.c

* subversion/libsvn_fs_fs/fs_fs.c

* subversion/libsvn_fs_fs/hotcopy.c

* subversion/libsvn_fs_fs/id.c

* subversion/libsvn_fs_fs/index.c

* subversion/libsvn_fs_fs/index.h

* subversion/libsvn_fs_fs/lock.c

* subversion/libsvn_fs_fs/low_level.c

* subversion/libsvn_fs_fs/low_level.h

* subversion/libsvn_fs_fs/pack.c

* subversion/libsvn_fs_fs/recovery.c

* subversion/libsvn_fs_fs/rev_file.c

* subversion/libsvn_fs_fs/revprops.c

* subversion/libsvn_fs_fs/revprops.h

* subversion/libsvn_fs_fs/stats.c

* subversion/libsvn_fs_fs/transaction.c

* subversion/libsvn_fs_fs/tree.c

* subversion/libsvn_fs_fs/verify.c

* subversion/libsvn_fs_x/cached_data.c

* subversion/libsvn_fs_x/changes.c

* subversion/libsvn_fs_x/dag.h

* subversion/libsvn_fs_x/fs.h

* subversion/libsvn_fs_x/fs_id.c

* subversion/libsvn_fs_x/fs_x.c

* subversion/libsvn_fs_x/hotcopy.c

* subversion/libsvn_fs_x/hotcopy.h

* subversion/libsvn_fs_x/index.c

* subversion/libsvn_fs_x/index.h

* subversion/libsvn_fs_x/lock.c

* subversion/libsvn_fs_x/lock.h

* subversion/libsvn_fs_x/low_level.c

* subversion/libsvn_fs_x/low_level.h

* subversion/libsvn_fs_x/noderevs.c

* subversion/libsvn_fs_x/pack.c

* subversion/libsvn_fs_x/reps.c

* subversion/libsvn_fs_x/rev_file.c

* subversion/libsvn_fs_x/revprops.c

* subversion/libsvn_fs_x/revprops.h

* subversion/libsvn_fs_x/string_table.c

* subversion/libsvn_fs_x/string_table.h

* subversion/libsvn_fs_x/transaction.c

* subversion/libsvn_fs_x/tree.c

* subversion/libsvn_fs_x/util.c

* subversion/libsvn_fs_x/verify.c

* subversion/libsvn_ra_local/ra_plugin.c

* subversion/libsvn_ra_serf/ra_serf.h

* subversion/libsvn_ra_serf/serf.c

* subversion/libsvn_ra_serf/update.c

* subversion/libsvn_ra_serf/util.c

* subversion/libsvn_ra_svn/client.c

* subversion/libsvn_ra_svn/marshal.c

* subversion/libsvn_repos/authz_pool.c

* subversion/libsvn_repos/config_pool.c

* subversion/libsvn_repos/dump.c

* subversion/libsvn_repos/fs-wrap.c

* subversion/libsvn_repos/log.c

* subversion/libsvn_subr/bit_array.c

* subversion/libsvn_subr/cache-membuffer.c

* subversion/libsvn_subr/config.c

* subversion/libsvn_subr/dirent_uri.c

* subversion/libsvn_subr/fnv1a.c

* subversion/libsvn_subr/gpg_agent.c

* subversion/libsvn_subr/hash.c

* subversion/libsvn_subr/io.c

* subversion/libsvn_subr/object_pool.c

* subversion/libsvn_subr/packed_data.c

* subversion/libsvn_subr/prefix_string.c

* subversion/libsvn_subr/sorts.c

* subversion/libsvn_subr/sqlite.c

* subversion/libsvn_subr/subst.c

* subversion/libsvn_subr/sysinfo.c

* subversion/libsvn_subr/types.c

* subversion/libsvn_subr/utf.c

* subversion/libsvn_subr/utf8proc/utf8proc_data.c

* subversion/libsvn_subr/x509info.c

* subversion/libsvn_wc/diff.h

* subversion/libsvn_wc/props.c

* subversion/libsvn_wc/update_editor.c

* subversion/libsvn_wc/wc.h

* subversion/libsvn_wc/wc_db.c

* subversion/libsvn_wc/wc_db.h

* subversion/mod_dav_svn/lock.c

* subversion/mod_dav_svn/mod_dav_svn.c

* subversion/mod_dav_svn/status.c

* subversion/svn/auth-cmd.c

* subversion/svn/info-cmd.c

* subversion/svn/mergeinfo-cmd.c

* subversion/svn/notify.c

* subversion/svn/propget-cmd.c

* subversion/svn/svn.c

* subversion/svnadmin/svnadmin.c

* subversion/svnserve/logger.c

* subversion/svnserve/serve.c

* subversion/svnserve/server.h

* subversion/svnserve/svnserve.c

* subversion/tests/cmdline/blame_tests.py

* subversion/tests/cmdline/checkout_tests.py

* subversion/tests/cmdline/commit_tests.py

* subversion/tests/cmdline/export_tests.py

* subversion/tests/cmdline/externals_tests.py

* subversion/tests/cmdline/lock_tests.py

* subversion/tests/cmdline/merge_tests.py

* subversion/tests/cmdline/merge_tree_conflict_tests.py

* subversion/tests/cmdline/move_tests.py

* subversion/tests/cmdline/redirect_tests.py

* subversion/tests/cmdline/stat_tests.py

* subversion/tests/cmdline/svnadmin_tests.py

* subversion/tests/cmdline/switch_tests.py

* subversion/tests/cmdline/update_tests.py

* subversion/tests/libsvn_client/client-test.c

* subversion/tests/libsvn_client/mtcc-test.c

* subversion/tests/libsvn_fs/fs-test.c

* subversion/tests/libsvn_fs/locks-test.c

* subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test.c

* subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c

* subversion/tests/libsvn_fs_x/fs-x-pack-test.c

* subversion/tests/libsvn_fs_x/string-table-test.c

* subversion/tests/libsvn_ra/ra-test.c

* subversion/tests/libsvn_subr/cache-test.c

* subversion/tests/libsvn_subr/checksum-test.c

* subversion/tests/libsvn_subr/config-test.c

* subversion/tests/libsvn_subr/io-test.c

* subversion/tests/libsvn_subr/packed-data-test.c

* subversion/tests/libsvn_subr/priority-queue-test.c

* subversion/tests/libsvn_subr/sqlite-test.c

* subversion/tests/libsvn_subr/string-test.c

* subversion/tests/libsvn_subr/subst_translate-test.c

* subversion/tests/libsvn_subr/x509-test.c

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

* subversion/tests/svn_test_main.c

* tools/dev/benchmarks/RepoPerf/copy_repo.py

* tools/dev/benchmarks/RepoPerf/win_repo_bench.py

* tools/dev/build-svn-deps-win.pl

* tools/dev/fsfs-access-map.c

* tools/dev/po-merge.py

* tools/dev/x509-parser.c

* tools/diff/diff.c

* tools/dist/backport.pl

* tools/dist/backport_tests.py

* tools/hook-scripts/mailer/mailer.py

* tools/server-side/svnpubsub/daemonize.py

* win-tests.py

Remove unneeded whitespace via script.

  1. … 184 more files in changeset.
Various comment and docstring fixes related to DAG caching.

No functional change.

* subversion/libsvn_fs_fs/tree.c

(dag_node_cache_get): Remove reference to FS parameter that had been

dropped a long time ago. Fix comment indentation.

(dag_node_cache_set): Remove outdated comment.