Checkout Tools
  • last updated 4 hours ago
Constraints: committers
Constraints: files
Constraints: dates
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.
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.
Scrub trailing whitespace throughout (see r35894).

  1. … 146 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.
Attempt to button down the BDB backend's memory usage by allowing trail

producers to tell that subsystem to discard all memory associated with

the trail.

Most of the time, this pool usage waste isn't a problem (because of

better pool practices in higher layers). But mod_dav and mod_dav_svn

have notoriously wicked pool usage behavior, and I'm tired of having

the theoretically niceties of our pool usage guidelines getting in the

way of Subversion working. Why should a simple 'svn ls -v' of a

directory with 10,000 files exhaust all the memory on my 2Gb laptop?

It shouldn't, ahd if this kind of change is what I have to do to get

that leakage back down to "only" 339Mb, I feel compelled to do it.

An arguably cleaner approach would have been to add a 'result_pool'

argument to the txn_body_* function type which is the same pool passed

to svn_fs_base__retry_txn(). That would allow the txn_body_*

functions (which already operate with 'trail' and 'trail->pool' today)

to use the 'result_pool' argument as a final destination for

returnable stuff and 'trail->pool' for scratch work. (And then

do_retry() function would, of course, always whack trail->pool when it

was finished with a trail.) I've filed issue #3395 to track this

possible future enhancement.

Reviewed by: gstein

* subversion/libsvn_fs_base/trail.h

(svn_fs_base__retry_debug, svn_fs_base__retry_txn, svn_fs_base__retry):

Add 'destroy_trail_pool' parameter.

* subversion/libsvn_fs_base/trail.c

(do_retry): Add 'destroy_trail_pool', and, if set, destroy the trail

subpool even upon successful completion of the transaction.

(svn_fs_base__retry_debug, svn_fs_base__retry_txn, svn_fs_base__retry):

Add 'destroy_trail_pool' parameter, passed to do_retry().

* subversion/libsvn_fs_base/reps-strings.c,

* subversion/libsvn_fs_base/revs-txns.c,

* subversion/libsvn_fs_base/lock.c,

* subversion/libsvn_fs_base/dag.c,

* subversion/tests/libsvn_fs_base/changes-test.c,

* subversion/tests/libsvn_fs_base/fs-base-test.c,

* subversion/tests/libsvn_fs_base/strings-reps-test.c

Update all calls to svn_fs_base__retry() and svn_fs_base__retry_txn(),

passing TRUE for the new 'destroy_trail_pool' parameter iff the

caller didn't need any allocations made by the trail subsystem to

outlive the trail itself.

* subversion/libsvn_fs_base/tree.c

Same as above, but also...

(base_node_created_path, base_node_prop, svn_fs_base__miscellaneous_get,

base_copied_from, base_file_checksum): Use a scratch pool for the

trail work.

* subversion/libsvn_fs_base/uuid.c

Same as above, but also...

(svn_fs_base__get_uuid): Use a scratch pool for the trail work.

  1. … 10 more files in changeset.
* subversion/libsvn_client/cat.c,

* subversion/libsvn_client/commit.c,

* subversion/libsvn_client/copy.c,

* subversion/libsvn_client/diff.c,

* subversion/libsvn_client/merge.c,

* subversion/libsvn_client/mergeinfo.c,

* subversion/libsvn_client/ra.c,

* subversion/libsvn_client/status.c,

* subversion/libsvn_client/switch.c,

* subversion/libsvn_client/update.c,

* subversion/libsvn_client/util.c,

* subversion/libsvn_delta/path_driver.c,

* subversion/libsvn_diff/diff_file.c,

* subversion/libsvn_diff/diff_memory.c,

* subversion/libsvn_fs/access.c,

* subversion/libsvn_fs_base/dag.c,

* subversion/libsvn_fs_base/revs-txns.c,

* subversion/libsvn_fs_base/uuid.c,

* subversion/libsvn_fs_fs/dag.c,

* subversion/libsvn_fs_fs/lock.c,

