Checkout Tools
  • last updated 29 mins ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates

Changeset 1431017 is being indexed.

Coding style patch: in logical expressions, instead of comparing

with arithmetic constants use boolean operations. I.e. replace

<expr> == TRUE with <expr> and

<expr> == FALSE with !<expr>

* subversion/libsvn_delta/svndiff.c

(send_simple_insertion_window,

window_handler): change condition style

* subversion/libsvn_fs_base/fs.c

(svn_fs_base__clean_logs): ditto

* subversion/libsvn_fs_fs/fs_fs.c

(representation_string,

create_rep_state_body,

build_rep_list): ditto

* subversion/libsvn_ra_serf/locks.c

(handle_lock): ditto

* subversion/libsvn_ra_serf/property.c

(create_propfind_body): same here,

* subversion/libsvn_ra_serf/update.c

(cancel_fetch,

handle_fetch,

end_report,

finish_report): here,

* subversion/libsvn_ra_serf/util.c

(svn_ra_serf__handle_xml_parser): here,

* subversion/libsvn_ra_svn/client.c

(optbool_to_tristate): here,

* subversion/libsvn_repos/authz.c

(authz_parse_section): and here.

* subversion/libsvn_repos/fs-wrap.c

(svn_repos__validate_prop): here as well

* subversion/libsvn_subr/cmdline.c

(svn_cmdline_create_auth_baton): and here

* subversion/libsvn_subr/deprecated.c

(print_command_info): here

* subversion/libsvn_subr/opt.c

(print_command_info2): more of the same

* subversion/libsvn_subr/subst.c

(translate_chunk): ditto

* subversion/libsvn_subr/win32_crashrpt.c

(write_var_values,

svn__unhandled_exception_filter): ditto

* subversion/svn/svn.c

(sub_main): ditto

* subversion/svnsync/svnsync.c

(filter_props): and more of the

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

(test_readonly): same thing

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

(test21): ditto

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

(test_svn_subst_translate_string2_null_encode): here

* subversion/tests/libsvn_wc/db-test.c

(test_getting_info,

test_working_info): and here

* tools/client-side/svn-bench/svn-bench.c

(sub_main): and finally here

  1. … 21 more files in changeset.
Minor optimisation.

* subversion/libsvn_subr/subst.c

(create_special_file_from_stream):

* subversion/libsvn_repos/fs-wrap.c

(svn_repos_fs_revision_prop):

s/strlen(x)/sizeof(x)-1/

  1. … 1 more file in changeset.
Reintegrate integrate-string-improvements branch into /trunk.
  1. … 83 more files in changeset.
And resolve another open file handle problem: Translated streams are not closed

when an error occurs in the final translate. This makes us delete an open file

in svn_subst_copy_and_translate4.

* subversion/libsvn_subr/subst.c

(translated_stream_close): Close inner stream and destroy subpool on errors.

Followup to r1140505. Fix indentation.

* [everywhere]: Fix indentation fallout from the

svn_error_return() -> svn_error_trace() rename.

Patch by: Noorul Islam K M <noorul{_AT_}collab.net>

  1. … 37 more files in changeset.
Rename the 'svn_error_return' macro to 'svn_error_trace'.

See email thread "[RFC] Rename 'svn_error_return' to 'svn_error_trace'?" on

2011-06-23, <http://svn.haxx.se/dev/archive-2011-06/0708.shtml>.

* subversion/include/svn_error.h

(svn_error_return): Rename to svn_error_trace.

(SVN_ERR, svn_error_purge_tracing): Track the rename.

* [everywhere]: Track the rename.

  1. … 120 more files in changeset.
After some discussion on IRC, rename svn_string_from_stringbuf to

svn_stringbuf__morph_into_string and move it to a private header.

* include/private/svn_string_private.h

new header

(svn_stringbuf__morph_into_string): renamed from svn_string_from_stringbuf

* include/svn_string.h

(svn_string_from_stringbuf): remove from public header

* subversion/libsvn_subr/svn_string.c

(svn_stringbuf__morph_into_string): rename implementation

* subversion/libsvn_client/patch.c

(install_patched_prop_targets): use the renamed function

* subversion/libsvn_ra_svn/marshal.c

(read_string): dito

* subversion/libsvn_repos/hooks.c

(run_hook_cmd, lock_token_content): dito

* subversion/libsvn_subr/mergeinfo.c

(svn_rangelist_to_string, svn_mergeinfo_to_string,

svn_mergeinfo__catalog_to_formatted_string,

svn_mergeinfo__to_formatted_string): dito

