Checkout Tools
  • last updated 1 hour ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
* everywhere: Run tools/dev/remove-trailing-whitespace.sh to remove

trailing whitespace before we branch 1.14.

  1. … 105 more files in changeset.
Followup to r1874057, escape whitespace instead of quoting filename

As danielsh pointed out, only specific characters can be escaped by a backslash

in quoted shell strings. Rather than surrounding the escaped path with double

quotes, post-process the quoted path and manually escape any whitespace that is

present.

* subversion/libsvn_subr/cmdline.c

(escape_path): New function, wrapper around apr_pescape_shell(), which

handles escaping of whitespace.

(svn_cmdline__edit_file_externally, svn_cmdline__edit_string_externally):

Call the new function instead of apr_pescape_shell()

* subversion/tests/cmdline/update_tests.py

(update_accept_conflicts): Include ';' in renamed path ("p; i"), to ensure

non-whitespace escaping is handled correctly.

  1. … 1 more file in changeset.
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.
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. … 2 more files in changeset.
Make 'svn copy URL WC' notifications more self-consistent, and consistent

with 'svn copy FOREIGN-REPO-URL WC'.

Part of issue SVN-2198 "clean up svn_wc_repos_add_repos_file() situation".

Previously we emitted the notifications from 'checkout', revealing an

implementation detail.

Old:

| A A/D/G_COPY/pi

| A A/D/G_COPY/rho

| A A/D/G_COPY/tau

| Checked out revision 6.

| A A/D/G_COPY

New:

| A A/D/G_COPY

| A A/D/G_COPY/pi

| A A/D/G_COPY/rho

| A A/D/G_COPY/tau

* subversion/libsvn_client/copy.c

(notification_adjust_func): Change 'checkout' notifications into plain WC

'add' notifications, discarding unwanted details at the start and end of

checkout.

(svn_client__repos_to_wc_copy_file): Notify here.

(repos_to_wc_copy_single): Do not notify here. Remove an early return, now

that there is no need for it.

* subversion/tests/cmdline/copy_tests.py

(URI_encoded_repos_to_wc): Adjust expectations.

* subversion/tests/cmdline/externals_tests.py

(url_to_wc_copy_of_externals): Same.

* subversion/tests/cmdline/merge_tests.py

(merge_to_switched_path,

natural_history_filtering): Same.

* subversion/tests/cmdline/svntest/mergetrees.py

(set_up_branch): Same.

* subversion/tests/cmdline/switch_tests.py

(mergeinfo_switch_elision): Same.

* subversion/tests/cmdline/update_tests.py

(mergeinfo_update_elision): Same.

  1. … 6 more files in changeset.
Update issue tracker links in comments, from Tigris (issuezilla) to Apache (Jira).

URL fragment identifiers like '#desc5' are left in place, not yet updated.

This is a merge of r1828508 from the 'shelve-checkpoint' branch where I

committed it by mistake.

  1. … 43 more files in changeset.
* subversion/tests/cmdline/update_test.py:

(update_keywords_on_shortcut): Add @Issue(4585) annotation

Add a test for the recently reported case where an invalid item was installed

in the workqueue, which breaks svn cleanup.

* subversion/tests/cmdline/update_tests.py

(update_add_missing_local_add): New function.

(test_list): Add new test.

Fix test fallout introduced in r1802797:

* subversion/tests/cmdline/update_tests.py

(missing_tmp_update): Pass the new --vacuum-pristines option to svn cleanup.

This test relies on the side-effect of re-creating .svn/tmp.

Add a comment to the test that calls this out.

Make 'svn update' treat incoming add vs. local add as a tree conflict again.

Back in r862331 the update editor was taught to automatically merge local

additions with incoming additions. This was the default behaviour until now.

I expect the conflict resolver to offer better support for this eventually.

To prepare for that, disable this automatic merge during updates by default.

This is easy to do since svn_client_update() provides a flag for it.

Add a new command line option to enable the old behaviour, mainly to keep

testing the old behaviour in our test suite. The old behaviour must not be

broken, according to our API compatibility guarantees.

'svn switch' was changed similarly in r862331, but has already been changed

to flag a tree conflict by default long ago.

* subversion/svn/cl.h

(adds_as_modification): Add new option flag.

(svn_cl__longopt_t): Add opt_adds_as_modification.

(svn_cl__options): Define '--adds-as-modification'.

