subversion

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

Changeset 1412636 is being indexed.

Following up on r1412632, fix name of new svn_wc__db_ function and use this

function for all calculations on where to obtain a working copy lock.

* subversion/libsvn_wc/lock.c

(child_is_disjoint): Simplify function by using svn_wc__db_is_switched().

(svn_wc__acquire_write_lock): Use svn_wc__db_is_switched() instead of all

the separate db calls. Remove tests on cases that could never happen since

the switch to a single database per working copy.

* subversion/libsvn_wc/props.c

(svn_wc__internal_get_iprops): Update caller.

* subversion/libsvn_wc/update_editor.c

(svn_wc__check_wc_root): Update caller.

* subversion/libsvn_wc/wc_db.c

(db_is_switched): Return error on 'hidden' nodes, even when they have a

repos_relpath.

(svn_wc_db__is_switched): Rename to...

(svn_wc__db_is_switched): ... this.

* subversion/libsvn_wc/wc_db.h

(svn_wc_db__is_switched): Rename to...

(svn_wc__db_is_switched): ... this.

Improve performance of fetching inherited properties from the local working

copy by reducing the number of db transactions required while walking up the

tree.

Some of the optimizations also help other common code paths.

* subversion/libsvn_wc/props.c

(svn_wc__internal_get_iprops): Use svn_wc_db__is_switched() instead of wrapper

that doesn't detect switched files, etc.

* subversion/libsvn_wc/update_editor.c

(svn_wc__check_wc_root): Call svn_wc_db__is_switched() to do the real work.

The implementation of this function has been moved to that function.

* subversion/libsvn_wc/wc_db.c

(svn_wc__db_read_cached_iprops): Avoid calling read_info for an easy out, as

that by itself is just as expensive as the hard work. Don't call the

op_depth_of() function that performs another db transaction, just to ignore

the result. Make sure the result of 'no iprops stored' doesn't change.

(db_is_switched_baton_t): New struct.

(db_is_switched): New function.

(svn_wc_db__is_switched): New function.

* subversion/libsvn_wc/wc_db.h

(svn_wc_db__is_switched): New function.

* subversion/libsvn_subr/string.c

(svn_string__similarity): Typo fix.

Groundwork for issue #4261. Add svn_string_t based similarity scorer.

* subversion/include/private/svn_string_private.h

(svn_string__similarity): New prototype.

* subversion/libsvn_subr/string.c

(svn_string__similarity): Rename from svn_cstring__similarity.

Fix suffix scanner to not rely on NUL-termination.

(svn_cstring__similarity): Reimplement as wrapper of svn_string__similarity.

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

(test_string_similarity): Add test for sized, non-NUL-terminated case.

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

(delete_fs): Avoid spurious cleanup FAIL.

* subversion/include/private/svn_string_private.h

(svn_cstring__similarity): "ratio OF" ... "characteR-based" ...

* subversion/include/private/svn_string_private.h

(svn_cstring__similarity): Tweak docstring.

Groundwork for issue #4261. Utility for calculating string similarity.

* subversion/include/private/svn_string_private.h

(svn_cstring__similarity): New prototype.

* subversion/libsvn_subr/string.c

(svn_cstring__similarity): Implement.

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

(test_string_similarity): New test case.

(test_funcs): Register test_string_similarity.

Groundwork for issue #4261. Invent memory buffers.

* subversion/include/private/svn_string_private.h

(svn_membuf_t, svn_membuf__create,

svn_membuf__ensure, svn_membuf__resize,

svn_membuf__zero, svn_membuf__nzero): New prototypes.

SVN_MEMBUF__ZERO, SVN_MEMBUF__NZERO): New macros.

* subversion/libsvn_subr/string.c

(svn_membuf_t, svn_membuf__create,

svn_membuf__ensure, svn_membuf__resize,

svn_membuf__zero, svn_membuf__nzero): Implement.

Fix one of the two or three bugs in r1412382. This one caused diff-diff3-tests 2

to fail, and was basically the same bug that I only partly fixed in r1412397.

* subversion/libsvn_diff/diff_memory.c

(svn_diff_mem_string_output_unified2): Correctly handle hunk_delimiter being NULL.

Fix one of the two or three bugs in r1412382. This one caused diff_tests.py 66