* subversion/libsvn_subr/subst.c

(keyword_printf): dito

* subversion/libsvn_subr/utf.c

(svn_utf_string_to_utf8, svn_utf_string_from_utf8): and here

* subversion/libsvn_wc/props.c

(maybe_generate_propconflict, svn_wc_canonicalize_svn_prop): here

* subversion/svn/util.c:

(svn_cl__edit_string_externally): and finally here

  1. … 10 more files in changeset.
Make svn_stream_is_buffered() and related symbols private, renaming to

svn_stream__* and moving to svn_io_private.h.

* subversion/include/svn_io.h

(svn_stream_is_buffered_fn_t, svn_stream_set_is_buffered,

svn_stream_is_buffered): Move and rename from here ...

* subversion/include/private/svn_io_private.h

(svn_stream__is_buffered_fn_t, svn_stream__set_is_buffered,

svn_stream__is_buffered): ... to here.

* subversion/libsvn_subr/stream.c

(svn_stream_set_is_buffered, svn_stream_is_buffered): Rename as above.

(svn_stream_t, stream_readline, svn_stream_empty,

is_buffered_handler_disown, svn_stream_disown, svn_stream_from_aprfile2,

svn_stream_from_stringbuf, svn_stream_from_string): Adjust accordingly.

* subversion/libsvn_subr/subst.c

(translated_stream_is_buffered, stream_translated): Adjust accordingly.

  1. … 3 more files in changeset.
Replace calls to svn_string_create_from_buf with the much cheaper

svn_string_from_stringbuf. This is possible in all places where

source and target objects are expected to reside in the same pool

and the source will not be used after the conversion call.

* subversion/libsvn_client/patch.c

(install_patched_prop_targets): replace here

* subversion/libsvn_repos/hooks.c

(run_hook_cmd, lock_token_content): dito

* subversion/libsvn_subr/mergeinfo.c

(svn_rangelist_to_string, svn_mergeinfo_to_string,

svn_mergeinfo__catalog_to_formatted_string,

svn_mergeinfo__to_formatted_string): dito

* subversion/libsvn_subr/subst.c

(keyword_printf): dito

* subversion/libsvn_subr/utf.c

(svn_utf_string_to_utf8, svn_utf_string_from_utf8): and here

* subversion/libsvn_wc/props.c

(maybe_generate_propconflict, svn_wc_canonicalize_svn_prop): here

* subversion/svn/util.c:

(svn_cl__edit_string_externally): and finally here

  1. … 6 more files in changeset.
Rename all new public stream symbols to start with 'svn_stream_' so that all

of the stream symbols are in the same name space except for some old ones

such as 'svn_read_fn_t'. Some or all of these might soon be renamed again

to make them private, but that is a separate issue.

* subversion/include/svn_io.h,

subversion/libsvn_subr/stream.c

(svn_skip_fn_t): Rename to svn_stream_skip_fn_t.

(svn_io_mark_fn_t): Rename to svn_stream_mark_fn_t.

(svn_io_seek_fn_t): Rename to svn_stream_seek_fn_t.

(svn_io_is_buffered_fn_t): Rename to svn_stream_is_buffered_fn_t.

(svn_stream_t, svn_stream_set_skip, svn_stream_set_mark,

svn_stream_set_seek, svn_stream_set_is_buffered): Adjust uses of the same.

* subversion/libsvn_subr/subst.c

(translated_stream_mark, translated_stream_seek,

translated_stream_is_buffered): Adjust doc strings.

  1. … 2 more files in changeset.
Let the 'translated stream' implementation use the default skip handler instead

of providing its own copy of that handler. A follow-up to r1130490.

* subversion/libsvn_subr/subst.c

(translated_stream_skip): Remove.

(stream_translated): Don't install a skip handler.

Rename svn_stream_buffered() and related symbols to ...is_buffered... for

clarity.

* subversion/include/svn_io.h

(svn_io_buffered_fn_t): Rename to svn_io_is_buffered_fn_t.

(svn_stream_set_buffered): Rename to svn_stream_set_is_buffered.

(svn_stream_buffered): Rename to svn_stream_is_buffered.

* subversion/libsvn_subr/stream.c

(svn_stream_t): Rename 'buffered_fn' to 'is_buffered_fn'.

(svn_stream_set_buffered): Rename to svn_stream_set_is_buffered.

(svn_stream_buffered): Rename to svn_stream_is_buffered.