* subversion/libsvn_ra/compat.c,

* subversion/libsvn_ra/ra_loader.c,

* subversion/libsvn_ra_local/ra_plugin.c,

* subversion/libsvn_ra_local/split_url.c,

* subversion/libsvn_ra_neon/commit.c,

* subversion/libsvn_ra_neon/fetch.c,

* subversion/libsvn_ra_neon/log.c,

* subversion/libsvn_ra_neon/session.c,

* subversion/libsvn_ra_serf/log.c,

* subversion/libsvn_ra_svn/client.c,

* subversion/libsvn_ra_svn/editorp.c,

* subversion/libsvn_repos/authz.c,

* subversion/libsvn_repos/delta.c,

* subversion/libsvn_repos/node_tree.c,

* subversion/libsvn_repos/replay.c,

* subversion/libsvn_repos/repos.c,

* subversion/libsvn_repos/rev_hunt.c,

* subversion/libsvn_subr/cache-memcache.c,

* subversion/libsvn_subr/error.c,

* subversion/libsvn_subr/hash.c,

* subversion/libsvn_subr/io.c,

* subversion/libsvn_subr/pool.c,

* subversion/libsvn_subr/properties.c,

* subversion/libsvn_wc/adm_crawler.c,

* subversion/libsvn_wc/adm_files.c,

* subversion/libsvn_wc/diff.c,

* subversion/libsvn_wc/lock.c,

* subversion/libsvn_wc/props.c,

* subversion/libsvn_wc/translate.c,

* subversion/libsvn_wc/update_editor.c,

* subversion/libsvn_wc/util.c:

Now that the SVN_ERR_ASSERT() macro is in use, there is no need to

include <assert.h>.

  1. … 50 more files in changeset.