(svn_cl__cmd_table): Add '--adds-as-modification' to 'svn update'.

(sub_main): Handle '--adds-as-modification' option.

* subversion/svn/update-cmd.c

(svn_cl__update): Pass new 'adds_as_modification' flag to svn_client_update().

* subversion/tests/cmdline/update_tests.py

(update_with_obstructing_additions, update_conflict_details): Pass

'--adds-as-modification' to 'svn update' to keep testing the old behaviour.

* subversion/tests/cmdline/upgrade_tests.py

(upgrade_not_present_replaced): Adjust expected output and status for an

update which now raises an 'add vs add' tree conflict.

  1. … 4 more files in changeset.
Unbreak the tests on Python 3:

is_on_windows is actually a function; not a constant.

* subversion/tests/cmdline/merge_tests.py

(merge_conflict_markers_matching_eol,

merge_eolstyle_handling): Fix function call.

* subversion/tests/cmdline/patch_tests.py

(patch_no_svn_eol_style,

patch_with_svn_eol_style,

patch_with_svn_eol_style_uncommitted): Same.

* subversion/tests/cmdline/update_tests.py

(conflict_markers_matching_eol,

update_eolstyle_handling): Same.

  1. … 2 more files in changeset.
Disable the strict EOL style handling for windows tests that would otherwise

fail with Python 2. This effectively restores the original py2 code for them.

* subversion/tests/cmdline/merge_tests.py

(merge_conflict_markers_matching_eol,

merge_eolstyle_handling): Disable EOL preservation on Windows.

* subversion/tests/cmdline/patch_tests.py

(patch_no_svn_eol_style,

patch_with_svn_eol_style,

patch_with_svn_eol_style_uncommitted): Same.

* subversion/tests/cmdline/update_tests.py

(conflict_markers_matching_eol): Same and restore the platform-specific

CRLF definition.

(update_eolstyle_handling): Disable EOL preservation on Windows.

  1. … 2 more files in changeset.
Let's try this again with all the code we need ...

* subversion/tests/cmdline/update_tests.py

(conflict_markers_matching_eol): We do need to assign a value, even if

it always the same.

Try fixing one of the Windows test failues with non-native EOL.

* subversion/tests/cmdline/update_tests.py

(conflict_markers_matching_eol): Since we keep EOLs as are, modifying them

on Windows alone should be unnecessary.

Make the update tests pass with Python 3.

With the groundwork done in r1743445, this patch adds the same EOL style

preservation option to the merge result checking code path.

* subversion/tests/cmdline/svntest/actions.py

(run_and_verify_update): Bump version and implement in terms of ...

(run_and_verify_update2): ... this. Add the KEEP_EOL_STYLE option.

* subversion/tests/cmdline/update_tests.py

(conflict_markers_matching_eol,

update_eolstyle_handling): Use the new run-and-verify variant,

requesting EOLs to compare as-are.

  1. … 1 more file in changeset.
Fix a bunch of str / bytes mismatches in our tests.

Svnlook, svnmucc and svnsync tests now pass with Python 3.

* subversion/tests/cmdline/svnlook_tests.py

(test_misc): Svnlook output is utf-8.

* subversion/tests/cmdline/svnmucc_tests.py

(_svnmucc_re): Svnmucc output is binary.

* subversion/tests/cmdline/svnsync_tests.py

(mergeinfo_contains_r0): Dump files are binary.

* subversion/tests/cmdline/update_tests.py

(update_binary_file,

update_binary_file_2,

update_binary_file_3): We are manipulating binary file contents.

  1. … 3 more files in changeset.
Use the new svn_wc_notify_action_t values for conflicts in more places.

* subversion/libsvn_wc/conflicts.c

(svn_wc__conflict_text_mark_resolved,

svn_wc__conflict_prop_mark_resolved): Use new notifcations for text and

property conflicts, respectively.

* subversion/tests/cmdline/update_tests.py

(update_output_with_conflicts): Adjust expected output.

  1. … 1 more file in changeset.
Fix a false negative in update_tests.py#76 with SVNPathAuthz short_circuit.

This test used to assert that having a filename with backslash returns an

