Checkout Tools
  • last updated 4 hours ago
Constraints: committers
Constraints: files
Constraints: dates
Follow-up to r1727838: (Hopefully) fix the cyclic library dependecy between

lib_fs and lib_fs_util that broke the Windows build.

Reported by: rhuijben

* subversion/include/private/svn_fs_util.h

(svn_fs__get_deleted_node): Move declaration from here ...

* subversion/include/private/svn_fs_private.h

(svn_fs__get_deleted_node): ... to here. Use Doxygen comments like in the

rest of that file.

* subversion/libsvn_fs_util/fs-util.c

(svn_fs__get_deleted_node): Move implementation from here ...

* subversion/libsvn_fs/fs-loader.c

(svn_fs__get_deleted_node): ... to here.

  1. … 3 more files in changeset.
Add the ability to emulate the old svn_fs_paths_changed2 through

svn_fs_paths_changed3. So, we've got a two-way emulation now and

we enable both for now such that all callers of the old API will

be redirected: old API -> new API -> old API vtable entry.

As a bonus, the emulated svn_fs_paths_changed2 now correctly reports

the IDs for in-revision nodes in FSFS. It also fails earlier on

corrupted change lists. Both is only true for "emulated" mode.

* subversion/include/private/svn_fs_util.h

(svn_fs__get_deleted_node): Declare a new private utility API needed

to handle ID creation edge cases.

* subversion/libsvn_fs_util/fs-util.c

(svn_fs__prop_lists_equal): Implement.

* subversion/libsvn_fs/fs-loader.c

(SVN_FS_EMULATE_PATHS_CHANGED): Declare new control macro as we did

already for the new API.


add_changed_path): Callback implementation to emulate the old API

based on the new one.

(svn_fs_paths_changed2): Emulate when necessary or forced to do so.

* subversion/tests/cmdline/

(verify_invalid_path_changes): The correct ID construction in emulated

mode creates fewer repetitions of the

same error during verification. Update

test expectations accordingly.

  1. … 3 more files in changeset.
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_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.
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_contents_changed): Add more comparisons to eliminate false

positives as described above.


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__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__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_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__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_contents_changed): Ditto.

  1. … 13 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.
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


get_dag): update

Suggested by: cmpilato

  1. … 2 more files in changeset.
Remove two unneeded includes in a private header.

* subversion/include/private/svn_fs_util.h

Remove "svn_dirent_uri.h" and "svn_path.h".

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

Include "svn_path.h" here, as it's needed here.

  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_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.


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


* 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:





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:





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


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


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.


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.




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).




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.
* subversion/include/private/svn_fs_util.h

(svn_fs__identifier): Document why the UUID is used.

Follow-up to r1331050: simplify FS-private macros.

* subversion/include/private/svn_fs_util.h

(svn_fs__identifier): Remove the POOL argument. (This macro will stay,

contrary to the log message of r1331050; however, it is only used currently

by this header itself.))






Update calls to svn_fs__identifier(), and remove POOL arguments.

* subversion/libsvn_fs_fs/tree.c,






(*): Remove POOL arguments in calls to the SVN_FS__ERR_*() macros.

  1. … 6 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,


