libsvn_fs_util

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

Changeset 1727822 is being indexed.

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.
Perform runtime checks for the libsvn_fs_util version.

The various FS backends did not check the runtime version of the

utility library; this change makes the version checks more

complete and consistent.

* subversion/include/private/svn_fs_util.h: Include svn_version.h.

(svn_fs_util__version): Declare new private API.

* subversion/libsvn_fs_util/fs-util.c

(svn_fs_util__version): Implement.

* subversion/libsvn_fs_base/fs.c (svn_fs_base__init),

subversion/libsvn_fs_fs/fs.c (svn_fs_fs__init),

subversion/libsvn_fs_x/fs.c (svn_fs_x__init):

Add svn_fs_util__version to the version chec list.

  1. … 4 more files in changeset.
Minor consistency fix - even though the result returned by the previous

code was technically correct.

* subversion/libsvn_fs_util/fs-util.c

(svn_fs__path_change_create_internal): Unused copyfrom revs should be

initialized to -1 even if we

correctly default to "copyfrom

is unknown".

Following the availability of apr_hash_this_key() etc. in APR v1.5, use

these in Subversion code instead of svn__apr_hash_index_key() etc. Provide

substitutes only when APR is too old to provide them.

* subversion/include/svn_types.h,

subversion/libsvn_subr/iter.c

(svn__apr_hash_index_key,

svn__apr_hash_index_klen,

svn__apr_hash_index_val):

Rename to apr_hash_this_key, apr_hash_this_key_len, apr_hash_this_val.

Declare and define them only if APR is older than 1.5.

Everywhere else: track the renames.

  1. … 102 more files in changeset.
Kick off work on pkg-config support (issue #738, and also #4435).

pkg-config support allows API consumers on UNIX-like systems to link

to Subversion libraries without having to manually specify the correct

set of linker flags, including the particular flags for dependencies

required by a particular build of Subversion (bdb, serf, etc.).

pkg-config uses libsvn_foo.pc files which describe the set of flags

required to link to libsvn_foo.

See http://www.freedesktop.org/wiki/Software/pkg-config/ for more information.

Make gen-make.py produce .pc.in files for all Subversion libraries,

and make the configure script produce .pc files from these .pc.in files.

Dependency declarations and linker flags are based on information

parsed from build.conf.

Dependencies of Subversion which support pkg-config can be marked

as such in build.conf, allowing pkg-config to resolve them. The

name of the dependency's pkg-config script has to be specified

without the .pc extension, e.g.:

[gnome-keyring]

type = lib

external-lib = $(SVN_GNOME_KEYRING_LIBS)

pkg-config = gnome-keyring-1

Dependencies not aware of pkg-config are added to linker flags directly.

To illustrate, the generated libsvn_client.pc file on my system contains:

[[[

prefix=/home/stsp/svn/prefix/svn-trunk

exec_prefix=${prefix}

libdir=${exec_prefix}/lib

includedir=${prefix}/include

Name: libsvn_client

Description: Subversion Client Library

Version: 1.9.0

Required: apr-1

Required.private:

Libs: -L${libdir} -lsvn_wc -lsvn_ra -lsvn_delta -lsvn_diff -lsvn_subr

Cflags: -I${includedir}

]]]

There is no support for optional dependencies between Subversion libraries

yet, however. For instance, libsvn_client might or might not be linked to

libsvn_ra_serf. Such dependencies are currently omitted. Also, I'm not

sure yet what to do in cases where a dependency might be statically or

dynamically linked, e.g. sqlite.

The .pc files are not being installed yet. I don't want to expose these

files to systems using pkg-config until all outstanding issues are resolved.

* build/generator/gen_make.py

(Generator.write): Generate .pc.in files.

(Generator.write_pkg_config_dot_in_files): New helper function.

* build/generator/templates/pkg-config.in.ezt: New file, the .pc.in template.

* build.conf: apr, apr-util, serf, gnome-keyring, and sqlite support pkg-config.

There may be others (kwallet?) but I haven't investiged more yet.

I also haven't checked yet if all versions of these dependencies support

pkg-config. The most recent versions do support it.

* configure.ac

(SVN_APR_MAJOR_VERSION): Declare. APR's major version number is needed

to select the correct pkg-config script name (e.g. apr-1 or apr-2).

Generate .pc files from pc.in files.

* subversion/libsvn_auth_gnome_keyring, subversion/libsvn_auth_kwallet,

subversion/libsvn_client, subversion/libsvn_delta, subversion/libsvn_diff,

subversion/libsvn_fs, subversion/libsvn_fs_base, subversion/libsvn_fs_fs,

subversion/libsvn_fs_util, subversion/libsvn_fs_x, subversion/libsvn_ra,

subversion/libsvn_ra_local, subversion/libsvn_ra_serf,

subversion/libsvn_ra_svn, subversion/libsvn_repos, subversion/libsvn_subr,

subversion/libsvn_wc: Ignore generated .pc and .pc.in files.

  1. … 20 more files in changeset.
Improve the accuracy of the "Have props/contents changed between two nodes?"

check for all three backends.

First, we consider props / text contents as equal whenever the same physical

representation is being used - even if the uniquifiers differ. There is no

such test for directories and it is not needed by any API, ATM. Secondly,

file contents is considered equal when the SHA1 checksums match (same as in

the working copy). We also compare the MD5 checksums as they are always

available and offer a quick mismatch test.

Lastly, if the SHA1 is not available, we actually compare the reconstructed

fulltexts - but only if the caller requires a strict equality test with no

false negatives. The FS API currently calls the internal functionality in

non-strict, i.e. "quick check" mode.

Property lists use a similar checking scheme. However, we limit the test to

MD5 (FSFS, FSX only) and use a fulltext comparison in strict mode only if

MD5s are not available. As a side-effect of the extra accuracy, the commit

conflict detection / merge code in non-BDB now allows for equal directory

property lists to be committed to the same node in concurrent transactions

without creating a conflict.

The BDB implementation is the most straightforward of the three backends

because the respective function are directly at the vtable level. We simply

add checksum and fulltext comparison as needed.

In FSFS, the actual comparison lies deeper in the caller hierarchy and is

being used by other functions as well. We need to replace the generic "is

the rep equal" test by two tests, one for each kind of representation. They

will then perform similar tests as in BDB but with more callers to update.

The prop comparison will also use the MD5 checksums when available.

The FSX code has the same structure as FSFS but it does need to cater for

legacy data. Therefore, the file contents check is much simpler and can

always use the MD5 + SHA1 checksums.

* subversion/include/private/svn_fs_util.h

(svn_fs__prop_lists_equal): Declare new private contents comparison API.

* subversion/libsvn_fs_util/fs-util.c

(svn_fs__prop_lists_equal): Implement it.

* subversion/libsvn_fs_base/dag.c

(svn_fs_base__things_different): Ignore uniquifier since we are only

interested in actual content differences.

* subversion/libsvn_fs_base/tree.c

(things_changed_args): Add the STRICT option to our parameter set.

(txn_body_props_changed,

txn_body_contents_changed): Add more comparisons to eliminate false

positives as described above.

(base_props_changed,

base_contents_changed): FS API implementation is currently non-strict.

* subversion/libsvn_fs_fs/fs_fs.h

(svn_fs_fs__noderev_same_rep_key): Drop old test function.

(svn_fs_fs__file_text_rep_equal,

svn_fs_fs__prop_rep_equal): Introduce separate APIs for different types

of representations; provide more context

such that we may query missing information.

* subversion/libsvn_fs_fs/fs_fs.c

(svn_fs_fs__noderev_same_rep_key): Drop old test function.

(svn_fs_fs__file_text_rep_equal,

svn_fs_fs__prop_rep_equal): Implement.

* subversion/libsvn_fs_fs/dag.h

(svn_fs_fs__dag_things_different): Add STRICT option and provide a pool

for FS queries as needed.

* subversion/libsvn_fs_fs/dag.c

(svn_fs_fs__dag_things_different): Update implementation to call the new

comparison functions.

* subversion/libsvn_fs_fs/tree.c

(fs_props_changed,

fs_contents_changed): Update callers and use non-strict mode for these

FS API functions.

(merge): Adapt to API change and force strict prop comparison to prevent

unnecessary conflicts.

* subversion/libsvn_fs_x/fs_x.h

(svn_fs_x__noderev_same_rep_key): Drop old test function.

(svn_fs_x__file_text_rep_equal): Similar to FSFS but with a simpler

signature because there is no need to

query for addition data.

svn_fs_x__prop_rep_equal): Similar to FSFS.

