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

Changeset 1130498 is being indexed.

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.
Digest feedback by gstein for r936844.

* subversion/libsvn_subr/subst.c

(keywords_hash_deep_copy): Remove. No longer needed as per change below.

(dup_translation_baton): Don't make a deep copy of keywords, since they

have at last the same lifetime as the translated stream.

(mark_translated_t): Rather than storing a pointer to the saved baton,

use a nested struct. Saves an allocation and some dereferencing.

(translated_stream_mark, translated_stream_seek): Rename MARK_TRANSLATED

to just MT for readability. Track above change in mark_translated_t.

(svn_subst_stream_translated): Restore the body of keywords_hash_deep_copy()

here. It's not used elsewhere anymore so there is no point in having a

separate function.

* subversion/libsvn_subr/subst.c

(keywords_hash_deep_copy): Un-constify the KEYWORDS parameter again.

As the compiler noted, we need to pass this on in non-const form.

Hopefully fix issue #3616, "Mark/seek in svn_subst_stream_translated() -

needs to restore translation state"

"Hopefully" because an apparent bug in the translation stream prevents

a new test which attempts to verify the fix from passing.

* subversion/libsvn_subr/subst.c

(keywords_hash_deep_copy, dup_translation_baton): New helper functions.

(mark_translated_t): New type.

(translated_stream_mark, translated_stream_seek): Save translation state

upon mark, and restore it upon seek.

(svn_subst_stream_translated): Drive-by comment fix, and call the new

keywords_hash_deep_copy() helper which is based on code which used to

live here.

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

(): Include svn_subst.h.

(test_funcs): Add new test.

(test_stream_seek_translated): New test. Currently XFail because of

aforementioned bug, which was discussed on IRC as follows:

<stsp> svn_subst_stream_translated() does not expand keywords if

they're not read in their entirety by the caller

<stsp> is that a bug?

<stsp> i would expect that, if I have the input containing a keyword

such as One$MyKeyword$Two, which expands to "my keyword expanded",

and I read up to the position of the character K, the result would

be "Onemy"

<stsp> but what is actually returned from svn_stream_read is One$My

<stsp> that makes setting a mark within a keyword rather pointless

<julianf> stsp: ew, that's an ugly bug in stream_translated.

<julianf> That's just waiting to blow up.

<stsp> julianf, yeah I think it should read ahead, expand the keyword,

and return part of the expansion

<julianf> +1

Review by: julianfoad

philip

  1. … 1 more file in changeset.
Optimize the search for 'interesting' characters that control the

keyword substitution.

* subversion/libsvn_subr/subst.c

(translation_baton): The 'interesting' member is now a boolean array.

(create_translation_baton): Adapt initialization code.

(translate_chunk): Eliminate call to strchr.

Patch by: stefanfuhrmann < at > alice-dsl.de

Speed up input stream processing in config parser and others that read

single bytes from a stream.

* subversion/libsvn_subr/subst.c

(translated_stream_read): Add an optimized code path for single byte read

requests.

Patch by: Stefan Fuhrmann <stefanfuhrmann{_AT_}alice-dsl.de>

* subversion/libsvn_subr/subst.c

(translated_stream_read, translated_stream_write, translated_stream_close,

translated_stream_reset, translated_stream_mark, translated_stream_seek):

Add simple doc strings.

Make svn patch contract keywords on input and expand them on output.

Keywords do not interfere with the patching process anymore, and are

expanded in the patched result. Also, write the correct EOL-style

to the patched result if an svn:eol-style property is set on the target.

* subversion/include/svn_subst.h

(svn_subst_stream_translated): Document support for mark/seek feature.

* subversion/libsvn_client/patch.c

(): Include svn_props.h.

(patch_target_t): Fix error in comment. New fields KEYWORDS and EOL_STYLE.

(init_patch_target): Evaluate svn:keywords and svn:eol-style. Correctly

create the translation streams for patched result and reject file.

Move everything which needs to be done if the target already exists

into the same if-block.

(read_line): Return a plain const char * rather than a stringbuf.

Contract keywords after reading the line (wrapping a translation stream

around a stream reading from a range of a file interferes with

EOF-detection in svn_stream_readline(), so we need to contract keywords

manually -- I know this sounds really wrong but it's not trivial for me

to fix).

(seek_to_line, copy_lines_to_target): Track read_line() parameter change.

(match_hunk): As previous, but also contract keywords after reading

a line from the patch file in case the patch contains expanded keywords.

(scan_for_match): Constify a pointer. Don't allow rejected hunks to

block another hunk from matching (not that they did, but it's nice to

be explicit about it).

(get_hunk_info): Improve a comment.

* subversion/libsvn_subr/subst.c

(translated_stream_mark, translated_stream_seek): New.

(svn_subst_stream_translated): Set mark and seek handlers.

* subversion/tests/cmdline/patch_tests.py

(patch_unidiff_keywords): New test. Tests patch application where the

target contains expanded keywords but the patch does not ('svn diff'

contracts keywords so this should be the common case).

(test_list): Add new test.

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

* 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.
* subversion/libsvn_subr/subst.c

(svn_subst_copy_and_translate3): Wrap a few errors.

Scrub trailing whitespace throughout (see r35894).

  1. … 146 more files in changeset.