to fail.

* subversion/tests/cmdline/diff_tests.py

(diff_properties_no_newline): Apply and test the changes one at a time

because we don't guarantee the order of diff output.

Fix one of the two or three bugs in r1412382. This one caused diff-diff3-tests 1

and 3 to fail.

* subversion/libsvn_diff/diff_memory.c

(svn_diff_mem_string_output_unified2): Cope with hunk_delimiter being NULL.

Correct the issuing of '\ No newline ...' messages in property diffs.

The property diff code was not correctly identifying whether a final newline

was present. It was only printing the 'No newline' message once for the

'new' value of the property, and ignoring whether the 'old' value ended with

a newline.

* subversion/include/private/svn_diff_private.h

(SVN_DIFF__NO_NEWLINE_AT_END_OF_FILE,

SVN_DIFF__NO_NEWLINE_AT_END_OF_PROPERTY): New string constants.

* subversion/include/svn_diff.h

(svn_diff_mem_string_output_unified2): Add a special behaviour when the

hunk delimiter is '##': change the 'No newline' message to say

'property' instead of 'file'.

* subversion/libsvn_diff/diff_memory.c

(unified_output_baton_t): Add a 'no_newline_string' member.

(output_unified_token_range): Use 'no_newline_string' instead of a fixed

string.

(svn_diff_mem_string_output_unified2): Initialize the 'no_newline_string'

depending on the hunk delimiter specified.

* subversion/libsvn_diff/util.c

(svn_diff__unified_append_no_newline_msg): Use the new defined constant.

(maybe_append_eol): Remove.

(svn_diff__display_prop_diffs): Remove the attempted special handling of

'No newline' messages; let svn_diff_mem_string_output_unified2() do it.

* subversion/tests/cmdline/diff_tests.py

(diff_properties_no_newline): New test.

(test_list): Add it.

Fix most of the warnings I'm seeing in fsfs-reorg.c and fsfs-stats.c.

* tools/server-side/fsfs-reorg.c

(read_revision_header, compare_noderev_offsets,

compare_representation_offsets): Don't cast away 'const'.

(find_noderev, write_revisions, update_text, get_fragment_content): Make

printf format specifiers match the data type.

* tools/server-side/fsfs-stats.c

(representation_t): Use svn_revnum_t for revision numbers.

(read_revision_header, compare_representation_offsets): Don't cast away

'const'.

(find_representation, read_rep_base, parse_representation): Use

svn_revnum_t for revision numbers.

(parse_dir): Make printf format specifiers match the data type.

Un-break Windows build by declaring the new private diff header file.

Also include that before defining the function declared therein, so the

compiler sees the prototype. A follow-up to r1412264.

* build.conf

(libsvn_diff): Mention 'private\svn_diff_private.h'.

* subversion/libsvn_diff/util.c

Include 'private/svn_diff_private.h'.

Fix a bit of pool usage sloppiness in mod_dav_svn's update logic.

* subversion/mod_dav_svn/reports/update.c

(send_propchange): Use a pool with a shorter lifetime for the

XML-quoted property name, and definitely don't bother dup'ing that

name (which is getting dropped directly onto the wire).

Move the declaration of the first private libsvn_diff API into its own

header. A follow-up to r1412225.

Suggested by: rhuijben

* subversion/include/private/svn_diff_private.h

New file, declaring svn_diff__display_prop_diffs().

* subversion/include/svn_diff.h

(svn_diff__display_prop_diffs): Move to svn_diff_private.h.

* subversion/libsvn_client/diff.c,

subversion/svnlook/main.c

Include svn_diff_private.h.

    • ?
    /trunk/subversion/include/private/svn_diff_private.h
Factor out the display of property diffs from 'svn' and 'svnlook'. No

functional change.

* subversion/include/svn_diff.h

(svn_diff_mem_string_output_unified2): Clarify how the header parameters

are used.

(svn_diff__display_prop_diffs): New function.

* subversion/libsvn_diff/util.c

(maybe_append_eol): Move here; was identical in the other two files.

(display_mergeinfo_diff): Move here from libsvn_client/diff.c.

(svn_diff__display_prop_diffs): New function, extracted from

display_prop_diffs() in each of the other two files.

* subversion/libsvn_client/diff.c