* subversion/libsvn_fs_x/fs_x.c

(svn_fs_x__noderev_same_rep_key): Drop old test function.

(svn_fs_x__file_text_rep_equal,

svn_fs_x__prop_rep_equal): Implement.

* subversion/libsvn_fs_x/dag.h

(svn_fs_x__dag_things_different): Change similarly as FSFS.

* subversion/libsvn_fs_x/dag.c

(svn_fs_x__dag_things_different): Ditto.

* subversion/libsvn_fs_x/tree.c

(x_props_changed,

merge,

x_contents_changed): Ditto.

  1. … 13 more files in changeset.
Speed up 'svn log -g' to almost the same speed as 'svn log'. Also, provide

a basis for speeding up other mergeinfo detection based code.

The problem is that svn_fs_path_change2_t used to report mergeinfo changes

as simple prop changes. Since most files are being created with default

props attached to them, this creates a lot of unnecessary property read

and comparison operations.

The idea is to a derive a mergeinfo-mod flag from the FS propset function

and store that in FSFS f7+ repositories (FSX will follow later). An extended

svn_fs_path_change2_t makes the information visible to the user.

* subversion/include/svn_fs.h

(svn_fs_path_change2_t): Add mergeinfo-mod as a tristate since we don't

have that information in old repositories.

* subversion/libsvn_fs_util/fs-util.c

(svn_fs__path_change_create_internal): Make sure the new member is always

initialized properly.

* subversion/libsvn_repos/log.c

(fs_mergeinfo_changed): Use the new information to skip unnecessary node

prop processing.

* subversion/libsvn_fs_fs/structure

(): Extend documentation to cover the new flag as well.