Combine two helper functions (one to check that a filesystem is

opened, one to check that it isn't) into a single one that does both

based on a boolean expectation flag.

NOTE: This changes the test when 'expect_open' is set to examine

svn_fs_t->fsap_data instead of svn_fs_t->path (since that's what

is checked when 'expect_open' is not set, too). I think that's

fine, but wanted to note that here anyway just in case it rings

some alarm in another developer's mind.

* subversion/include/private/svn_fs_util.h,

* subversion/libsvn_fs_util/fs-util.c

(svn_fs__check_fs): Add 'expect_open' flag.

* subversion/libsvn_fs_base/fs.c

(check_already_open): Removed as unused.

(base_bdb_set_errcall): Update call to svn_fs__check_fs().

(open_databases): Use svn_fs__check_fs() instead of check_already_open().

* subversion/libsvn_fs_fs/fs.c

(check_already_open): Removed as unused.

(fs_create): Use svn_fs__check_fs() instead of check_already_open().

* subversion/libsvn_fs_base/tree.c,

* subversion/libsvn_fs_base/bdb/rev-table.c,

* subversion/libsvn_fs_base/uuid.c,

* subversion/libsvn_fs_base/revs-txns.c,

* subversion/libsvn_fs_base/lock.c,

* subversion/libsvn_fs_fs/tree.c,

* subversion/libsvn_fs_fs/fs_fs.c,

* subversion/libsvn_fs_fs/lock.c

Update call calls to svn_fs__check_fs(), passing TRUE for 'expect_open'.

  1. … 11 more files in changeset.
Commit upstream a CollabNet-maintained a patch against libsvn_fs*

which allows svn_fs_set_uuid() to accept a NULL argument which is

interpreted as "generate a new UUID". This is useful for

programmatically disambiguating repositories created as copies of some

other existing one without resorting to tricks with 'svnadmin load',

or depending on the undocumented ability of the filesystem layers to

regenerate their 'uuids' table if deleted.

* subversion/include/svn_fs.h

(svn_fs_set_uuid): Update the docstring.

* subversion/libsvn_fs_fs/fs_fs.h,

* subversion/libsvn_fs_fs/fs_fs.c

(svn_fs_fs__set_uuid): If a NULL UUID is passed in, generate a new one.

* subversion/libsvn_fs_base/uuid.c

(svn_fs_base__set_uuid): If a NULL UUID is passed in, generate a new one.

* subversion/bindings/swig/svn_fs.i

Add 'uuid' to the MAY_BE_NULL list.

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

(set_uuid): New test.

(test_funcs): Add reference to new test.

  1. … 5 more files in changeset.
Channeling Erik Hülsmann, remove all trailing whitespace within our source


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

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


Inspired by: ehu

  1. … 449 more files in changeset.
Move re-usable functions from err.c file in libsvn-fs-fs and

libsvn-fs-base libraries to fs-util.c file in libsvn-fs-util library.

* subversion/include/private/svn_fs_util.h

* subversion/libsvn_fs_util/fs-util.c

(svn_fs__check_fs, svn_fs__err_not_mutable,

svn_fs__err_not_directory, svn_fs__err_not_file,

svn_fs__err_no_such_lock, svn_fs__err_lock_expired,

svn_fs__err_no_user, svn_fs__err_lock_owner_mismatch,

svn_fs__err_path_already_locked): New functions, the result of a

merger from similar functions redundantly defined in both FS backend


* subversion/libsvn_fs_base/err.c

* subversion/libsvn_fs_base/err.h

(svn_fs_base__check_fs, svn_fs_base__err_not_mutable,

svn_fs_base__err_not_directory, svn_fs_base__err_not_file,

svn_fs_base__err_no_such_lock, svn_fs_base__err_lock_expired,

svn_fs_base__err_no_user, svn_fs_base__err_lock_owner_mismatch,

svn_fs_base__err_path_already_locked): Relocated to (and renamed

in) svn_fs_util.

* subversion/libsvn_fs_fs/err.c

* subversion/libsvn_fs_fs/err.h

(svn_fs_fs__check_fs, svn_fs_fs__err_not_mutable,

svn_fs_fs__err_not_directory, svn_fs_fs__err_not_file,

svn_fs_fs__err_no_such_lock, svn_fs_fs__err_lock_expired,

svn_fs_fs__err_no_user, svn_fs_fs__err_lock_owner_mismatch,

svn_fs_fs__err_path_already_locked): Relocated to (and renamed

in) svn_fs_util.

* subversion/libsvn_fs_base/tree.c,

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

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

* subversion/libsvn_fs_base/bdb/rev-table.c,

* subversion/libsvn_fs_base/uuid.c,

* subversion/libsvn_fs_base/fs.c,

* subversion/libsvn_fs_base/revs-txns.c,

* subversion/libsvn_fs_base/lock.c,

* subversion/libsvn_fs_fs/tree.c,

* subversion/libsvn_fs_fs/fs_fs.c,

* subversion/libsvn_fs_fs/lock.c

Include new library "private/svn_fs_util.h". Update references to

relocated (and renamed) error-generation functions.

Approved by: cmpilato

  1. … 16 more files in changeset.
Reformat the code to use a consistent no-space-before-param-list-paren style.

See here for the vote that decided this:

From: "Peter N. Lundblad" <>

To: "Peter N. Lundblad" <>


Subject: Results of: [VOTE] New space-before-parens style

Date: Wed, 8 Feb 2006 12:00:35 +0100 (CET)

Message-ID: <Pine.LNX.4.55.0602080918350.10805@localhost.localdomain>

I took the opportunity to make spacing among all parens in SVN_ERR

macro calls consistent. But I did not address consistency of casts,

nor whether a function name should always appear below its return type

in declarations and definitions, nor whether there should be a space

before/after the "*" when declaring pointer return types.

* www/hacking.html

(coding-style): Document that we are no-space-before-paren now.

* everywhere: Reformat.

  1. … 365 more files in changeset.
Make all the libsvn_fs_base/bdb functions which currently accept only

trail_t's also accept (and use, instead of trail->pool) explicit 'pool'


Callers of these functions which themselves live in the

libsvn_fs_base/bdb area now provide *their* new pool as the value for

this new parameter; callers outside that area pass trail->pool as that

parameter. The net affect, of course, is that no changes in memory

usage have happened at all. But this is the first step of several

incremental commits which should give us the flexibility over pool

usage that we need in the BDB backend.

* subversion/libsvn_fs_base/bdb/changes-table.h,


(svn_fs_bdb__changes_add, svn_fs_bdb__changes_delete,

svn_fs_bdb__changes_fetch, svn_fs_bdb__changes_fetch_raw): Add

'pool' parameter, and use it instead of trail's pool for allocations.

* subversion/libsvn_fs_base/bdb/copies-table.h

(svn_fs_bdb__reserve_copy_id, svn_fs_bdb__create_copy,

svn_fs_bdb__delete_copy, svn_fs_bdb__get_copy): Add 'pool'

parameter, and use it instead of trail's pool for allocations.

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

(put_copy, svn_fs_bdb__reserve_copy_id, svn_fs_bdb__create_copy,

svn_fs_bdb__delete_copy, svn_fs_bdb__get_copy): Add

'pool' parameter, and use it instead of trail's pool for allocations.

* subversion/libsvn_fs_base/bdb/nodes-table.h,


(svn_fs_bdb__new_node_id, svn_fs_bdb__new_successor_id,

svn_fs_bdb__delete_nodes_entry, svn_fs_bdb__get_node_revision,

svn_fs_bdb__put_node_revision): Add

'pool' parameter, and use it instead of trail's pool for allocations.

* subversion/libsvn_fs_base/bdb/reps-table.h,


(svn_fs_bdb__read_rep, svn_fs_bdb__write_rep,

svn_fs_bdb__write_new_rep, svn_fs_bdb__delete_rep): Add

'pool' parameter, and use it instead of trail's pool for allocations.

* subversion/libsvn_fs_base/bdb/rev-table.h,


(svn_fs_bdb__get_rev, svn_fs_bdb__put_rev, svn_fs_bdb__youngest_rev): Add

'pool' parameter, and use it instead of trail's pool for allocations.

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

(locate_key, svn_fs_bdb__string_read, get_key_and_bump,

svn_fs_bdb__string_append, svn_fs_bdb__string_clear,

svn_fs_bdb__string_size, svn_fs_bdb__string_delete,

svn_fs_bdb__string_copy): Add 'pool' parameter, and use it instead

of trail's pool for allocations.

* subversion/libsvn_fs_base/bdb/strings-table.h

(svn_fs_bdb__string_read, svn_fs_bdb__string_size,

svn_fs_bdb__string_append, svn_fs_bdb__string_clear,

svn_fs_bdb__string_delete, svn_fs_bdb__string_copy): Add 'pool'

parameter, and use it instead of trail's pool for allocations.

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

(svn_fs_bdb__put_txn, allocate_txn_id, svn_fs_bdb__create_txn,

svn_fs_bdb__delete_txn, svn_fs_bdb__get_txn): Add 'pool' parameter,

and use it instead of trail's pool for allocations.

(svn_fs_bdb__get_txn_list): Re-order parameters (this one already

had a 'pool' parameter).

* subversion/libsvn_fs_base/bdb/txn-table.h

(svn_fs_bdb__create_txn, svn_fs_bdb__delete_txn,

svn_fs_bdb__get_txn, svn_fs_bdb__put_txn): Add 'pool' parameter,

and use it instead of trail's pool for allocations.

(svn_fs_bdb__get_txn_list): Re-order parameters (this one already

had a 'pool' parameter).

* subversion/libsvn_fs_base/bdb/uuids-table.h,


(svn_fs_bdb__get_uuid, svn_fs_bdb__set_uuid): Add 'pool' parameter,

and use it instead of trail's pool for allocations.

  1. … 24 more files in changeset.
Merge the changes from the fs-abstraction branch. This allows the

libsvn_fs_fs filesystem to sit alongside the old BDB filesystem in the

same executable.

  1. … 89 more files in changeset.