(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


* 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


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


* subversion/libsvn_fs_base/uuid.c


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,


(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



Log the filesystem UUID instead of diskpath.

  1. … 2 more files in changeset.
* subversion/include/private/svn_fs_util.h: Fix typo in comment.
* subversion/include/private/svn_fspath.h

(svn_fspath__canonicalize): Cross-reference this ...

* subversion/include/private/svn_fs_util.h

(svn_fs__canonicalize_abspath): ... with this.

  1. … 1 more file in changeset.
Factor out a function.

* subversion/include/private/svn_fs_util.h,


(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.
* subversion/include/private/svn_fs_util.h

(svn_fs__path_valid): Move declartion from here...

* subversion/include/private/svn_fs_private.h

(svn_fs__path_valid): ... to here. This header is more appropriate since

svn_fs_util.h is for libsvn_fs_util, but the implementation of this

function is in libsvn_fs.

* subversion/libsvn_repos/dump.c: Adjust #include appropriately.

Suggested by: danielsh

  1. … 2 more files in changeset.
Make 'svnadmin verify' error out if an invalid path is found in the repository.

There have been reports of non-UTF-8 paths having entered repositories,

probably due to buggy third-party clients running against pre-1.6 servers

(pre-1.6 servers do not verify filename encoding).

See this thread for one such report, which also mentions that

'svnadmin verify' didn't detect this problem:

* subversion/include/private/svn_fs_util.h

(svn_fs__path_valid): Declare.

* subversion/libsvn_fs/fs-loader.c

(path_valid): Rename this funcion to ...

(svn_fs__path_valid): ... this, making it available to the repos layer.

(svn_fs_make_dir, svn_fs_copy, svn_fs_make_file): Update callers.

* subversion/tests/cmdline/

(verify_non_utf8_paths): New test which makes sure that 'svnadmin verify'

will error out on non-UTF-8 paths. It also makes sure that the repository

can still be dumped successfully so that the problem can be fixed by

editing the dumpfile. This test is FSFS-only for now but that shouldn't

be a problem.

* subversion/libsvn_repos/dump.c

(dump_node): If verifying, run the node's path through svn_fs__path_valid().

  1. … 3 more files in changeset.
* subversion/include/private/svn_fs_util.h

(): Do not include svn_private_config.h.

* subversion/include/private/svn_wc_private.h,

* subversion/include/private/svn_fs_util.h,

* subversion/include/private/svn_mergeinfo_private.h,

* subversion/include/private/svn_eol_private.h,

* subversion/include/private/svn_opt_private.h,

* subversion/include/private/svn_sqlite.h

Fix typos in comments.

  1. … 5 more files in changeset.
Convert dirents to local style in several libsvn_fs_(base|fs) error messages.

* subversion/include/private/svn_fs_util.h









Add pool argument and convert to local style.

* subversion/libsvn_fs_base/bdb/lock-tokens-table.c


svn_fs_bdb__lock_token_get): Update callers.

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

(svn_fs_bdb__lock_get): Update caller.

* subversion/libsvn_fs_base/lock.c

(txn_body_lock, txn_body_unlock): Update callers.

* subversion/libsvn_fs_base/tree.c


open_path): Update callers.

* subversion/libsvn_fs_fs/lock.c

(get_lock, lock_body, unlock_body): Update callers.

* subversion/libsvn_fs_fs/tree.c

(mutable_root_node, open_path): Update callers.

  1. … 6 more files in changeset.
Test out my new and fancy ASF commit priviledges by changing the copyright

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


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.
Relicense Subversion under the Apache License, Version 2.0.

* NOTICE: New.



subversion/LICENSE: Remove.

* subversion/libsvn_subr/opt.c

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

copyrighted by the SVN Corp, and that it contains contributions from

many people, as referenced in NOTICE.

* subversion/bindings/swig/python/LICENSE_FOR_PYTHON_BINDINGS:

Relicense the SVN parts under Apache 2.0.

* everywhere:

Change copyright notices in file headers to reflect the Apache 2.0 license.

  1. … 882 more files in changeset.
Add a few include files to remove some declaration-duplicated warnings.

(I'd still like to know why these warnings are header-file-include-order

dependent. Kinda makes me a bit wary.)

* subversion/libsvn_fs_util/fs-util.c,


Include svn_dirent_uri.h before svn_path.h.

* subversion/include/private/svn_fs_util.h:

Include svn_path.h after svn_dirent_uri.h.

  1. … 2 more files in changeset.
Follow up r38275.

* subversion/include/private/svn_fs_util.h

(): Include svn_dirent_uri.h

A few more local_style deprecation replacements, this time in the filesystem


* subversion/include/private/svn_fs_util.h


* subversion/libsvn_fs_fs/fs_fs.c

(svn_fs_fs__path_rev_absolute, get_writable_proto_rev_body,

check_format_file_buffer_numeric, read_format,


* subversion/libsvn_fs_fs/lock.c

(write_digest_file, read_digest_file):

Switch out svn_path_local_style() for svn_dirent_local_style().

  1. … 2 more files in changeset.
Rename svn_fs__path_change2_create() to svn_fs__path_change_create_internal().

Suggested by: gstein

* subversion/include/private/svn_fs_util.h

(svn_fs__path_change2_create): Rename to ...

(svn_fs__path_change_create_internal): ... this.

* subversion/libsvn_fs_util/fs-util.c

(svn_fs__path_change2_create): Rename to ...

(svn_fs__path_change_create_internal): ... this.

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


* subversion/libsvn_fs_fs/fs_fs.c


* subversion/libsvn_fs/fs-loader.c

(svn_fs_path_change2_create): Call svn_fs__path_change_create_internal()

instead of svn_fs__path_change2_create().

  1. … 4 more files in changeset.
Fix undefined references to svn_fs_path_change2_create().

* build.conf

(libsvn_fs.libs): Add 'libsvn_fs_util'.

* subversion/include/private/svn_fs_util.h

(svn_fs__path_change2_create): New declaration.

* subversion/libsvn_fs_util/fs-util.c

(svn_fs_path_change2_create): Rename to ...

(svn_fs__path_change2_create): ... this.

* subversion/libsvn_fs/fs-loader.c

(svn_fs_path_change2_create): New function which wraps


  1. … 3 more files in changeset.
Add necessary includes to provide types used by these headers. Each header

now includes everything it needs to be compiled standalone.

* include/private/svn_cmdline_private.h:

* include/private/svn_fs_util.h:

* include/private/svn_mergeinfo_private.h:

* include/private/ra_svn_sasl.h:

* include/private/svn_utf_private.h:

* include/private/svn_auth_private.h:

* include/private/svn_opt_private.h:

(): add some #include lines

  1. … 6 more files in changeset.