* subversion/libsvn_fs_fs/fs.h

(SVN_FS_FS__MIN_MERGEINFO_IN_CHANGES_FORMAT): New format capability flag.

* subversion/libsvn_fs_fs/low_level.c

(read_change): Detect the presense of the mergeinfo-mod flag and parse

it if found.

(write_change_entry): Write the mergeinfo-mod flag dependent on whether

its value is known and the new INCLUDE_MERGEINFO_MODS

parameter has been set.

(svn_fs_fs__write_changes): Include mergeinfo-mod only if supported by

the current FS format.

* subversion/libsvn_fs_fs/transaction.h

(svn_fs_fs__add_change): Add mergeinfo-mod parameter.

* subversion/libsvn_fs_fs/transaction.c

(replace_change): Copy mergeinfo-mod info as well.

(fold_change): Combine mergeinfo-mod info as well.

(svn_fs_fs__add_change): Store mergeinfo-mod info as well.

* subversion/libsvn_fs_fs/tree.c

(add_change): Add mergeinfo-mod pass-through parameter.

(fs_change_node_prop): Determine whether merge info was touched.

(fs_make_dir,

fs_delete_node,

copy_helper,

fs_make_file,

apply_textdelta,

apply_text): These never modify mergeinfo.

  1. … 8 more files in changeset.
Merge revisions 1511324,-46,-63,-64,1532410,1535668 from the "log

addressing" branch into /trunk and resolved trivial text conflicts.

These patches introduce the svn_fs__compatible_version() API and

use it where appropriate.

  1. … 10 more files in changeset.
Fix the #include order such that svn_private_config.h is always

included first before any other svn header - if we also include

svn_hash.h.

* subversion/bindings/javahl/native/org_apache_subversion_javahl_ConfigImpl_Category.cpp,

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

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

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

subversion/libsvn_auth_gnome_keyring/gnome_keyring.c,

subversion/libsvn_client/add.c,

subversion/libsvn_client/cat.c,

subversion/libsvn_client/changelist.c,

subversion/libsvn_client/cleanup.c,

subversion/libsvn_client/commit.c,

subversion/libsvn_client/commit_util.c,

subversion/libsvn_client/copy.c,

subversion/libsvn_client/copy_foreign.c,

subversion/libsvn_client/ctx.c,

subversion/libsvn_client/delete.c,

subversion/libsvn_client/deprecated.c,

subversion/libsvn_client/diff.c,

subversion/libsvn_client/diff_local.c,

subversion/libsvn_client/diff_summarize.c,

subversion/libsvn_client/export.c,

subversion/libsvn_client/externals.c,

subversion/libsvn_client/import.c,

subversion/libsvn_client/info.c,

subversion/libsvn_client/iprops.c,

subversion/libsvn_client/list.c,

subversion/libsvn_client/locking_commands.c,

subversion/libsvn_client/log.c,

subversion/libsvn_client/merge.c,

subversion/libsvn_client/mergeinfo.c,

subversion/libsvn_client/patch.c,

subversion/libsvn_client/prop_commands.c,

subversion/libsvn_client/ra.c,

subversion/libsvn_client/repos_diff.c,

subversion/libsvn_client/resolved.c,

subversion/libsvn_client/revert.c,

subversion/libsvn_client/status.c,

subversion/libsvn_client/switch.c,

subversion/libsvn_client/update.c,

subversion/libsvn_client/util.c,

subversion/libsvn_delta/compat.c,

subversion/libsvn_delta/xdelta.c,

subversion/libsvn_diff/parse-diff.c,

subversion/libsvn_diff/util.c,

subversion/libsvn_fs/access.c,

subversion/libsvn_fs_base/bdb/changes-table.c,

subversion/libsvn_fs_base/bdb/env.c,

subversion/libsvn_fs_base/dag.c,

subversion/libsvn_fs_base/fs.c,

subversion/libsvn_fs_base/lock.c,

subversion/libsvn_fs_base/revs-txns.c,

subversion/libsvn_fs_base/tree.c,

subversion/libsvn_fs_fs/caching.c,

subversion/libsvn_fs_fs/fs_fs.c,

subversion/libsvn_fs/fs-loader.c,

subversion/libsvn_fs_fs/lock.c,

subversion/libsvn_fs_fs/temp_serializer.c,

subversion/libsvn_fs_fs/tree.c,

subversion/libsvn_fs_util/fs-util.c,

subversion/libsvn_ra/compat.c,

subversion/libsvn_ra/deprecated.c,

subversion/libsvn_ra_local/ra_plugin.c,

subversion/libsvn_ra/ra_loader.c,

subversion/libsvn_ra_serf/blame.c,

subversion/libsvn_ra_serf/blncache.c,

subversion/libsvn_ra_serf/commit.c,

subversion/libsvn_ra_serf/getlocations.c,

subversion/libsvn_ra_serf/getlocationsegments.c,

subversion/libsvn_ra_serf/getlocks.c,

subversion/libsvn_ra_serf/inherited_props.c,

subversion/libsvn_ra_serf/log.c,

subversion/libsvn_ra_serf/merge.c,

subversion/libsvn_ra_serf/mergeinfo.c,