(svn_stream_create, stream_readline, svn_stream_empty,

buffered_handler_disown, svn_stream_disown, svn_stream_from_aprfile2,

svn_stream_from_stringbuf, svn_stream_from_string): Update calls.

* subversion/libsvn_subr/subst.c

(translated_stream_buffered): Rename to translated_stream_is_buffered.

(stream_translated): Update calls.

  1. … 2 more files in changeset.
This minor change to translate_chunk() reduces the checkout time of

^/subversion/trunk/subversion in my profiler by about 1% for me. If this

has the same result on production code then this patch will probably safe

quite a few trees.

This part of the code was imported from stefan2's performance branch. More

profiling results (especially from stefan2) welcome.

* subversion/libsvn_subr/subst.c

(translate_chunk): Lose temporary variable and use boolean operators

instead of bitwise.

Merge all changes (r1068695 - r1072516) from the

integrate-stream-api-extensions.

These patches add svn_stream_skip(), svn_stream_buffered()

and svn_stream_supports_mark().

  1. … 4 more files in changeset.
Constify svn_io_seek_fn_t and svn_stream_seek().

* subversion/include/svn_io.h

(svn_io_seek_fn_t),

(svn_stream_seek):

Constify the input svn_stream_mark_t * argument.

* subversion/libsvn_subr/stream.c

(svn_stream_seek),

(seek_handler_empty),

(seek_handler_disown),

(seek_handler_apr):

Constify the input svn_stream_mark_t * argument.

* subversion/libsvn_subr/subst.c

(translated_stream_seek):

Constify the input svn_stream_mark_t * argument.

  1. … 2 more files in changeset.
Reintegrate the 'uris-as-urls' branch into trunk.

(Merged /subversion/branches/uris-as-urls:r1060426-1064427.)

This should wrap up issue #2028.

  1. … 73 more files in changeset.
Extend svn_subst_translate_string2() with another parameter, REPAIR, to allow

the caller to customize whether line ending repairs are performed.

As discussed at:

http://thread.gmane.org/gmane.comp.version-control.subversion.devel/125050

* subversion/include/svn_subst.h

(svn_subst_translate_string2): Add a REPAIR parameter. Update the

documentation of the function.

* subversion/libsvn_subr/subst.c

(svn_subst_translate_string2): Add a REPAIR parameter. Pass the value through

to translate_cstring().

* subversion/libsvn_subr/deprecated.c

(svn_subst_translate_string): Call svn_subst_translate_string2() with REPAIR

set to FALSE.

* subversion/svn/util.c

(svn_cl__edit_string_externally, svn_cl__get_log_message): Call

svn_subst_translate_string2() with REPAIR set to FALSE.

* subversion/svn/propset-cmd.c

(svn_cl__propset): Call svn_subst_translate_string2() with REPAIR set to

FALSE.

* subversion/svn/lock-cmd.c

(get_comment): Call svn_subst_translate_string2() with REPAIR set to FALSE.

* subversion/svnadmin/main.c

(set_revprop): Call svn_subst_translate_string2() with REPAIR set to FALSE.

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

(test_svn_subst_translate_string2): Call svn_subst_translate_string2() with

REPAIR set to FALSE. Also test that inconsistent line endings result in

SVN_ERR_IO_INCONSISTENT_EOL when REPAIR is FALSE.

(test_repairing_svn_subst_translate_string2): New test case that tests a

repairing translation.

(test_funcs): Add test_repairing_svn_subst_translate_string2.

Patch by: Danny Trebbien <dtrebbien{_AT_}gmail.com>

  1. … 7 more files in changeset.
Just padding my stats.

(Actually, doing my regular trailing whitespace removal, similar to r875968.)

* everywhere:

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

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

done

  1. … 166 more files in changeset.
Once and for all, name all our anonymous struct/enum typedefs.

Follows up on r1040058, and with thanks to Danny Trebbien.

* everywhere:

Change 'typedef struct {} foo_t;' to 'typedef struct foo_t {} foo_t;'.

* subversion/libsvn_ra_serf/fake_sspi.h

(PSecurityFunctionTable, SecurityFunctionTable):

Manually effect the same change in the single pointer-to-struct typedef.

  1. … 95 more files in changeset.
Add a public API function, svn_subst_translate_string2(), an extension of

svn_subst_translate_string(), that has two additional output parameters for

determining whether re-encoding and/or line ending translation were performed.

As discussed at:

<http://thread.gmane.org/gmane.comp.version-control.subversion.devel/122550>

