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

Changeset 1874057 is being indexed.

Escape filenames when invoking $SVN_EDITOR

Per https://subversion.apache.org/faq.html#svn-editor, $SVN_EDITOR is invoked

through the shell instead of directly executed. The user is expected to

properly escape/quote $SVN_EDITOR, but svn was putting the filename directly

into the command without any escaping. This therefore breaks attempts to,

e.g., run the editor from the merge conflict dialog when a path has special

characters.

Update locations where we invoke the editor to quote the filename as well as

escape shell special characters using apr_pescape_shell(). The quotes are

needed in addition to the escaping, since apr_pescape_shell() does not escape

whitespace.

* subversion/libsvn_subr/cmdline.c

(svn_cmdline__edit_file_externally, svn_cmdline__edit_string_externally):

Quote and escape, via apr_pescape_shell(), the filename in the command line.

* subversion/tests/cmdline/update_test.py

(update_accept_conflicts): Rename "A/D/G/pi" to "A/D/G/p i" before performing

the merge, so the test exercises the changes above.

  1. … 1 more file in changeset.
Fix test failures seen on 32-bit architectures (Fedora Raw Hide, both

i686 and armv7hl) when building with GCC 10 snapshots.

* subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c

(get_rev_contents): Avoid signed integer overflow on platforms with

32-bit long.

Follow-up to r1872925:

* subversion/tests/README: Add missing case 'SKIP' to the synopsis.

Fix issue #4840 "Merge assertion failure in svn_sort__array_insert".

This replaces the implementation of svn_rangelist_merge2() with a correct

and simpler one.

* subversion/libsvn_subr/mergeinfo.c

(adjust_remaining_ranges,

rangelist_merge2): Delete.

(rangelist_interval_kind_t,

rangelist_interval_t,

rangelist_interval_iterator_t,

rlii_update,

rlii_next_any_interval,

rlii_first,

rlii_next,

rangelist_builder_t,

rl_builder_new,

rl_builder_flush,

rl_builder_add_interval,

rangelist_merge): New.

(svn_rangelist_merge2): Adjust to call the new implementation.

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

(test_rangelist_merge_canonical_result,

test_rangelist_merge_array_insert_failure,

test_rangelist_merge_random_canonical_inputs,

test_rangelist_merge_random_semi_c_inputs): Remove XFAIL.

  1. … 1 more file in changeset.
Fix test expectations of an XFAIL test.

For issue #4840 "Merge assertion failure in svn_sort__array_insert".

Follow-up to r845298 (r5224):

* subversion/tests/README: Add missing cases to the synopsis.

Fix weak test coverage.

In the tests for "semi-canonical" and "canonical" kinds of inputs to

svn_rangelist_merge2(), the input generator previously called "generate a

random non-validated input" repeatedly until it passed certain quality

tests. That made the result heavily biased towards very simple cases.

As a result, the coverage of the "semi-canonical" and "canonical" tests

missed the failure mode of the original bug report #4840.

This generates "semi-canonical" and "canonical" inputs with a fairer

distribution, increasing their coverage to include that failure mode.

For issue 4840 "Merge assertion failure in svn_sort__array_insert"

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

(rand_interval_triangular): New.

(rangelist_random_non_validated): Use it.

(int_compare,

ascending_values): New.

(rangelist_random_semi_canonical,

rangelist_random_canonical): Rewrite.

(add_failure_mode): Deduplicate 'Attempted insert at index ...' messages.

Use the variable I declared in r1872921.
Add comments about parameters of random input generation.

For issue #4840 "Merge assertion failure in svn_sort__array_insert".

Report each failure mode only once in random-input tests.

Instead of printing each case that fails, print only the first example of

each failure mode. This makes it easier to manually check that test has

enough coverage. (Programmatic checks for particular coverage could be

added.)

For issue 4840 "Merge assertion failure in svn_sort__array_insert"

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

(new_response): New.

(test_rangelist_merge_random_canonical_inputs,

test_rangelist_merge_random_semi_c_inputs,

test_rangelist_merge_random_non_validated_inputs): Use it.

New test for issue 4840 "Merge assertion failure in svn_sort__array_insert".

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