subversion/libsvn_ra_serf/options.c,

subversion/libsvn_ra_serf/property.c,

subversion/libsvn_ra_serf/replay.c,

subversion/libsvn_ra_serf/serf.c,

subversion/libsvn_ra_serf/update.c,

subversion/libsvn_ra_serf/util.c,

subversion/libsvn_ra_serf/xml.c,

subversion/libsvn_ra_svn/client.c,

subversion/libsvn_ra_svn/editorp.c,

subversion/libsvn_ra_svn/marshal.c,

subversion/libsvn_repos/authz.c,

subversion/libsvn_repos/commit.c,

subversion/libsvn_repos/delta.c,

subversion/libsvn_repos/deprecated.c,

subversion/libsvn_repos/fs-wrap.c,

subversion/libsvn_repos/hooks.c,

subversion/libsvn_repos/log.c,

subversion/libsvn_repos/replay.c,

subversion/libsvn_repos/reporter.c,

subversion/libsvn_repos/repos.c,

subversion/libsvn_repos/rev_hunt.c,

subversion/libsvn_subr/auth.c,

subversion/libsvn_subr/cmdline.c,

subversion/libsvn_subr/compat.c,

subversion/libsvn_subr/config_auth.c,

subversion/libsvn_subr/config.c,

subversion/libsvn_subr/deprecated.c,

subversion/libsvn_subr/dso.c,

subversion/libsvn_subr/hash.c,

subversion/libsvn_subr/io.c,

subversion/libsvn_subr/mergeinfo.c,

subversion/libsvn_subr/opt.c,

subversion/libsvn_subr/properties.c,

subversion/libsvn_subr/simple_providers.c,

subversion/libsvn_subr/sorts.c,

subversion/libsvn_subr/ssl_client_cert_providers.c,

subversion/libsvn_subr/ssl_client_cert_pw_providers.c,

subversion/libsvn_subr/ssl_server_trust_providers.c,

subversion/libsvn_subr/subst.c,

subversion/libsvn_subr/types.c,

subversion/libsvn_subr/username_providers.c,

subversion/libsvn_subr/utf.c,

subversion/libsvn_subr/win32_crypto.c,

subversion/libsvn_wc/adm_crawler.c,

subversion/libsvn_wc/adm_files.c,

subversion/libsvn_wc/adm_ops.c,

subversion/libsvn_wc/conflicts.c,

subversion/libsvn_wc/copy.c,

subversion/libsvn_wc/deprecated.c,

subversion/libsvn_wc/diff_editor.c,

subversion/libsvn_wc/diff_local.c,

subversion/libsvn_wc/entries.c,

subversion/libsvn_wc/externals.c,

subversion/libsvn_wc/info.c,

subversion/libsvn_wc/lock.c,

subversion/libsvn_wc/node.c,

subversion/libsvn_wc/old-and-busted.c,

subversion/libsvn_wc/props.c,

subversion/libsvn_wc/revert.c,

subversion/libsvn_wc/status.c,

subversion/libsvn_wc/translate.c,

subversion/libsvn_wc/update_editor.c,

subversion/libsvn_wc/upgrade.c,

subversion/libsvn_wc/wc_db.c,

subversion/libsvn_wc/wc_db_update_move.c,

subversion/libsvn_wc/wc_db_wcroot.c,

subversion/libsvn_wc/workqueue.c,

subversion/mod_dav_svn/activity.c,

subversion/mod_dav_svn/deadprops.c,

subversion/mod_dav_svn/lock.c,

subversion/mod_dav_svn/merge.c,

subversion/mod_dav_svn/mod_dav_svn.c,

subversion/mod_dav_svn/reports/update.c,

subversion/mod_dav_svn/repos.c,

subversion/mod_dav_svn/version.c,

subversion/svnadmin/svnadmin.c,

subversion/svnauth/svnauth.c,

subversion/svn/cl-conflicts.c,

subversion/svn/commit-cmd.c,

subversion/svn/conflict-callbacks.c,

subversion/svn/diff-cmd.c,

subversion/svn/help-cmd.c,

subversion/svnlook/svnlook.c,

subversion/svnmucc/svnmucc.c,

subversion/svn/notify.c,

subversion/svn/propedit-cmd.c,

subversion/svn/propget-cmd.c,

subversion/svn/props.c,

subversion/svnrdump/dump_editor.c,

subversion/svnrdump/svnrdump.c,

subversion/svnrdump/util.c,

subversion/svnserve/serve.c,

subversion/svn/status.c,

subversion/svn/status-cmd.c,

subversion/svn/svn.c,

subversion/svnsync/svnsync.c,

subversion/svnsync/sync.c,

subversion/svn/util.c,

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

subversion/tests/libsvn_repos/repos-test.c,

subversion/tests/libsvn_subr/hashdump-test.c,

subversion/tests/libsvn_subr/mergeinfo-test.c,

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

subversion/tests/libsvn_wc/conflict-data-test.c,

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

subversion/tests/libsvn_wc/wc-test.c,

subversion/tests/svn_test_fs.c,

tools/dev/fsfs-reorg.c,

tools/server-side/fsfs-stats.c): #include svn_private_config.h first

  1. … 180 more files in changeset.
