Checkout Tools
  • last updated 5 hours ago
Constraints: committers
Constraints: files
Constraints: dates
When handing out node contents, the delta streams don't need

to calculate MD5 checksums as the result will not be used and the

check would be redundant even if it were made.

Thus, rev the svn_txdelta API to calculate the checksum only

upon specific request and update all callers to use the new API.

* subversion/include/svn_delta.h

(svn_txdelta2): declare new, extended API

(svn_txdelta): deprecate the old one

* subversion/libsvn_delta/text_delta.c

(txdelta_baton): extend docstring

(txdelta_md5_digest): handle the no-checksum-requested case

(svn_txdelta2): implement

(svn_txdelta): re-implement in terms of svn_txdelta2

* subversion/libsvn_fs_fs/fs_fs.c

(svn_fs_fs__get_file_delta_stream): eliminate duplicate MD5 calculation

* subversion/libsvn_ra/compat.c

(svn_ra__file_revs_from_log): switch to reved API, MD5 not used / required

* subversion/tests/libsvn_delta/random-test.c

(random_test): ditto

* subversion/tests/libsvn_delta/svndiff-test.c

(main): same here

* subversion/tests/libsvn_delta/vdelta-test.c

(do_one_diff, main): and here

* subversion/tests/libsvn_delta/window-test.c

(stream_window_test): switch to reved API, request MD5

  1. … 7 more files in changeset.
Teach vdelta-test to optionally repeat the test cycle,

making it easier to profile the deltifier.

* subversion/tests/libsvn_delta/vdelta-test.c: Include svn_ctypes.h.

(do_one_test_cycle): New. Factor the actual test out of main.

(main): Parse an optional parameter giving the number of test repetitions.

Call do_one_test_cycle for the number of repetitions, rewinding the

input files between cycles.

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.
Disable deprecation warnings during compilation of tests.

* subversion/tests/svn_test.h

  (SVN_DEPRECATED): Define as empty definition when


* subversion/tests/libsvn_delta/random-test.c:

* subversion/tests/libsvn_delta/svndiff-test.c:

* subversion/tests/libsvn_delta/vdelta-test.c:

* subversion/tests/libsvn_diff/diff-diff3-test.c:

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

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

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

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

* subversion/tests/libsvn_repos/repos-test.c:

* subversion/tests/libsvn_subr/hashdump-test.c:

* subversion/tests/libsvn_subr/opt-test.c:

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

* subversion/tests/libsvn_subr/translate-test.c:

* subversion/tests/svn_test_fs.c: Include svn_test.h before other Subversion


Suggested by: hwright

  1. … 14 more files in changeset.
Revert r32829 and r32830 in subversion/tests.

Suggested by: hwright

  1. … 6 more files in changeset.
Use svn_stream_from_aprfile2() instead of deprecated svn_stream_from_aprfile().

* subversion/bindings/javahl/native/SVNClient.cpp:

* subversion/tests/libsvn_diff/diff-diff3-test.c:

* subversion/tests/libsvn_subr/hashdump-test.c:

* subversion/tests/libsvn_delta/svndiff-test.c:

* subversion/tests/libsvn_delta/vdelta-test.c:

* subversion/tests/libsvn_delta/random-test.c: Use svn_stream_from_aprfile2()

instead of deprecated svn_stream_from_aprfile().

  1. … 5 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.
Fix violations of our policy regarding public/private symbols.

* subversion/libsvn_delta/delta.h


svn_txdelta__apply_instructions): remove declarations here...

* subversion/include/svn_delta.h


svn_txdelta_apply_instructions): ... and declare here, as public funcs.

* subversion/libsvn_delta/compose_delta.c

(svn_txdelta_compose_windows): was svn_txdelta__compose_windows.

* subversion/libsvn_delta/text_delta.c

(svn_txdelta_apply_instructions): was svn_txdelta_apply_instructions.

(apply_window): call public function instead of private one.

* subversion/libsvn_fs_base/reps-strings.c