(test_rangelist_merge_array_insert_failure): New test.

(test_funcs): Run it, XFAIL.

Make random-input mergeinfo tests repeatable.

The pseudo-random sequence used in each random-input mergeinfo test is now

repeatable and independent of other tests.

This ensures the test results are repeatable and avoids occasional

unexpected pass of expected-fail tests.

For issue #4840, "Merge assertion failure in svn_sort__array_insert".

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

(rand_less_than): Use a passed-in state ('seed').

(rangelist_random_non_validated,

rangelist_random_semi_canonical,

rangelist_random_canonical,

mergeinfo_random_non_validated): Pass through the state.

(test_rangelist_merge_random_canonical_inputs,

test_rangelist_merge_random_canonical_inputs,

test_rangelist_merge_random_semi_c_inputs,

test_mergeinfo_merge_random_non_validated_inputs):

Keep random state separately in each test.

Fix a test crash in non-debug builds.

A follow-up to r1872121.

Found by: nathanhartman

subversion/tests/libsvn_subr/mergeinfo-test.c

(rangelist_to_string): Properly skip error trace links.

* subversion/tests/cmdline/pegrev_parse_tests.py: Set the executable bit,

as already set on all sibling *_tests.py files.

Random-input testing for svn_mergeinfo_merge2().

For issue #4840, "Merge assertion failure in svn_sort__array_insert".

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

(mergeinfo_random_non_validated,

mergeinfo_to_string_debug,

mergeinfo_merge_random_inputs): New.

(test_mergeinfo_merge_random_non_validated_inputs): New test.

(test_funcs): Run it.

Avoid aborting on assertion failure in the area of mergeinfo calculations.

Instead, raise a catchable assertion error.

If an error occurs in svn_rangelist_merge2(), produce a more detailed error

message to aid in debugging.

Introduce and use 'svn_sort__array_insert2()' which checks its inputs. The

old version of this function was aborting on out-of-range inputs. Introduce

and use 'svn_sort__array_delete2()' likewise, as similar issues may show up

here too. The old version of this function was ignoring calls with

out-of-range inputs. The old versions of both functions are still in use

elsewhere in the Subversion libraries.

For issue #4840, "Merge assertion failure in svn_sort__array_insert".

* subversion/include/private/svn_sorts_private.h,

subversion/libsvn_subr/sorts.c

(svn_sort__array_insert2,

svn_sort__array_delete2): New.

* subversion/libsvn_client/merge.c

(slice_remaining_ranges,

insert_child_to_merge): Allow returning an error.

Everywhere: use svn_sort__array_insert2() and svn_sort__array_delete2().

* subversion/libsvn_subr/mergeinfo.c

(adjust_remaining_ranges): Allow returning an error.

(dual_dump): Replace this old debug helper...

(rangelist_to_string_debug): ... with this new one.

(svn_rangelist_merge2): Extract the body of this function into a local

'rangelist_merge2', leaving the original as an error-checking

wrapper. If an error occurs, report its inputs.

(rangelist_is_sorted): New.

Everywhere: use svn_sort__array_insert2() and svn_sort__array_delete2().

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

(test_rangelist_merge_random_non_validated_inputs): Expect assertion

failures; ignore them.

(test_funcs): Expect that test to pass now.

  1. … 4 more files in changeset.
Use a matching integer type instead of casts, as a cleaner follow-up to r1872108.

Suggested by: brane

Avoid integer conversion warning. A follow-up to r1872107.

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

(rangelist_to_array): Add explicit casts.

Random-input testing for issue #4840, "Merge assertion failure in

svn_sort__array_insert".

This adds tests for svn_rangelist_merge2() with canonical inputs,

with "semi-canonical" inputs which meet criteria described in its

doc string, and with non-validated inputs.

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

(...): Helper functions.

(test_rangelist_merge_random_canonical_inputs,

test_rangelist_merge_random_semi_c_inputs,

test_rangelist_merge_random_non_validated_inputs): New tests.

(test_funcs): Run them.

Add a test for a case of non-canonical output from svn_rangelist_merge2().

For issue #4840, "Merge assertion failure in svn_sort__array_insert".

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

(test_rangelist_merge_canonical_result): New test.