Use svn_hash_gets and svn_hash_sets.

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

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

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

* subversion/libsvn_auth_gnome_keyring/gnome_keyring.c

* subversion/libsvn_client/commit.c

* subversion/libsvn_delta/compat.c

* subversion/libsvn_delta/editor.c

* subversion/libsvn_diff/parse-diff.c

* subversion/libsvn_diff/util.c

* subversion/libsvn_fs/access.c

* subversion/libsvn_fs_base/bdb/changes-table.c

* subversion/libsvn_fs_base/dag.c

* subversion/libsvn_fs_base/fs.c

* subversion/libsvn_fs_base/lock.c

* subversion/libsvn_fs_base/revs-txns.c

* subversion/libsvn_fs_base/tree.c

* subversion/libsvn_fs_fs/fs_fs.c

* subversion/libsvn_fs_fs/lock.c

* subversion/libsvn_fs_fs/temp_serializer.c

* subversion/libsvn_fs_fs/tree.c

* subversion/libsvn_fs_util/fs-util.c

* subversion/libsvn_ra/compat.c

* subversion/libsvn_ra/deprecated.c

* subversion/libsvn_ra/ra_loader.c

* subversion/libsvn_ra_local/ra_plugin.c

* subversion/libsvn_ra_serf/blame.c

* subversion/libsvn_ra_serf/blncache.c

* subversion/libsvn_ra_serf/commit.c

* subversion/libsvn_ra_serf/getlocations.c

* subversion/libsvn_ra_serf/getlocationsegments.c

* subversion/libsvn_ra_serf/getlocks.c

* subversion/libsvn_ra_serf/inherited_props.c

* subversion/libsvn_ra_serf/log.c

* subversion/libsvn_ra_serf/merge.c

* subversion/libsvn_ra_serf/mergeinfo.c

* subversion/libsvn_ra_serf/options.c

* subversion/libsvn_ra_serf/property.c

* subversion/libsvn_ra_serf/serf.c

* subversion/libsvn_ra_serf/update.c

* subversion/libsvn_ra_serf/util.c

* subversion/libsvn_ra_serf/xml.c

* subversion/libsvn_ra_svn/client.c

* subversion/libsvn_ra_svn/editorp.c

* subversion/libsvn_ra_svn/marshal.c

* subversion/mod_dav_svn/activity.c

* subversion/mod_dav_svn/lock.c

* subversion/mod_dav_svn/merge.c

* subversion/mod_dav_svn/reports/update.c

* subversion/mod_dav_svn/repos.c

* subversion/mod_dav_svn/version.c

* subversion/svn/cl-conflicts.c

* subversion/svn/commit-cmd.c

* subversion/svn/conflict-callbacks.c

* subversion/svn/help-cmd.c

* subversion/svn/propedit-cmd.c

* subversion/svn/propget-cmd.c

* subversion/svn/status-cmd.c

* subversion/svn/status.c

* subversion/svn/svn.c

* subversion/svn/util.c

* subversion/svnadmin/svnadmin.c

* subversion/svndumpfilter/svndumpfilter.c

* subversion/svnlook/svnlook.c

* subversion/svnmucc/svnmucc.c

* subversion/svnrdump/dump_editor.c

* subversion/svnrdump/load_editor.c

* subversion/svnrdump/svnrdump.c

* subversion/svnrdump/util.c

* subversion/svnserve/serve.c

* subversion/svnsync/svnsync.c

* subversion/svnsync/sync.c

  1. … 70 more files in changeset.
For now (1.8), make svn_fs__canonicalize_abspath always allocate the result

in POOL and re-introduce svn_fs__is_canonical_abspath as a way of checking

that the path content would change.

In the future (1.9), we will hopefully be able to rev the FS API layer and

eliminate the need for canonicalization with the FS implementation.

* subversion/include/private/svn_fs_util.h

(svn_fs__is_canonical_abspath): re-introduce

(svn_fs__canonicalize_abspath): update docstring

* subversion/libsvn_fs_util/fs-util.c

(svn_fs__is_canonical_abspath): implement

(svn_fs__canonicalize_abspath): always duplicate PATH; optimize string

termination code

* subversion/libsvn_fs_fs/tree.c

(open_path,

get_dag): update

Suggested by: cmpilato

  1. … 2 more files in changeset.
* subversion/libsvn_fs_util/fs-util.c

(is_canonical_abspath): Tweak docs, following r1448820.

Follow-up to 1448810: fix canonicalization check for paths containing

a single character and update two indirect callers of open_path.

* subversion/libsvn_fs_fs/tree.c

(fs_copy,

fs_revision_link): ensure canonical path parameters

* subversion/libsvn_fs_util/fs-util.c

(is_canonical_abspath): fix canonicalization check for single-char paths

  1. … 1 more file in changeset.
Follow-up to r1442088: revise the use of open_path() and make

it require canonical values for PATH. Eliminate the need for

svn_fs__is_canonical_abspath and consequently drop that function.

It is now an internal optimization in svn_fs__canonicalize_abspath.

All callers of svn_fs__canonicalize_abspath have been checked