<http://thread.gmane.org/gmane.comp.version-control.subversion.devel/123020>

The essential changes are to the translate_newline() function, which now takes

an svn_boolean_t pointer, the value at which is set to TRUE if the pointer is

non-NULL and a different newline is written out. Most other changes are to pass

the svn_boolean_t pointer through to translate_newline().

* build.conf

Configure subversion/tests/libsvn_subr/subst_translate-test

* subversion/include/svn_subst.h

(svn_subst_translate_string2): New function.

(svn_subst_translate_string): Deprecate in favor of

svn_subst_translate_string2().

* subversion/libsvn_subr/subst.c

(STRING_IS_EOL): New macro that tests whether a string is an end-of-line

string ("\n", "\r", "\r\n").

(DIFFERENT_EOL_STRINGS): New macro that tests whether two end-of-line strings

are different.

(translate_newline): Add the TRANSLATED_EOL parameter. If the function

writes out a different newline, then it sets TRANSLATED_EOL to TRUE.

(translation_baton): Add the TRANSLATED_EOL field.

(create_translation_baton): Add a new parameter TRANSLATED_EOL that is

passed to the resulting translation_baton.

(translate_chunk): When calling translate_newline(), pass TRANSLATED_EOL from

the translation_baton.

(stream_translated): New static function. Its implementation is the old

implementation of svn_subst_stream_translated(), but accepting another

parameter, TRANSLATED_EOL, that is passed to the in/out translation batons

that it creates.

(svn_subst_stream_translated): Now a wrapper for stream_translated().

(translate_cstring): New static function. Its implementation is the old

implementation of svn_subst_translate_cstring2(), but modified to accept

another parameter, TRANSLATED_EOL, that is passed to stream_translated().

(svn_subst_translate_cstring2): Now a wrapper for translate_cstring().

(svn_subst_translate_string): Move to deprecated.c.

(svn_subst_translate_string2): New function. It takes three additional

parameters: TRANSLATED_TO_UTF8, TRANSLATED_LINE_ENDINGS, and another pool

parameter. The task of recording whether it translates a line ending is

delegated to translate_cstring().

* subversion/libsvn_subr/deprecated.c

(svn_subst_translate_string): Now a wrapper for svn_subst_translate_string2().

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

New test suite for the svn_subst_translate_* functions.

Patch by: Danny Trebbien <dtrebbien{_AT_}gmail.com>

  1. … 4 more files in changeset.
* subversion/libsvn_subr/subst.c

(translation_baton, translate_chunk): Typo, and minor formatting and

wording tweaks.

Merge the r986453 group from the performance branch.

See the branch for original log messages.

The STATUS entry for this group was:

* r986453, r1029092, r1029335, r1030763

An even larger change: Speed up file translation by further optimizing

the search for "interesting chars" and replacing EOLs only if they

have actually changed (allowing for larger chunks of data per write

output operation). The third patch fixes a svn_tristate_t comparison

issue.

Note:

r1029092 and r1030763 are docstring changes.

Justification:

Apart from the physical I/O and the MD5 translation, this is the

most CPU-demanding part of an svn export. This patch more than

doubles its performance. It should also speed up svn checkout by

the same amount (not factor) of time.

  1. … 1 more file in changeset.
* subversion/libsvn_subr/subst.c

(translate_write): Simplify, removing an ineffective check. No functional

change.

(translate_newline): Re-write the doc string to fix errors and omissions.

Tweak comments.

Merge r985037, r985046, r995507 and r995603 from the performance branch.

These changes introduce the svn_stringbuf_appendbyte() function, which has

significantly less overhead than svn_stringbuf_appendbytes(), and can be

used in a number of places within our codebase.

r995507 is the removal of an extra function on the branch. This function

conflicted with previous revisions in the merge, and is itself no longer on

trunk.

  1. … 20 more files in changeset.
Make seeking to the start of an svn_stream_t an operation handled by the

seek callbacks, instead of using a separate callback. We can do this

by handling NULL as a generic marker for the start of the stream.

Resetting and seeking were both added during 1.7 development to help

with building diff/patch support over streams, so we can still change

this now.

* subversion/include/svn_error_codes.h

(SVN_ERR_STREAM_RESET_NOT_SUPPORTED): Remove error code.

(SVN_ERR_STREAM_SEEK_NOT_SUPPORTED): Renumber error code.

* subversion/include/svn_io.h

(svn_io_reset_fn_t): Remove typedef.