(../libsvn_delta/delta.h): stop #including private library header.

(compose_handler): call public functions instead of private ones.

(rep_undeltify_range): call public function instead of private one.

* subversion/libsvn_fs_fs/fs_fs.c

(../libsvn_delta/delta.h): stop #including private library header.

(get_combined_window): call public function instead of private one.

(get_contents): call public function instead of private one.

* subversion/tests/libsvn_delta/random-test.c

(do_random_combine_test): call public function instead of private one.

* subversion/tests/libsvn_delta/vdelta-test.c

(main): call public function instead of private one.

  1. … 7 more files in changeset.
Add new error handlers that don't hardcode the "svn:" prefix. Update

most clients to use the new handlers, the svn client and libsvn_subr

continue to use the old handlers.

* subversion/include/svn_error.h

(svn_handle_error2, svn_handle_warning2): New, adds const char *prefix.

(svn_handle_error, svn_handle_warning): Tweak docsting.

* subversion/libsvn_subr/error.c

(svn_handle_error2, svn_handle_warning2): Renamed from svn_handle_error

and svn_handle_warning, add const char *prefix.

(svn_handle_error, svn_handle_warning): Wrappers to call svn_handle_error

and svn_handle_warning.

* subversion/svnadmin/main.c,
















contrib/client-side/svn-push/svn-push.c: Use the new handlers.

  1. … 18 more files in changeset.
Rationalize #includes in C source files.

If a file does not use symbols from a given header, then do not include

that header.

If a file uses symbols from a given header 'H', and H was only being

included via another header that neither needs nor guarantees to include

H, then include H directly.

(By "symbols from a given header" I mean symbols that it either defines

itself or pulls in from other headers with the specific intention of

providing them to its users.)

  1. … 149 more files in changeset.
APR_STATUS_IS_SUCCESS is not recommended. Just check for non-zero status.

* subversion/libsvn_subr/io.c (svn_io_open_unique_file,

svn_io_create_unique_link, svn_io_dir_empty),

subversion/tests/libsvn_delta/vdelta-test.c (open_binary_read),

subversion/tests/libsvn_delta/svndiff-test.c (main),

subversion/libsvn_ra_svn/cram.c (svn_ra_svn_cram_server),

subversion/libsvn_ra_svn/marshal.c (svn_ra_svn__input_waiting),

subversion/libsvn_fs_fs/fs_fs.c (move_into_place):

Do not use APR_STATUS_IS_SUCCESS. Check for zero instead.

  1. … 5 more files in changeset.
* tests/libsvn_delta/vdelta-test.c (main): Adjust for simplified

delta combiner interface.

Don't leak errors; handle or clear them.

* subversion/clients/cmdline/log-cmd.c (log_message_receiver):

* subversion/libsvn_client/add.c (svn_client__get_auto_props):

* subversion/libsvn_client/copy.c (repos_to_wc_copy):

* subversion/libsvn_client/switch.c (svn_client_switch):

* subversion/libsvn_client/update.c (svn_client__update_internal):