whether simply returning PATH is o.k.

* subversion/include/private/svn_fs_util.h

(svn_fs__is_canonical_abspath): drop

(svn_fs__canonicalize_abspath): state we may simply return PATH.

* subversion/libsvn_fs_util/fs-util.c

(svn_fs__is_canonical_abspath): rename and simplify to ...

(is_canonical_abspath): ... this new version

(svn_fs__canonicalize_abspath): before doing expensive operations,

check whether canonicalization is necessary

* subversion/libsvn_fs_fs/tree.c

(open_path_is_canonical): drop

(open_path_node_only): renumber

(open_path): assert() PATH parameter to be canonical

(get_dag,

fs_change_node_prop,

fs_make_dir,

fs_delete_node,

fs_make_file,

fs_apply_textdelta,

fs_apply_text,

fs_closest_copy,

assemble_history,

get_mergeinfo_for_path_internal): update direct and indirect

callers ensuring PATH is canonical

Suggested by: julianfoad

  1. … 2 more files in changeset.
Merge first batch of changes from the 10Gb branch. These are all

internal optimizations, i.e. no UI or public API changes.

This comprises the following change sets:

* Make membuffer cache keep more of the "important" objects.

The /trunk code has flaws and inefficiencies that prevent

the cache from keeping as much data as it could.

[subversion/libsvn_subr/cache-membuffer.c]

r1388810: improve cache retention rate in overload situations.

r1390407: fix a membuffer cache effectiveness issue. The

lower part of the group index was always identical

to the cache segment index. I.e. most groups would

not be used at all causing the used ones to overflow

quickly.

* Add a 1st level cache for DAG nodes that can just hand out

the nodes without the need to (de-)serialize, copy or sync data.

The actual implementation can be found here:

[subversion/libsvn_fs_fs/fs.h

subversion/libsvn_fs_fs/tree.h

subversion/libsvn_fs_fs/caching.c

subversion/libsvn_fs_fs/tree.c]

r1388654: Implement a 1st level cache for DAG nodes as they are

the most frequently accessed data object in FSFS.

Also, access to them tends to have high locality.

r1388801: Make 1st level DAG node cache more effective. We may

attempt lookups with *any* non-empty path.

Supporting changes and additions:

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

subversion/include/private/svn_fs_util.h

subversion/libsvn_fs_util/fs-util.c

subversion/libsvn_fs_fs/tree.c]

r1388636: Fix a pool usage issue in fs-test.

r1388644: Introduce a new utility method that determines whether

svn_fs__canonicalize_abspath must be called for a given

path.

r1389276: prevent unnecessary canonicalization.

* Checkout, export and update often send deltas against empty bases.

Provide an optimized implementation for that case and invoke it

from the generic window_handler().

[subversion/libsvn_delta/svndiff.c]

r1388394: provide optimized version of window_handler for the

frequent case of an empty source window.

r1388805: make the optimized code path for deltas against empty

source stream handle all headers and write them with a

single call to the output stream.

* Speed up the reporting of properties in similar cases.

[subversion/libsvn_repos/reporter.c]

r1388795: When reporting changed properties against an empty

source or a source with no properties, there is no

need for calculating a diff between both lists.

Also, reduce general computational overhead.

* Speed up cache access by using fixed-size keys.

[subversion/libsvn_fs_fs/fs.h

subversion/libsvn_fs_fs/caching.c

subversion/libsvn_fs_fs/fs_fs.c]

r1388720: instead of variable length keys use fixed length structs

as keys for the revprop and fulltext caches. Those keys

don't require intermediate strings to be constructed and

are faster to process on the cache side.

* Introduce a node property cache (similar to any other cache

in FSFS).

[subversion/libsvn_fs_fs/fs.h

subversion/libsvn_fs_fs/caching.c

subversion/libsvn_fs_fs/fs_fs.c]

r1388789: Cache node properties in their parsed state instead

of just the plain full-text. temp_(de-)serialization

is much faster then parsing from a generic stream.

* [subversion/libsvn_fs_fs/fs_fs.c]

r1388639: minor optimization.

  1. … 12 more files in changeset.
Add an 'svn_rangelist_t' typedef for use with the existing 'svn_rangelist_*'

APIs, instead of using 'apr_array_header_t' directly.

The immediate reason is to improve the debugging experience: I can make

GDB display 'svn_rangelist_t' values in a simple human-readable form, whereas

the best it can do with 'apr_array_header_t', not knowing the type of the

elements, is print something like 'array of 2 items'.

Beyond that, it makes sense from a coding abstraction point of view, filling

a gap in this hierarchy:

svn_mergeinfo_catalog_t is a collection of

svn_mergeinfo_t is a collection of

svn_rangelist_t is a collection of

svn_merge_range_t

This type has public visibility. Because it is just a typedef, the C API

will be backward-compatible and the ABI won't change. Therefore all uses,

even in deprecated functions, are being changed.

Using such a typedef doesn't provide any additional static type-checking.

Unlike svn_mergeinfo_t and svn_mergeinfo_catalog_t, svn_rangelist_t is not a

pointer type.

* subversion/include/svn_mergeinfo.h

(svn_rangelist_t): New typedef.