error during `svn update' over file:// or svn://, and doesn't do that over

http://. However, the last bit is specific to httpd instances configured

with SVNPathAuthz on, where a subrequest-based check gives 404 and results

in the path being excluded by the server. With SVNPathAuthz short_circuit,

the behavior is the same as when the command is run over file:// or svn://

and results in an error:

svn: E155000: 'completely\unusable\dir' is not valid as filename in [...]

Since the original issue (SVN-3288) is about a crash, and given that we're

currently fine with either of the results, tweak the test to accept both of

them. There is an alternative of teaching the tests to distinguish between

different types of httpd authz and making the checks even more conditional,

but that seems a bit over the top.

* subversion/tests/cmdline/update_tests.py

(windows_update_backslash): Tweak the expectations. Rework and extend

the comment about what we expect in this test.

Resolve a segfault on an incoming delete of an ancestor of a switched path

in a tree with other changes.

Found by: TortoiseSVN dump

ivan

(Reproduction recipe and patch by me)

* subversion/libsvn_wc/wc_db.c

(make_copy_txn): Properly detect a switched tree in all cases.

* subversion/tests/cmdline/update_tests.py

(update_delete_switched): New function.

(test_list): Add update_delete_switched.

  1. … 1 more file in changeset.
Following up on r1701838, improve error reporting and add regression test,

including on 'svn cleanup' resolving the problem.

* subversion/libsvn_wc/wc_db_pristine.c

(svn_wc__db_pristine_prepare_install): Wrap error message.

* subversion/tests/cmdline/update_tests.py

(missing_tmp_update): New test.

(test_list): Add test.

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

Following up on r1702198 remove UTF-8 BOM.

Resolve an obscure segfault when updating inside an already conflicted tree.

Found by: TortoiseSVN dump

ivan

(Reproduction recipe and patch by me)

* subversion/libsvn_wc/update_editor.c

(add_directory,

add_file): Don't calculate new repository paths inside a skipped tree.

* subversion/tests/cmdline/update_tests.py

(update_add_conflicted_deep): New test.

(test_list): Add test.

  1. … 1 more file in changeset.
Stop exposing the property reject file path in the API and in 'svn info'.

Make 'svn info' show the names of conflicted properties instead.

* subversion/include/svn_client.h

(svn_client_conflict_get_prop_reject_abspath): Remove, now unused.

* subversion/svn/info-cmd.c

(print_info): Show a list of conflicted property names instead of

the path to the property reject file.

* subversion/tests/cmdline/merge_tree_conflict_tests.py

(merge_conflict_details): Adjust expected info output.

* subversion/tests/cmdline/move_tests.py

(move_conflict_details): Adjust expected info output.

* subversion/tests/cmdline/prop_tests.py

(dir_prop_conflict_details): Adjust expected info output.

* subversion/tests/cmdline/update_tests.py

(update_conflict_details): Adjust expected info output.

  1. … 5 more files in changeset.
* subversion/tests/cmdline/update_tests.py

(update_keywords_on_shortcut): Remove debug prints.

Add a regression test for update failing to update keywords when the incoming

change is equal to the local change.

Found by: Vincent Lefevre <vincent-svn{_AT_}vinc17.net>

See the email thread "keywords not updated after an update that doesn't

change the file due to local changes" started on 2015-06-17, e.g.

<http://svn.haxx.se/dev/archive-2015-06/0147.shtml>.

* subversion/tests/cmdline/update_tests.py

(update_keywords_on_shortcut): New test, marked as XFail.

(test_list): Run it.

Avoid raising skip exceptions without description in the python tests.

* subversion/tests/cmdline/checkout_tests.py

(checkout_wc_from_drive): Use @SkipUnless instead of code.

Add explanation.

* subversion/tests/cmdline/svnadmin_tests.py

(verify_incremental_fsfs): Add explanation.

* subversion/tests/cmdline/svnsync_authz_tests.py

(identity_copy): Add explanation.

* subversion/tests/cmdline/switch_tests.py

(refresh_read_only_attribute): Add explanation.

* subversion/tests/cmdline/update_tests.py

(update_wc_on_windows_drive): Use @SkipUnless instead of code.

Add explanation.

(skip_access_denied): Add explanation.

  1. … 4 more files in changeset.
Revert r1667283 as well. Should have been reverted with r1667280 in r1667682.

Follow-up to r1667280: Fix a test failure.

* subversion/tests/cmdline/update_tests.py

(update_binary_file): Add 'theta.mine' to extra on-disk files.

Remove some magic from run_and_verify_checkout(): The fact that it always

deletes what is there before invoking 'svn'.

Only a few callers expect this and the sandbox we use should be empty

anyway. Avoid some unneeded work in some callers that are affected by

this change.

* subversion/tests/cmdline/checkout_tests.py

(checkout_with_obstructions): Use normal checkout.

(checkout_broken_eol): Don't create a wc if the next function doesn't

want it.

* subversion/tests/cmdline/special_tests.py

(checkout_repo_with_symlinks,

checkout_repo_with_unknown_special_type,

replace_symlink_with_dir): Don't create wc as we want our own checkout.

* subversion/tests/cmdline/svntest/actions.py

(load_repo): Make the checkout step optional.

(run_and_verify_checkout2): Rename to/integrate in...

(run_and_verify_checkout): ... this now single function.

* subversion/tests/cmdline/update_tests.py

(forced_update_failures): Use the normal checkout.

  1. … 3 more files in changeset.
Following up on r1662794, make the checkout/switch/update logic in the python

test framework use the standard run_and_verify_svn stderr handling, and replace

the 4 singleton arguments of these functions with a completely optional

extra_files args (which handles the only current usage in a better way than

before), that verifies that these files are actually there.

In one case we still installed a singleton handler to allow extra files,

but found no files since the introduction of tree conflicts. (Probably 1.6.0)

The new code would return failure because the files are not here.

* subversion/tests/cmdline/authz_tests.py

* subversion/tests/cmdline/basic_tests.py

* subversion/tests/cmdline/changelist_tests.py

* subversion/tests/cmdline/checkout_tests.py

* subversion/tests/cmdline/copy_tests.py

* subversion/tests/cmdline/depth_tests.py

* subversion/tests/cmdline/diff_tests.py

* subversion/tests/cmdline/externals_tests.py

* subversion/tests/cmdline/import_tests.py

* subversion/tests/cmdline/info_tests.py

* subversion/tests/cmdline/input_validation_tests.py

* subversion/tests/cmdline/log_tests.py

* subversion/tests/cmdline/merge_authz_tests.py

* subversion/tests/cmdline/merge_automatic_tests.py

* subversion/tests/cmdline/merge_reintegrate_tests.py

* subversion/tests/cmdline/merge_tests.py

* subversion/tests/cmdline/merge_tree_conflict_tests.py

* subversion/tests/cmdline/move_tests.py

* subversion/tests/cmdline/prop_tests.py

* subversion/tests/cmdline/resolve_tests.py

* subversion/tests/cmdline/revert_tests.py

* subversion/tests/cmdline/special_tests.py

* subversion/tests/cmdline/stat_tests.py

* subversion/tests/cmdline/svnversion_tests.py

* subversion/tests/cmdline/switch_tests.py

* subversion/tests/cmdline/trans_tests.py

* subversion/tests/cmdline/tree_conflict_tests.py

* subversion/tests/cmdline/update_tests.py

* subversion/tests/cmdline/wc_tests.py

(*): Update caller. Simplify commands where possible. Tried not to

introduce behavior changes.

* subversion/tests/cmdline/svntest/actions.py

(run_and_verify_checkout2,

run_and_verify_checkout): Remove several arguments. Add dynamic keywords.

Update caller.

(verify_update): Define extra_files. Forward to disk comparison.

(verify_disk): If extra_files is set, set singleton handlers and a (new)

done handler. If needed we can add other tests this way.

(run_and_verify_update,

run_and_verify_merge): Remove some arguments. Add dynamic keywords.

Use run_and_verify_svn.

(run_and_verify_patch): Add dynamic keyword support.

(run_and_verify_switch,

run_and_verify_commit): Remove some arguments. Add dynamic keywords.

Use run_and_verify_svn.

(build_greek_tree_conflicts): Update caller.

* subversion/tests/cmdline/svntest/deeptrees.py

(deep_trees_run_tests_scheme_for_update,

deep_trees_skipping_on_update,

deep_trees_run_tests_scheme_for_switch,

deep_trees_run_tests_scheme_for_merge,

do_routine_switching): Update caller. Convert None error to [].

* subversion/tests/cmdline/svntest/factory.py

(TestFactory): Update templates.

* subversion/tests/cmdline/svntest/mergetrees.py

(set_up_dir_replace): Update caller.

* subversion/tests/cmdline/svntest/tree.py

(detect_conflict_files_done): New function.

  1. … 33 more files in changeset.