* subversion/libsvn_fs/revs-txns.c (svn_fs_txn_proplist, svn_fs_txn_prop,


* subversion/libsvn_fs/tree.c (window_consumer):

* subversion/libsvn_ra_dav/session.c (get_server_settings):

* subversion/libsvn_repos/delta.c (delta_proplists):

* subversion/libsvn_repos/dump.c (svn_repos_dump_fs):

* subversion/libsvn_repos/load.c (new_revision_record, maybe_add_with_history,

new_node_record, close_node, close_revision):

* subversion/libsvn_subr/io.c (svn_io_run_diff3):

* subversion/svnlook/main.c (print_diff_tree):

* subversion/svnserve/serve.c (serve):

Handle errors with SVN_ERR.

* subversion/clients/cmdline/main.c (main):

Handle errors with svn_handle_error.

* subversion/libsvn_client/revert.c (revert):

Handle errors with clean-up.

* subversion/libsvn_ra_dav/fetch.c (get_file_reader):

Clear any error that occurs, as there is no way to report it.

* subversion/libsvn_ra_svn/editorp.c (ra_svn_close_edit):

* subversion/libsvn_subr/subst.c (svn_subst_translate_cstring):

* subversion/libsvn_wc/lock.c (do_open):

* subversion/libsvn_wc/update_editor.c (apply_textdelta):

Clear any error that occurs within error-handling code.

* subversion/libsvn_wc/log.c (svn_wc__run_log):

Return the error - don't just leak it and continue!

* subversion/mod_dav_svn/update.c (dav_svn__update_report):

Handle errors with dav_svn_convert_err.

* subversion/mod_dav_svn/util.c (dav_svn_get_safe_cr):

* subversion/mod_dav_svn/version.c (dav_svn__drev_report):

Clear errors that are intentionally ignored.

* subversion/tests/libsvn_delta/svndiff-test.c (main):

* subversion/tests/libsvn_delta/vdelta-test.c (do_one_diff, main):

* subversion/tests/libsvn_diff/diff-test.c (main):

* subversion/tests/libsvn_diff/diff3-test.c (main):

* subversion/tests/libsvn_diff/diff4-test.c (main):

Handle errors with svn_handle_error or svn_error_clear.

  1. … 29 more files in changeset.
Update copyright notices for 2004, resolving issue #1651.

(See also revision 8019, which fixed a couple of missed spots.)

  1. … 361 more files in changeset.
Remove the svn_stream_from_stdio interface, and change its remaining

callers to use APR file I/O instead. (Subversion shouldn't build

streams on top of C stdio anymore, as that can behave differently on

different platforms.)

* subversion/tests/libsvn_delta/vdelta-test.c

(do_one_diff): Use apr instead of stdio for streamed binary input.

(open_binary_read): New helper function.

(main): Adjust accordingly.

* subversion/tests/libsvn_delta/svndiff-test.c

(main): Use apr instead of stdio.

* subversion/include/svn_io.h, subversion/libsvn_subr/stream.c

(read_handler_stdio, read_handler_stdio, write_handler_stdio,

svn_stream_from_stdio): Removed.

  1. … 3 more files in changeset.
* Just about everything else that wasn't test output, a binary file,

or already to set to CRLF: Set svn:eol-style to native.

  1. … 658 more files in changeset.
Touch every file in the repository :) 2003 is here, update all the