(...everywhere...): Use it.

* subversion/include/private/svn_mergeinfo_private.h

(...everywhere...): Use it.

* subversion/include/svn_client.h

(svn_client_mergeinfo_get_merged): Update doc string to refer to this.

* subversion/bindings/javahl/native/CreateJ.cpp,

subversion/bindings/javahl/native/CreateJ.h,

subversion/bindings/javahl/native/SVNClient.cpp,

subversion/bindings/swig/core.i,

subversion/bindings/swig/include/svn_containers.swg,

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

(...everywhere...): Update the bindings.

subversion/libsvn_client/diff.c,

subversion/libsvn_client/merge.c,

subversion/libsvn_client/mergeinfo.c,

subversion/libsvn_client/mergeinfo.h,

subversion/libsvn_client/ra.c,

subversion/libsvn_fs_util/fs-util.c,

subversion/libsvn_repos/load-fs-vtable.c,

subversion/libsvn_repos/log.c,

subversion/libsvn_repos/rev_hunt.c,

subversion/libsvn_subr/deprecated.c,

subversion/libsvn_subr/mergeinfo.c,

subversion/svndumpfilter/main.c,

subversion/svnrdump/load_editor.c,

subversion/tests/libsvn_subr/mergeinfo-test.c

(...everywhere...): Use it.

  1. … 22 more files in changeset.
Store UUID in svn_fs_t rather than in FSAP_DATA. This is a cleaner

implementation of what r1330932 implements in a less robust manner.

Suggested by: gstein

(the particular 'cleaner implementation')

Update libsvn_fs:

* subversion/libsvn_fs/fs-loader.h

(fs_vtable_t.get_uuid): Remove this member, with comment.

(svn_fs_t.uuid): New struct member.

* subversion/libsvn_fs/fs-loader.c

(svn_fs_get_uuid): Track new location of UUID.

Update FSFS for the new location:

* subversion/libsvn_fs_fs/fs_fs.h,

subversion/libsvn_fs_fs/fs_fs.c:

(svn_fs_fs__get_uuid): Delete this function. It is subsumed into

svn_fs_fs__open() and svn_fs_fs__create().

* subversion/libsvn_fs_fs/caching.c

(svn_fs_fs__initialize_caches, svn_fs_fs__initialize_txn_caches):

* subversion/libsvn_fs_fs/fs.c

(fs_serialized_init):

* subversion/libsvn_fs_fs/fs_fs.c

(svn_fs_fs__open, hotcopy_incremental_check_preconditions,

hotcopy_incremental_check_preconditions, svn_fs_fs__set_uuid):

* subversion/libsvn_fs_fs/tree.c

(fs_same_p):

Track new location of UUID.

* subversion/libsvn_fs_fs/fs.c

(fs_vtable): Drop GET_UUID() member.

* subversion/libsvn_fs_fs/fs.h

(fs_fs_data_t.uuid): Remove this member.

Update BDB for the new location:

* subversion/libsvn_fs_base/fs.c

(populate_opened_fs): New function.

(base_create, base_upgrade): Call it to populate svn_fs_t->uuid.

* subversion/libsvn_fs_base/uuid.h

(svn_fs_base__get_uuid): Rename to..

(svn_fs_base__populate_uuid): .. this, and change signature.

* subversion/libsvn_fs_base/uuid.c

(svn_fs_base__get_uuid): Rename to..

(svn_fs_base__populate_uuid): .. this, and adapt to the new signature.

* subversion/libsvn_fs_base/tree.c

(fs_same_p):

* subversion/libsvn_fs_base/uuid.c

(svn_fs_base__set_uuid):

Track new location of UUID.

* subversion/libsvn_fs_base/fs.c

(fs_vtable): Drop GET_UUID() member.

* subversion/libsvn_fs_base/fs.h

(base_fs_data_t.uuid): Remove this member.

Revert r1330932:

* subversion/libsvn_fs/fs-loader.c

(cache_uuid): Remove this function.

(svn_fs_open, svn_fs_create): Update callers.

(svn_fs_open_berkeley, svn_fs_create_berkeley): Update callers.

* subversion/libsvn_fs_util/fs-util.c

(svn_fs__identifier): Remove.

* subversion/include/private/svn_fs_util.h

(svn_fs__identifier): Reimplement as a macro. It will be removed in the

next revision.

  1. … 14 more files in changeset.
Don't leak the repository path to clients.

Suggested by: ivan

* subversion/include/private/svn_fs_util.h,

subversion/libsvn_fs_util/fs-util.c:

(svn_fs__identifier): New function.

* subversion/libsvn_fs/fs-loader.c

(svn_fs_get_uuid): Add cross-refernce.

* subversion/include/private/svn_fs_util.h

(SVN_FS__ALREADY_EXISTS, SVN_FS__ERR_NOT_MUTABLE, SVN_FS__ERR_NOT_FILE,

SVN_FS__ERR_NO_SUCH_LOCK, SVN_FS__ERR_NO_USER):

Log the filesystem UUID instead of diskpath.

  1. … 2 more files in changeset.
Factor out a function.

* subversion/include/private/svn_fs_util.h,