(display_mergeinfo_diff, maybe_append_eol): Move to libsvn_diff/util.c.

(display_prop_diffs): Factor out the body as svn_diff__display_prop_diffs().

* subversion/svnlook/main.c

(maybe_append_eol): Move to libsvn_diff/util.c.

(display_prop_diffs): Factor out the body as svn_diff__display_prop_diffs().

Fix a potential erratic behaviour in 'svnlook diff' showing property diffs. The

options to ignore white space and EOL-style were uninitialized for property

diffs, so could have been applied sometimes and not other times. I have not

confirmed whether this ever actually happened.

* subversion/svnlook/main.c

(display_prop_diffs): Initialize the 'options' to zero/false.

Improve suggested steps configure prints out when apr and apr-util are not

found.

* build/ac-macros/aprutil.m4

(SVN_DOWNLOAD_APRUTIL): Suggest apr-util 1.5.x and make how to run buildconf

clearer.

* build/ac-macros/apr.m4

(SVN_DOWNLOAD_APR): Suggest apr 1.4.x and apr-util 1.5.x and make how to run

buildconf clearer.

A follow-up to r1412063: remove a redundant svn_stream_for_stdout() call.

* subversion/svnlook/main.c

(display_prop_diffs): Remove it, as an open stream is passed in.

Following up on r1412034, switch the entire svnlook diff handling to using a

single output stream. This avoids required flushes when switching between

output methods.

Switching all the time introduced all kinds of hidden errors. This removes

all these corner cases in one step.

* subversion/svnlook/main.c

(display_prop_diffs): Add stream and encoding arguments and use these.

(print_diff_tree): Add stream and encoding arguments and switch to using the

stream apis for all output. Remove the now unnecessary flushes. Move flush

comment to caller.

(do_diff): Flush once and then pass a stream + encoding to the diff handling.

Flush output buffers in svnlook before switching output method.

This fixes the svnlook tests on Windows.

* subversion/svnlook/main.c

(display_prop_diffs): Following up on r1411948, remove no longer required

flush, as we don't add data in this buffer here.

(print_diff_tree): Add flush after printing header. This depended on the

flush in display_prop_diffs for correctness, but this was too late

since r1411948.

ra_serf: Fix memory usage a bit.

* subversion/libsvn_ra_serf/util.c

(setup_serf_req): Destroy original body bucket after copying it to

spillbuf.

* build/ac-macros/sqlite.m4

(SVN_DOWNLOAD_SQLITE): Minor correction to build directions.

Merge the r1403964 group from trunk:

* r1403964, r1403982, r1410106, r1410203

Make fs_fs properly cleanup after a failed transmission of a representation.

Justification:

Read errors can create problems for users of the WANdisco replicator

which does retry requests. Can result in garbage representations in the

rev file.

Also, can cause false-positive "A previous representation is being written

by this process" errors.

Votes:

+1: breser, danielsh, philip

Remove the '1.6.x-rep_write_cleanup' branch, reintegrated in r1411982.
Reintegrate the 1.6.x-rep_write_cleanup branch:

* r1403964, r1403982, r1410106, r1410203

Make fs_fs properly cleanup after a failed transmission of a representation.

Justification:

Read errors can create problems for users of the WANdisco replicator

which does retry requests. Can result in garbage representations in the

rev file.

Notes:

Branch is required since our client code needs a small tweak to deal

with pool lifetimes to make the fix work properly with ra_local. We'd

made a similar change with wcng in 1.7 already.

Branch:

^/subversion/branches/1.6.x-rep_write_cleanup

Votes:

+1: breser, danielsh, stefan2

On the 'issue-4194-dev' branch: sync with recent trunk changes.

(Merged /subversion/trunk:r1411796-1411976)

Allow 'http-timeout' to be set to 0 in ra_serf as it could be for

ra_neon (to indicate "no timeout").

* subversion/libsvn_ra_serf/serf.c

(load_config): Allow timeout value of 0.

* subversion/libsvn_ra_serf/replay.c

(svn_ra_serf__replay_range): If the session timeout is 0, don't

bother tracking the "wait time remaining".

* subversion/libsvn_ra_serf/update.c

(finish_report): Same here.

* subversion/libsvn_ra_serf/util.c

(svn_ra_serf__context_run_wait): And again here.