(svn_stream_set_reset): Remove function.

(svn_stream_seek): Update documentation.

* subversion/libsvn_subr/stream.c

(svn_stream_t): Remove reset_fn.

(svn_stream_create): Don't initialize reset_fn.

(svn_stream_set_reset): Remove function.

(svn_stream_reset): Just call svn_stream_seek().

(reset_handler_empty): Remove function.

(mark_handler_empty): Set output argument.

(svn_stream_empty): Don't set reset handler.

(reset_handler_disown): Remove function.

(svn_stream_disown): Don't set reset handler.

(reset_handler_apr): Remove function. Move seek to start support into ...

(seek_handler_apr): ... this function.

(svn_stream_from_aprfile2): Don't set reset function.

(svn_stream_from_aprfile_range_readonly): Don't set reset function.

(reset_handler_stringbuf): Remove function. Move support into ...

(seek_handler_stringbuf): ... this function.

(svn_stream_from_stringbuf): Don't set reset function.

(string_stream_mark): New struct.

(mark_handler_string): New function.

(seek_handler_string): New function.

(svn_stream_from_string): Set mark and seek handlers.

* subversion/libsvn_subr/subst.c

(translated_stream_reset): Remove function. Move code into ...

(translated_stream_seek): ... this function.

(svn_subst_stream_translated): Don't set reset function.

  1. … 3 more files in changeset.
Revert additional pool lifetime requirements introduced in r937275.

* subversion/include/svn_subst.h,

subversion/libsvn_subr/subst.c

(svn_subst_stream_translated): Copy EOL_STR and KEYWORDS into

RESULT_POOL to make sure they have sufficient lifetime, and remove

pool lifetime restrictions for EOL_STR and KEYWORDS from docstring.

Suggested by: julianfoad

gstein

  1. … 1 more file in changeset.
A little simplification.

* subversion/libsvn_subr/subst.c

(translated_stream_mark): Use apr_pmemdup() instead of alloc and copy.

Deprecate svn_subst_copy_and_translate3() in favor of a version that has a

cancellation function.

* subversion/include/svn_subst.h:

(svn_subst_copy_and_translate4): new function, like the translate3

version, but with CANCEL_FUNC/BATON.

(svn_subst_copy_and_translate3): mark as deprecated

* subversion/libsvn_subr/subst.c:

(detranslate_special_file): take a CANCEL_FUNC/BATON param pair and pass

it along to svn_stream_copy3(). add an svn_error_return

(svn_subst_copy_and_translate3): renamed to ...

(svn_subst_copy_and_translate4): ... this, and take a CANCEL_FUNC/BATON

pair. pass CANCEL_FUNC/BATON to detranslate_special_file and

svn_stream_copy3.

* subversion/libsvn_subr/deprecated.c:

(svn_subst_copy_and_translate3): new. call svn_subst_copy_and_translate4

with NULL for the CANCEL_FUNC/BATON.

(...): add some svn_error_return love

  1. … 2 more files in changeset.
* subversion/libsvn_subr/subst.c:

(translated_stream_close): get rid of the baton's iterpool

Pool usage fixes in the translation stream.

Do not maintain a private pool for each translation stream,

because the user cannot control unbound growth of this "secret" pool.

Instead, rely on callers to provide pools with sufficient lifetime

when the stream is created. "make check" agrees.

Suggested by: gstein

* subversion/include/svn_subst.h

(svn_subst_stream_translated): Rename POOL argument to RESULT_POOL.

Document pool lifetime requirements for EOL_STR and KEYWORDS parameters.

* subversion/libsvn_subr/subst.c

(dup_translation_baton): Remove. This was short enough not to be worth

a separate function.

(translated_stream_baton): Define macro SVN__TRANSLATION_BUF_SIZE for

size of BUF member. Remove POOL member.

(translated_stream_read): Remove local variable ITERPOOL, which was just

an alias for B->iterpool, which use directly.

(translated_stream_close): Stream-private pool was removed so stop

destroying it.

(translated_stream_mark): Track removal of dup_translation_baton() and

re-implement it inline where needed. Use SVN__TRANSLATION_BUF_SIZE.

(translated_stream_seek): Avoid re-allocations while restoring translation

state.

(svn_subst_stream_translated): Rename POOL to RESULT_POOL. Stop copying

things into the stream-private pool, rely on the caller to provide items

with sufficient lifetime instead. Use SVN__TRANSLATION_BUF_SIZE.

  1. … 1 more file in changeset.