copyright statements. Also, update the sample `svn --version' output

to be consistent with the current client.

  1. … 443 more files in changeset.
Just be glad you're not updating over libsvn_ra_pigeons...

* everywhere: Remove "local variables:" eval blocks.

* subversion/libsvn_repos/hooks.c: But leave the vim stuff here.

* tools/dev/svn-dev.el, doc/book/tools/svnbook.el:

Get rid of obsolete loading instructions.

* HACKING: Describe how to load the elisp files from .emacs.

* doc/book/HACKING: Add querulous comment.

  1. … 338 more files in changeset.
* subversion/tests/libsvn_delta/vdelta-test.c: Updated to use the latest

delta combiner interface.

Ongoing work on the delta combiner (issue #531).

[In subversion/libsvn_delta]

* compose_delta.c (insert_range): Fix bug where a new range superceded

an existing range, but the target offset didn't get updated.

(svn_txdelta__compose_windows): Generate source view offset and length

correctly: Introduce parameter next_sview_offset, a sort of baton for

the combinaer, and use update it when generating the combined window.

Don't add the op offset twice to the new data pointer when copying delta

ops to the composite.

* delta.h (svn_txdelta__compose_windows): Update prototype.

[In subversion/tests/libsvn_delta]

* delta-window-test.h: New file. Code for printing delta windows, extracted

from vdelta-test.c,

* range-index-test.h: New file. Unit test for the delta combiner's range

index, extracted from random-test.c

* vdelta-test.c: Include and use the code from delta-window-test.h.

Update calls to svn_txdelta__compose_windows.

* random-test.c: Include and use the code from delta-window-test.h.

Include range-index-test.h, disabled by default.

(init_params): New parameters dump_files, print_windows, random_bytes

and bytes_range. Modify through new options -F, -W and -r..., respectively.

All callers changed.

(generate_random_file): Handle random_bytes, bytes_range and dump_files.

All callers changed.

(compare_files): Handle dump_files. All callers changed.

(copy_tempfile): Rewind streams.

(random_combine_test): New test for the delta combiner, disabled by default.

  1. … 5 more files in changeset.
Ongoing work on the delta combiner (issue #531).

* libsvn_delta/text_delta.c (svn_txdelta__insert_op): Check if the op

can be combined with the previous one.

* libsvn_delta/compose_delta.c:

- Revert part of the r2187 commmit: The offset index doesn't have to

store the position in the new data stream for svn_txdelta_new ops,

that's already implicit in the op's offset field.

(offset_index_node_t): Removed.

(offset_index_t): Changed 'offs' member to an apr_off_t* again.

All uses changed accordingly.

- Audit the meaning of 'offset' and 'limit' in a range. An index belongs

to the range if "offset <= index < limit".

- More copying of source ops.

(copy_source_ops): Accept an 'offset' and 'limit' parameter instead of

"range_list_node_t *range", and only use one pool. Learn how to copy all

sorts of source stream ops, except overlapping target copies.

(svn_txdelta__compose_windows): Initialize the new data in build_baton.

* tests/libsvn_delta/random-test.c: Audit 'offset' and 'limit' semantics.

* libsvn_delta/vdelta-test.c: Rework to test delta combination, too.

  1. … 3 more files in changeset.
Fix a lot of "%ld" format strings (revision 1836 only took care of "%lu").

Thanks to Philip Martin for noticing.

* subversion/include/svn_types.h

(SVN_REVNUM_T_FMT): Revnums are long int, not unsigned long.

* Everywhere, and I do mean everywhere: Use SVN_REVNUM_T_FMT,


If there are any other format code problems, don't tell me. My editor

and I are off to the Bahamas for some R & R.

  1. … 34 more files in changeset.
* subversion/tests/libsvn_delta/svndiff-test.c

* subversion/tests/libsvn_delta/vdelta-test.c

Use actual pools instead of passing NULL for apr_pool_t *


Patch by: Daniel Berlin <>

(With a little fix, and a usage message for svndiff-test, by me.)

  1. … 1 more file in changeset.
Fixed a bunch of spurious whitespace in copyright notices.

Revert change to that attempted to compensate for the

slightly different style in the Ruby bindings licenses.

Change all the Ruby binding file licences to be the same as the rest

of Subversion.

  1. … 333 more files in changeset.
Sigh. Hadn't updated the new license in for the

previous commit. Here we go again...

  1. … 334 more files in changeset.
Move svn-dev.el to tools/dev/, then update copyright notice and

svn-dev.el loader for all files.

[Note: see next commit. I'd forgotten to update the license in, so not all copyright notices were updated in

the way they should have been.]

  1. … 339 more files in changeset.
The txdelta stream's subpool wasn't used for anything beyond storing

itself and to "free" itself (i.e. it wasn't a parent of other subpools

or any other complicated pool logic). Instead, simply allocate the

stream in the provided pool and remove the "free" concept.

Per a suggestion from Greg Hudson <ghudson@MIT.EDU>, the BUILD_BATON

arguments in the delta construction functions were changed to an

explict type (rather than void *) for type safety.

* include/svn_delta.h (svn_txdelta_free): removed

* libsvn_wc_adm_crawler.c (do_apply_textdelta): remove call to


* tests/libsvn_delta/vdelta-test.c (main): ditto.

* tests/libsvn_delta/svndiff-test.c (main): ditto.

* tests/libsvn_delta/random-test.c (random_test): ditto.

* libsvn_repos/delta.c (delta_files): ditto.

* libsvn_delta/delta.h (svn_txdelta__insert_op): change BUILD_BATON

argument to a 'struct build_ops_baton_t *' for type safety.

(svn_txdelta__vdelta): ditto.

* libsvn_delta/vdelta.c (vdelta): change BUILD_BATON argument to a

'struct build_ops_baton_t *' for type safety.

(svn_txdelta__vdelta): ditto.

* libsvn_delta/text_delta.c (struct svn_txdelta_stream_t): remove the

'pool' member.

(svn_txdelta__insert_op): change BUILD_BATON argument to a

'struct build_ops_baton_t *' for type safety.

(svn_txdelta): do not construct a subpool for the stream, but place

it directly into the provided pool.

(svn_txdelta_free): removed.

  1. … 8 more files in changeset.
Clarify the lifetime issues around the svn_txdelta_window_t

structure. In some cases, it was created as a "free standing" object

in its own subpool and svn_txdelta_free_window() needed to be

called. Other times, it was a structure on the stack.

Now, it is clearer that the code creating the window is responsible

for cleaning it, and how they clean it. If svn_txdelta_next_window()

is used, then it is passed a pool, so the caller knows to clear the

pool to toss the window. If the caller constructs a window manually,

then they also know how to clean it up.

NOTE: this change may also dramatically fix our memory consumption. I

found that the vdelta hash tables were allocated in the stream's pool,

rather than for each window. I'm not positive what the resulting peak

was, but it appeared to be on the order of a pointer for each byte in

the source *and* target files that were being diff'd. (e.g. compare

two one megabyte files and you'd get 8 megabytes of pointer data).

Basically, the wrong pool was passed to svn_txdelta__vdelta().

* include/svn_delta.h (svn_txdelta_window_t): Removed the 'pool'

member field.

(svn_txdelta_next_window): take a POOL argument. update doc.

(svn_txdelta_free_window): removed

* libsvn_fs/reps_strings.c (svn_fs__rep_deltify): allocate a subpool

to contain the windows fetched via svn_txdelta_next_window. clear

on each loop.

* tests/libsvn_delta/vdelta-test.c (main): allocate a subpool to

contains the windows fetched via svn_txdelta_next_window. clear on

each loop.

* libsvn_delta/delta.h (svn_txdelta__insert_op): add a POOL argument.

* libsvn_delta/vdelta.c (vdelta): pass pool argument to the

svn_txdelta__insert_op() function for allocating space for the new


* libsvn_delta/svndiff.c (write_handler): allocate the window on the

stack, rather than on the heap. make the destruction of the

subpool explicit, rather than via svn_txdelta_free_window().

* libsvn_delta/text_delta.c (svn_txdelta__make_window): place the new

window directly into the pool passed, rather than into a new


(svn_txdelta__insert_op): take a new POOL argument for allocations

related to the inserted operations.

(svn_txdelta_next_window): take a POOL argument for where to

allocate the new window (rather than via a subpool of the

stream->pool passed to make_window). create errors via this pool,

rather than the stream's pool. use this pool for computing vdeltas

instead of the stream pool(!!)

(svn_txdelta_free_window): remove

(svn_txdelta_send_string): remove assignment of the window's pool.

(svn_txdelta_send_txstream): use a subpool for storing the windows,

and clear on each iteration.

* libsvn_ra_dav/fetch.c (fetch_file_reader): remove assignment of the

window's pool.

  1. … 7 more files in changeset.
* subversion/include/svn_types.h (SVN_STREAM_CHUNK_SIZE): New #define,

replaces `svn_txdelta_window_size', because we're now using it in many

contexts unrelated to delta windows.

* subversion/include/svn_delta.h (svn_txdelta_window_size): Replaced

by above.

* subversion/libsvn_delta/text_delta.c,

subversion/libsvn_delta/vdelta.c, subversion/libsvn_fs/reps-strings.c,

subversion/tests/libsvn_fs/fs-test.c: Adjust accordingly.

* subversion/tests/libsvn_delta/vdelta-test.c: Adjust likewise, and

remove the command line option to set the window size, since the size

is a constant now.

  1. … 6 more files in changeset.