subversion/libsvn_fs_util/fs-util.c

(svn_fs__append_to_merged_froms): New, factored out of libsvn_fs_*/tree.c.

* subversion/libsvn_fs_base/tree.c

(append_to_merged_froms): Removed.

(txn_body_get_mergeinfo_for_path): Adjust caller.

* subversion/libsvn_fs_fs/tree.c

(append_to_merged_froms): Removed.

(get_mergeinfo_for_path): Adjust caller.

  1. … 3 more files in changeset.
Moving membuffer cache related configuration code from deep inside the FS

layer to the svn utilities where all other cache related code lives.

Details on the discussion can be found here:

http://svn.haxx.se/dev/archive-2011-04/0169.shtml

To minimize the risks of breaking builds on other platforms, library

dependencies will be cleaned up in a follow-up commit.

* subversion/include/private/svn_fs_private.h

(svn_fs__get_global_membuffer_cache): remove here

* subversion/include/private/svn_cache.h

(svn_cache__get_global_membuffer_cache): rename and move it to here

* subversion/include/svn_fs.h

(svn_fs_cache_config_t, svn_fs_get_cache_config, svn_fs_set_cache_config):

remove here

* subversion/include/svn_cache_config.h

(svn_cache_config_t, svn_get_cache_config, svn_set_cache_config):

rename and move them to this new header file; adapt docstrings

* subversion/libsvn_fs_util/caching.c

move to:

* subversion/libsvn_subr/svn_cache_config.c

(svn_cache_config_t, svn_get_cache_config, svn_set_cache_config):

rename

* subversion/libsvn_fs_fs/caching.c

(svn_fs_fs__initialize_caches, svn_fs_fs__initialize_txn_caches):

adapt to renamed API functions

* subversion/libsvn_ra/ra_loader.c

(svn_ra_initialize): remove cache config code

* subversion/svn/main.c

(main): move it here and adapt it to renamed API

* subversion/svnadmin/main.c

(#includes): include svn_cache_config.h instead of svn_fs.h

(main): adapt to renamed API functions and structures

* subversion/svnserve/main.c

(#includes, main): dito

* build.conf

(libsvn_subr): add the new svn_cache_config.h header to the DLL exports

  1. … 11 more files in changeset.
LINUX and possibly other OS will over-commit memory. I.e. actual

memory pages allocation will be deferred to the time of the first

access. As a result, the application may simply segfault later.

Therefore, ensure that the membuffer creation actually allocates

memory pages. Also, free the whole cache memory if allocation

of some parts failed. Continue with the cache disabled in that case.

* subversion/libsvn_fs_util/caching.c

(svn_fs__get_global_membuffer_cache): if cache creation fails,

actually free the previously allocated memory

* subversion/libsvn_subr/cache-membuffer.c

(secure_aligned_pcalloc): replacement for apr_pcalloc that will

not crash upon OOM

(svn_cache__membuffer_cache_create): ensure that memory

gets actually allocated despite of overcommitment by the OS;

don't try to continue upon OOM

  1. … 1 more file in changeset.
Explain why the defaults caching settings have been chosen that way.

* subversion/libsvn_fs_util/caching.c

(cache_settings): add extensive commentary to the default values

Followup to r1067687, fix massive memory use.

* subversion/libsvn_fs_util/caching.c

(svn_fs__get_global_membuffer_cache): Store pointer in correct variable.

Fix merge / manual conflict resolution artifacts.

* subversion/libsvn_fs_util/caching.c

(cache_settings): add missing "#endif"

(svn_fs__get_global_membuffer_cache): fix parameters and "volatile" usage

Merged latest caching bug fixes from performance branch:

revisions 1029232, 1032333, 1033040, 1033057 and 1033294

(support for "no threads", typos, error leaks)

  1. … 2 more files in changeset.
Defer cache initialization to first usage: mod_dav_svn may have to

call svn_fs_set_cache_config() more than once if the Apache config

contains multiple caching related parameters (not today, but in the

near future). Also, this reduces the memory footprint if not all server

instances actually access FSFS repositories.

* subversion/libsvn_fs_util/caching.c

(svn_fs__get_global_membuffer_cache): make it thread-safe and

allow for concurrent initialization.

(svn_fs_set_cache_config): don't create caches as a side-effect.

Changing caching defaults to "16MB membuffer cache, fulltext caching on".

* subversion/libsvn_fs_util/caching.c:

(cache_settings): change defaults

Merge all changes (r998649, r998843, r998852) from the

integrate-cache-membuffer branch.

These patches introduce in-process full-text caching.

  1. … 8 more files in changeset.
Fix compiler warning.

* subversion/libsvn_fs_util/fs-util.c

(svn_fs__canonicalize_abspath): Change variable type to size_t instead

of int.

Test out my new and fancy ASF commit priviledges by changing the copyright

wording in our license headers to reflect ownership by the ASF.

* NOTICE:

Change terminology to ASF, and update a link.

* subversion/libsvn_subr/opt.c

(svn_opt__print_version_info): Note that the product as a whole is

copyrighted by the ASF, and update the project website.

* everywhere:

Change license text to reflect ASF ownership.

  1. … 891 more files in changeset.