Checkout Tools
  • last updated 6 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
'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

Add 'svn diff' regression test for SVN-1722.

* subversion/tests/cmdline/diff_tests.py

(diff_nonexistent_in_wc): New test.

(test_list): Run it.

Normalize line endings in node properties (such as svn:ignore) when loading

dumps with `svnadmin load --normalize-props`.

Previously, this command would only normalize revision properties, but

do nothing for node properties.

The problem has been reported by a user in the following thread:

https://lists.apache.org/thread.html/86a018501fde594b4ebf4080143bcb9562b0482d794206e27de86836@%3Cusers.subversion.apache.org%3E

* subversion/libsvn_repos/load-fs-vtable.c

(change_node_prop): Accept the new `normalize_props` argument, call

svn_repos__normalize_prop() for the property if it is set.

(set_node_property, delete_node_property, remove_node_props):

Update calling sites of the change_node_prop() function, pass the

stored `normalize_props` state of the parser.

* subversion/tests/cmdline/svnadmin_tests.py

(load_normalize_node_props): New regression test.

(test_list): Add new test.

  1. … 1 more file in changeset.
* subversion/tests/cmdline/svnserveautocheck.sh

(random_port): Fix syntax error when $PYTHON is Python 3.

Update wiki links to point to the new(ish) Confluence Wiki.
  1. … 4 more files in changeset.
Increment the trunk version number to 1.14, and introduce a new CHANGES

section, following the creation of the 1.13.x release branch.

* subversion/include/svn_version.h,

subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java,

subversion/tests/cmdline/svntest/main.py

(SVN_VER_MINOR): Increment to 14.

* CHANGES: New section for 1.14.0.

  1. … 3 more files in changeset.
mod_dav_svn: Set Last-Modified response header for 'external' GET requests