(test_funcs): Run it.

In help text, remove obsolete examples of 'svn switch --relocate'.

* subversion/svn/svn.c

Remove it from help text.

* subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout

Remove it from test expectation.

  1. … 1 more file in changeset.
Improve test coverage of shelf diff.

* subversion/tests/cmdline/shelf_tests.py

(shelve_unshelve_verify): Also run a diff; ensure something comes out and

it doesn't crash.

(shelf_diff_simple): Test delete-file and add-file as well as modify-file.

Tests: Fix running getopt_tests.py by itself via 'make check TESTS='

When the entire test suite was run with 'make check', tests in

getopt_tests.py would pass. But when just getopt_tests.py was run via

'make check TESTS=subversion/tests/cmdline/getopt_tests.py', all its

tests would fail.

* subversion/tests/cmdline/getopt_tests.py

(load_expected_output):

Move construction of getopt_output_dir string from global name

space into load_expected_output function.

Patch by: danielsh

  1. … 3 more files in changeset.
getopt_tests.py: Adjust expected 'svn help' output

* subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout

Adjust expected text output of 'svn help log switch' to match

changes to text wrapping in r1870689.

Fix issue #4837 'Cannot get info for a file that was inside of

file-replaced directory'.

* subversion/libsvn_client/info.c

(same_resource_in_head): 'Not a directory' error means not related.

* subversion/tests/cmdline/info_tests.py

(info_item_failures): Remove XFail.

  1. … 1 more file in changeset.
Add a regression test for issue #4837 'Cannot get info for a file that

was inside of file-replaced directory'.

Based on the test script sent by Nathan Hartmann.

* subversion/tests/cmdline/info_tests.py

(info_file_in_file_replaced_dir): New test, XFail.

(test_list): Run it.

Various spelling fixes, no functional change

* contrib/client-side/svn-clean

(--exclude): s/exluded/excluded/

* subversion/include/svn_error_codes.h

(SVN_ERR_X509_CERT_VERIFY_FAILED): s/Certficate/Certificate/

* subversion/po/de.po,

subversion/po/ja.po,

subversion/po/ko.po,

subversion/po/pl.po,

subversion/po/sv.po:

(): s/Certficate/Certificate/; s/abandonded/abandoned/

* subversion/libsvn_repos/repos.c:

(): s/abandonded/abandoned/

* subversion/libsvn_repos/repos.c,

subversion/svnadmin/svnadmin.c,

subversion/tests/libsvn_client/client-test.c:

(): s/filesytem/filesystem/

  1. … 9 more files in changeset.
'info': Support multiple items in --show-item, as tab-separated values (TSV).

Suggested by: brane

Thread:

.

https://mail-archives.apache.org/mod_mbox/subversion-dev/201911.mbox/%3Cf6dc88d3-8227-4f22-768c-2cf6ce70fcb7%40apache.org%3E

Date: Thu, 7 Nov 2019 17:28:35 +0100

From: Branko Čibej <brane@apache.org>

To: dev@subversion.apache.org

Subject: svn status tabbed output [was: Re: svn status should not show unmodified files in changelists]

Message-ID: <f6dc88d3-8227-4f22-768c-2cf6ce70fcb7@apache.org>

* subversion/svn/info-cmd.c

(print_info_baton_t::print_what): Rename to..

(print_info_baton_t::print_whats): .. this.

(find_print_what): Rename argument and parse it as a list.

(print_info_item): Track changes to the baton.

(svn_cl__info): Track changes to the baton.

* subversion/svn/svn.c

(svn_cl__options."show_item"): Update docstring.

* subversion/tests/cmdline/info_tests.py

(info_item_simple): Extend existing test case to unit test this feature.

Blocks that haven't been reindented in this commit will be reindented in the

next commit.

  1. … 3 more files in changeset.
Fix false positive on test with Python 3

* subversion/tests/cmdline/svnadmin_tests.py

(dump_no_canonicalize_svndate): Make sure expected line to be bytes object.

* subversion/tests/cmdline/tree_conflict_tests.py

(local_missing_dir_endless_loop): Use text mode I/O operations.

Tested by: jcorvel

Approved by: danielsh