(i.e. requests to URI's not under /!svn). This partially reverts r1724790

which removed it for all GET requests, for performance reasons (however, for

external requests the Last-Modified header is needed for certain use cases).

See this thread on dev@:

https://lists.apache.org/thread.html/51f4f1fb5363c1d1c393f6ab769b12b9c7914af583fc333c652306d0@%3Cdev.subversion.apache.org%3E

Date: 2019/09/02 14:20:16 GMT

From: Johan Corveleyn

To: Subversion dev list

Subject: Re: Last-Modified HTTP header in GET responses

Message-ID: <CAB84uBX4dNCsbaOn1Dzy0N3CB4rfC0_ZVCZ_TpVikt+p1zMGNg@mail.gmail.com>

Review by: brane

* subversion/mod_dav_svn/repos.c

(get_last_modified): New function (reverted its removal in r1724790).

(set_headers): Set Last-Modified response header for 'external' requests.

* subversion/tests/cmdline/mod_dav_svn_tests.py

(last_modified_header): New test.

  1. … 1 more file in changeset.
Add a test for SVN-4827, svn x-shelve checksum mismatch.

* subversion/tests/cmdline/shelf_tests.py

(shelve_with_kw_translation): New test.

(test_list): Run it.

Issue #4828: by default, hide global options too.

* subversion/libsvn_subr/opt.c

(print_command_info3, subcommand_help): Let 'verbose' apply to global options a well.

* subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout

Adjust expected help output.

  1. … 1 more file in changeset.
Issue #4828: update test expectations, following r1866272.
Issue #4828, Hide experimental commands and options by default.

* subversion/libsvn_subr/opt.c

(print_command_info3,

print_generic_help_body3): Show commands and options starting with

'x-' only if new 'with_experimental' option is true.

(print_generic_help): Extracted from 'svn_opt_print_generic_help3', to

take the new 'with_experimental' option.

(subcommand_help): Extracted from 'svn_opt_subcommand_help4', to

take the new 'with_experimental' option.

(svn_opt_print_help5): Let the 'verbose' option control 'with

experimental', when printing help. The 'verbose' option previously was

not used here except for the case of printing version info.

* subversion/svn/svn.c

Let 'help' take the '-v' option.

* subversion/tests/cmdline/getopt_tests_data/svn_help_stdout

* subversion/tests/cmdline/getopt_tests_data/svn--help_stdout

Adjust the expected output.

* tools/dist/backport.pl

[Accidental change; reverted in 1866189.]

  1. … 3 more files in changeset.
Follow-up to r1865929: Change test to XFail, adding issue number.
Follow-up to r1865929: Restore Windows compatibility in test.
Add a test for issue #4826, diff repos-wc non-infinite depth uses wrong depth.
Fix issue #4822, "svn diff --changelist ARG" broken in subdirectories.

A follow-up to r1835234.

* subversion/libsvn_wc/diff_local.c

(svn_wc__diff7): Pass the correct anchor dir to the changelist filter.

* subversion/tests/cmdline/changelist_tests.py

(diff_with_changelists_subdir): New test.

(test_list): Run it.

  1. … 1 more file in changeset.
Increment the trunk version number to 1.13, and introduce a new CHANGES

section, following the creation of the 1.12.x release branch.

* subversion/include/svn_version.h,

subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java,

subversion/tests/cmdline/svntest/main.py

(SVN_VER_MINOR): Increment to 13.

* CHANGES: New section for 1.13.0.

  1. … 3 more files in changeset.
Reintegrate the 'shelving-v3' branch.
  1. … 4 more files in changeset.
Fix #4760 "Missing children when svnadmin dump --include/exclude converts

copy-dir to add-dir".

Follow-up to r1811992: Canonicalize PATH before passing it to the FILTER_FUNC.

In some cases (e.g. for nodes under copied directories) PATH passed by

repos layer to AUTHZ_FUNC may be non-canonical (missing leading '/'). This

causes FILTER_FUNC implemented in svnadmin to wrongly report PATH as "not

included".

* subversion/libsvn_repos/dump.c

(dump_filter_authz_func): Canonicalize PATH before passing it

to the FILTER_FUNC. Add comment.

* subversion/tests/cmdline/svnadmin_tests.py

(dump_include_copied_directory): New.

(test_list): Add new test to table.

Patch by: sergey.raevskiy{_AT_}visualsvn.com

  1. … 1 more file in changeset.
* subversion/tests/cmdline/commit_tests.py

(commit_sees_tree_conflict_on_unversioned_path): New test, XFail.

(test_list): Run it.

Make 'svn update' not record a tree conflict when deleting an unmodified

directory which happens to contain unversioned items. Instead, just leave

the unversioned items behind on disk when deleting the unmodified directory,

which matches the behaviour of Subversion 1.8.

Prompted by a question on users@:

https://svn.haxx.se/users/archive-2019-01/0060.shtml

* subversion/libsvn_wc/update_editor.c

(check_tree_conflict): Ignore unversioned items during check for local mods.

This prevents a tree conflict from being recorded.

* subversion/tests/cmdline/switch_tests.py

(tolerate_local_mods): Don't expect an unversioned item to cause a tree

conflict. Add the item to version control instead to meet this test's

expectations.

* subversion/tests/cmdline/update_tests.py

(update_keeps_unversioned_items_in_deleted_dir, test_list): New test

which ensures that update will leave unversioned items on disk when

deleting an unmodified directory.

  1. … 1 more file in changeset.
Introduce a warning callback to the authz file parser API.

We need this to warn about the use of empty groups in authz files;

this is not an error and doesn't affect the authz file semantics,

but it's nice to be able to tell the user about it.

See issues #4794, #4802 and #4803.

* subversion/include/svn_repos.h

(svn_repos_authz_warning_func_t): New callback function type.

(svn_repos_authz_read4): New; API revision.

(svn_repos_authz_read3): Deprecated.

(svn_repos_authz_parse2): New; API revision.

(svn_repos_authz_parse): Deprecated.

* subversion/libsvn_repos/authz.h

(svn_authz__parse): Add warning function and baton parameters.

* subversion/libsvn_repos/authz.c

(authz_read): Add warning function and baton parameters.

Update calls to svn_authz__parse.

(svn_repos_authz_read4): Revised from svn_repos_authz_read3.

(svn_repos_authz_parse2): Revised from svn_repos_authz_parse.

* subversion/libsvn_repos/authz_parse.c

(struct ctor_baton_t): Add members warning_func and warning_baton.

(create_ctor_baton): Initialise these new members of the constructor baton.

(emit_parser_warning): New.

(SVN_AUTHZ_PARSE_WARN): New; wrapper macro for the above.

(array_insert_ace): Ignore and warn about the use of empty groups.

(svn_authz__parse): Update implementation to match prototype.

* subversion/libsvn_repos/deprecated.c

(svn_repos_authz_read3, svn_repos_authz_parse): Implement deprecated functions.

* subversion/mod_authz_svn/mod_authz_svn.c

(log_svn_message): New; replaces log_svn_error so that it's useful for

logging warnings as well.

(log_svn_error): Reimplement, calling log_svn_message.

(struct authz_warning_baton_t): New.

(log_authz_warning): New.

(get_access_conf): Set up an authz warning handler and baton, and call

svn_repos_authz_read4 instead of svn_repos_authz_read3.

* subversion/svnserve/logger.h

(logger__log_error): Make the 'err' parameter a pointer-to-const.

Update the docstring to say that the error is not cleared.

(logger__log_warning): New.

* subversion/svnserve/logger.c

(log_message): New; common base for logger__log_error and logger__log_message.

Also *do not* allocate 8k on the stack, use the logger pool, which gets

cleared at the end of the function.

(logger__log_error): Reimplement.

(logger__log_warning): Implement.

* subversion/svnserve/serve.c

(log_error): Make the error parameter const. Fix the docstring.

(log_warning): New.

(load_authz_config): Add warning function and baton parameters and fix pool

handling. Now calls svn_repos_authz_read4 instead of svn_repos_authz_read3.

(find_repos): Add warning function and baton parameters for load_authz_config.

(handle_authz_warning): New.

(construct_server_baton): Pass an authz warning handler and baton to find_repos.

* subversion/tests/cmdline/authz_tests.py

(group_member_empty_string): Fix docstring.

(empty_group): New test case.

(test_list): Run it.

* subversion/tests/cmdline/svnauthz_tests.py

(svnauthz_empty_group_test): Extend the @Issues decorator.

Add a check for the expected warning on stderr.

  1. … 11 more files in changeset.
Follow-up to r1851815: update svn:ignore lists.

* subversion/tests: Do not ignore svnserveautocheck.pid.

* subversion/tests/cmdline: Do ignore svnserve-*.

  1. … 1 more file in changeset.
Add logging to the svnserveautocheck configuration.

* Makefile.in (check-clean): Clean up the svnserveautocheck and davautocheck

configuration/log directories.

* subversion/tests/cmdline/svnserveautocheck.sh

(query): New function, copied unchanged from davautocheck.sh.

(SVNSERVE_ROOT): Temporary directory for svnserve.pid and svnserve.log.

- Run sevnserve with logging enabled;

- Offer to browse the log file before ending the script.

  1. … 1 more file in changeset.
* subversion/tests/cmdline/svnauthz_tests.py

(svnauthz_empty_group_test): Reference issue #4802.

Teach 'unshelve' to drive the new WC local mods editor.

Re: SVN-4786 "Create a WC working-mods editor", SVN-3625 "Commit shelving".

Instead of applying changes directly to the WC, the changes now go through

the standard svn_delta_editor_t API. When completed, this will allow a much

more exact transfer of the possible changes, and a more resuable

implementation.

The ability to merge file text changes is lost, for the time being. This

will need to be re-implemented in the WC local mods editor. (Note that the

implementation of merging here was incomplete anyway.)

* subversion/libsvn_client/shelf.c

(wc_file_merge,

wc_dir_props_merge,

wc_node_delete,

wc_node_add): Remove.

(apply_prop_mods,

apply_file_mods,

path_driver_cb_baton_t,

path_driver_cb_func,

shelf_replay_path_baton_t,

shelf_replay_path_visitor,

shelf_replay): New.

(test_apply_files_baton_t,

test_apply_file_visitor): Renamed remnants of a combined function.

(svn_client__shelf_test_apply_file): Update the caller.

(wc_mods_editor): New.

(svn_client__shelf_apply): Use wc_mods_editor() and shelf_replay()

instead.

* subversion/tests/cmdline/shelf_tests.py

(unshelve_text_mod_merge,

unshelve_text_mod_conflict,

unshelve_undeclared_binary_mod_conflict

unshelve_binary_mod_conflict,

unshelve_text_prop_conflict): Mark as XFail, as merge and conflict

behaviour has changed.

  1. … 1 more file in changeset.
Fix a bug in the authz parser where using a group with no members in

an access entry was treated as an error instead of being ignored.

* subversion/libsvn_repos/authz_parse.c

(add_to_group): Allow NULL user, to create empty groups. Update docstring.

(expand_group_callback): Handle the case where a group has no users.

(array_insert_ace): Ignore ACEs for empty groups.

* subversion/tests/cmdline/svnauthz_tests.py

(svnauthz_empty_group_test): Remove XFail decorator.

Extend the testcase to test recursive empty group expansion.

Fixes issue #4802

Found by: Doug Robinson

  1. … 1 more file in changeset.
Add a new XFail test for the authz parser for the validity of empty groups.

Issue #4802.

* subversion/tests/cmdline/svnauthz_tests.py

(svnauthz_empty_group_test): New test case.

(test_list): Run it.

Found by: Doug Robinson

Add 'x-wc-copy-mods' to the help tests, following r1850720.
Add a test for issue 4798 "revert: option to remove added items from disk".

* subversion/tests/cmdline/revert_tests.py

(revert_remove_added): New test, XFail.

(test_list): Run it.