Checkout Tools
  • last updated 3 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
In the test suite: replace 'open().write()' with a 'with' construct.

The form 'with open() as f: f.write()' is nowadays recommended.

This may fix test failures we were seeing on MacOSX in shelf_tests.py

test 15 and perhaps test 12.

* subversion/tests/cmdline/*_tests.py

Use 'with' form instead of 'open().write()'.

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

(file_write): Same, and also for 'codecs.open().write()'.

(file_substitute): Same.

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

(Sandbox._ensure_authz): Same.

  1. … 16 more files in changeset.
Remove another test of a now unsupported upgrade. Users still using these

development only working copy formats can upgrade via Subversion 1.7-1.9.

* subversion/tests/cmdline/upgrade_tests.py

(upgrade_tree_conflict_data): Remove test.

(test_list): Update list.

* subversion/tests/cmdline/upgrade_tests_data/format_12a.tar.bz2

* subversion/tests/cmdline/upgrade_tests_data/format_12b.tar.bz2

* subversion/tests/cmdline/upgrade_tests_data/format_13.tar.bz2

* subversion/tests/cmdline/upgrade_tests_data/format_14.tar.bz2

* subversion/tests/cmdline/upgrade_tests_data/format_15.tar.bz2

* subversion/tests/cmdline/upgrade_tests_data/format_16.tar.bz2

* subversion/tests/cmdline/upgrade_tests_data/format_28.tar.bz2

* subversion/tests/cmdline/upgrade_tests_data/upgrade_tc.tar.bz2

Remove unreferenced test data.

  1. … 8 more files in changeset.
Drop support for upgrading working copies created with Subversion 1.7

development versions (using WC-NG development formats). Users can use

Subversion 1.7, 1.8 or 1.9 to perform an upgrade if they really need to.

We never promised to support these after the release of 1.7.0... And

not before that either ;-)

* subversion/libsvn_wc/upgrade.c

(bump_to_20,

bump_to_21,

bump_to_22,

bump_to_23,

bump_to_24,

bump_to_25,

bump_to_26,

bump_to_27,

bump_to_28,

rename_pristine_file,

upgrade_externals,

bump_to_29): Remove unused code.

(svn_wc__upgrade_sdb): Handle now unsupported formats with a proper

error.

* subversion/libsvn_wc/wc-metadata.sql

(STMT_UPGRADE_TO_20,

STMT_UPGRADE_TO_21,

STMT_UPGRADE_TO_22,

STMT_UPGRADE_TO_23,

STMT_UPGRADE_TO_23_HAS_WORKING_NODES,

STMT_UPGRADE_TO_24,

STMT_UPGRADE_TO_25,

STMT_UPGRADE_TO_26,

STMT_UPGRADE_TO_27,

STMT_UPGRADE_TO_27_HAS_ACTUAL_NODE_CONFLICTS,

STMT_UPGRADE_TO_28,

STMT_UPGRADE_TO_29): Remove unused statements.

* subversion/tests/cmdline/upgrade_tests.py

(upgrade_from_format_28): Remove test.

(test_list): Update list.

  1. … 2 more files in changeset.
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.
Make the upgrade tests pass with Python 3.

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

(RegexOutput.__init__): Since some of tools produce binary output,

we must also allow for binary regex.

* subversion/tests/cmdline/upgrade_tests.py

(check_dav_cache): Make sure we can access the version info by index.

Make also sure, we compare strings of the same type.

(upgrade_wcprops): The DAV cache contains binary data.

(simple_entries_replace): We read text but write binary data.

(upgrade_file_externals): Svnmucc has binary output, so we must apply

binary string patterns.

  1. … 1 more file in changeset.
Replace "magic" octal permission values with symbolic ones. That improves

readability as well as portability between Python 2 and 3.

Changes outside our build & test scripts may be incomplete.

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

(S_ALL_READ, S_ALL_WRITE, S_ALL_EXEC,

S_ALL_RW, S_ALL_RX, S_ALL_RWX): Define constants for frequently used

permission patterns.

(safe_rmtree,

_post_create_repos,

create_python_hook_script): Use symbolic constants and combinations

thereof for permission values.

* subversion/tests/cmdline/autoprop_tests.py

* subversion/tests/cmdline/basic_tests.py

* subversion/tests/cmdline/import_tests.py

* subversion/tests/cmdline/prop_tests.py

* subversion/tests/cmdline/revert_tests.py

* subversion/tests/cmdline/schedule_tests.py

* subversion/tests/cmdline/special_tests.py

* subversion/tests/cmdline/svnadmin_tests.py

* subversion/tests/cmdline/svnfsfs_tests.py

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

* subversion/tests/cmdline/upgrade_tests.py

* tools/client-side/change-svn-wc-format.py

* tools/server-side/svnpubsub/daemonize.py

* tools/server-side/svnpubsub/svnwcsub.py

(): Same. Also, import the stats module where needed.

  1. … 14 more files in changeset.
Work towards Python 3 compatibility. Since we already require Python 2.7+,

we can use the new syntax without further limiting our Python 2 support.

* contrib/client-side/incremental-update.py

* contrib/client-side/svn_apply_autoprops.py

* contrib/client-side/svnmerge/svnmerge-migrate-history.py

* contrib/client-side/svnmerge/svnmerge-migrate-history-remotely.py

* contrib/client-side/svnmerge/svnmerge.py

* contrib/client-side/svnmerge/svnmerge_test.py

* contrib/server-side/add-needs-lock.py

* contrib/server-side/fsfsfixer/fixer/fix-rev.py

* contrib/server-side/fsfsverify.py

* contrib/server-side/svn-tweak-author.py

* subversion/bindings/swig/python/tests/core.py

* subversion/bindings/swig/python/tests/repository.py

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

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

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

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

* subversion/tests/cmdline/upgrade_tests.py

* tools/client-side/change-svn-wc-format.py

* tools/client-side/mergeinfo-sanitizer.py

* tools/dev/contribulyze.py

* tools/dev/gen-javahl-errors.py

* tools/dev/gen_junit_report.py

* tools/dev/graph-dav-servers.py

* tools/dev/iz/ff2csv.py

* tools/dev/iz/find-fix.py

* tools/dev/wc-ng/bump-to-19.py

* tools/dev/wc-ng/populate-pristine.py

* tools/dev/which-error.py

* tools/examples/get-location-segments.py

* tools/hook-scripts/svn2feed.py

* tools/hook-scripts/svnperms.py

* tools/po/l10n-report.py

* tools/server-side/fsfs-reshard.py

* tools/server-side/svn-backup-dumps.py

* tools/server-side/svnpredumpfilter.py

* tools/server-side/svnpubsub/daemonize.py

* tools/server-side/test_svn_server_log_parse.py

(): Replace all occurances of "except Type, variable:" with Python 3

style "except Type as variable".

  1. … 36 more files in changeset.
Following up on r1702474, remove UTF-8 BOM.

* subversion/tests/cmdline/upgrade_tests.py

Remove BOM.

Add regression test for problem fixed in r1702218 (segfault on upgrade 1.0 WC

with externals)

* subversion/tests/cmdline/upgrade_tests.py

(upgrade_1_0_with_externals): New test.

(test_list): Add upgrade_1_0_with_externals.

* subversion/tests/cmdline/upgrade_tests_data/upgrade_1_0_with_externals.tar.bz2

New test working copy (format 4).

  1. … 1 more file in changeset.
Make pythons linked against an old sqlite3 version skip the tests that would

fail because python can't read wc.db.

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

(python_sqlite_can_read_wc): Add test function.

* subversion/tests/cmdline/upgrade_tests.py

(auto_analyze): Add annotation.

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

(auto_analyze): Get SQLite return value where needed.

* subversion/tests/cmdline/upgrade_tests.py

(auto_analyze): Verify table is initially not present.

Fix the direct db relocate in upgrade_tests.py 36.

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

(sqlite_exec): New function.

* subversion/tests/cmdline/upgrade_tests.py

(auto_analyze): Use function that commits.

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

(auto_analyze): Relocate without using the client.

* subversion/tests/cmdline/upgrade_tests.py

(auto_analyze): Set UUID and relocate.

* subversion/tests/cmdline/upgrade_tests.py

(auto_analyze): Use prepared working copy to allow for old Python

with old SQLite that does not support dropping sqlite_stat1.

* subversion/tests/cmdline/upgrade_tests_data/wc-without-stat1.tar.bz2: New.

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

(auto_analyze): New test for automatically adding stats table.

(test_list): Add new test.

Properly record single-revision copies from the svn_wc_entry_t world as a

single op-root, and add not-present nodes when handling a multi revision

copy... just like how we would handle this in wc-ng.

The original kind of working copy state would be impossible to commit

without this patch as the child copies would collide with what was copied

from the ancestor.

(Users would just revert... as this kind of commit problems (w/c)ould have

caused similar problems in the versions they just have upgraded from)

* subversion/libsvn_wc/entries.c

(write_entry): Calculate proper-op depth for copies that are implied

by their parent directory. Add not-present at parent op-depth when

we don't know if there is something there (or not), just like in

wc-ng.

* subversion/libsvn_wc/wc_db.c

(svn_wc__db_upgrade_apply_props): Skip intermediate layers that don't

hold properties.

* subversion/tests/cmdline/upgrade_tests.py

(tree_replace1,

tree_replace2): Update expected status results.

  1. … 2 more files in changeset.
Remove the 'message' argument from the test suite's run_and_verify_*()

functions, because it is largely pointless.

Enough context information is available by other means, and it wasn't being

displayed for stdout mismatch which is the most common failure mode but only

for exit-code mismatch, and most callers pass 'None' anyway. It cluttered

the call sites.

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

(run_and_verify_atomic_ra_revprop_change,

run_and_verify_svnlook, run_and_verify_svnlook2,

run_and_verify_svnadmin, run_and_verify_svnadmin2,

run_and_verify_svnversion, run_and_verify_svnversion2,

run_and_verify_svn, run_and_verify_svn2,

run_and_verify_svnmucc, run_and_verify_svnmucc2,

run_and_verify_atomic_ra_revprop_change,

run_and_verify_svnauthz,

run_and_verify_log_xml): Remove 'message' parameter.

(guarantee_greek_repository,

run_and_verify_dump): Adjust calls.

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

Adjust calls.

* subversion/tests/cmdline/*_tests.py

Adjust calls.

  1. … 58 more files in changeset.
Add an upgrade from 1.7 regression test that fails when working

copy exclusive locking is enabled.

* subversion/tests/cmdline/upgrade_tests.py

(upgrade_1_7_dir_external): New test.

(test_list): Add new test.

* subversion/tests/cmdline/upgrade_tests_data/upgrade_1_7_dir_external.tar.bz2:

New.

  1. … 1 more file in changeset.
Remove some remains of pre Subversion 1.7 working copy test scenarios.

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

(deep_trees_after_leaf_del_no_ci,

deep_trees_after_tree_del_no_ci): Assume that we use a single wc.db per

working copy.

(deep_trees_empty_dirs): Remove now unused variable.

* subversion/tests/cmdline/upgrade_tests.py

(check_format): Assume single db.

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

(basic_upgrade_1_0): Tweak to test URL canonicalization.

Add a regression test for the SEGV fixed by r1482327.

* subversion/tests/cmdline/upgrade_tests.py

(changelist_upgrade_1_6): New.

(test_funcs): add new test.

* subversion/tests/cmdline/upgrade_tests_data/changelist_upgrade_1_6.tar.bz2:

New file.

  1. … 1 more file in changeset.
Fix inherited props on switched nodes after upgrade from 1.6 working copy.

* subversion/libsvn_wc/entries.c

(struct db_node_t): Add inherited_props member.

(insert_node): Bind inherited props.

(is_switched): New.

(write_entry): Empty cache on switched nodes.

* subversion/tests/cmdline/upgrade_tests.py

(iprops_upgrade1_6): Mark PASS.

  1. … 1 more file in changeset.
XFail regression test for inherited properties after upgrading

a 1.6 working copy.

* subversion/tests/cmdline/upgrade_tests.py

(do_iprops_upgrade): New, code from iprops_upgrade.

(iprops_upgrade): Call do_iprops_upgrade.

(iprops_upgrade1_6): New test.

(test_funcs): Add new test.

* subversion/tests/cmdline/upgrade_tests_data/iprops_upgrade_nonroot1_6.tar.bz2:

New file.

* subversion/tests/cmdline/upgrade_tests_data/iprops_upgrade_root1_6.tar.bz2:

New file.

  1. … 2 more files in changeset.
Regression test for inherited properties after upgrading a 1.7 working copy.

* subversion/tests/cmdline/upgrade_tests.py

(iprops_upgrade): New test.

(test_funcs): Add new test.

* subversion/tests/cmdline/upgrade_tests_data/iprops_upgrade_nonroot.tar.bz2:

New file.

* subversion/tests/cmdline/upgrade_tests_data/iprops_upgrade_root.tar.bz2:

New file.

  1. … 2 more files in changeset.
* subversion/libsvn_wc/wc_db.c

(scan_addition_txn): Resolve crash from upgrade_tests.py, by

extending the post condition a tiny bit.

* subversion/tests/cmdline/upgrade_tests.py

(upgrade_missing_replaced): Re-enable entry verifications.

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

(upgrade_missing_replaced): Make this test PASS again by disabling the

entry verification step. This is how it worked through 1.7.

Following up on the explicit 'svn upgrade' requirement, reinstate the option of

opening a wc.db without upgrading for the upgrade process itself. This allows the

upgrade code to use a limited subset of the wc_db api to avoid having to

reimplement code just for upgrades.

* subversion/libsvn_wc/upgrade.c

(bump_to_30): Obtain wc_db without upgrading to allow creating conflicts.

* subversion/libsvn_wc/wc_db.c

(svn_wc__db_to_relpath,

svn_wc__db_from_relpath,

svn_wc__db_get_wcroot): Apply the same check for wcroots using a new macro.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_open): Rename argument. Update documentation.

(svn_wc__db_to_relpath

svn_wc__db_from_relpath,

svn_wc__db_get_wcroot): Document non-upgraded compatibility.

* subversion/libsvn_wc/wc_db_private.h

(svn_wc__db_t): Remove auto upgrade variable (always FALSE), and introduce

verify_format and exclusive.

(svn_wc__db_pdh_create_wcroot): Rename argument.

(CHECK_MINIMAL_WCROOT): New macro.

* subversion/libsvn_wc/wc_db_wcroot.c

(svn_wc__db_open): Initialize variables that affect opening db files.

(svn_wc__db_pdh_create_wcroot): Remove upgrade code. Only verify versions.

(svn_wc__db_wcroot_parse_local_abspath): Use config from db instead of

reparsing it from inside a loop. Update caller.

* subversion/tests/cmdline/upgrade_tests.py

(upgrade_from_1_7): Rename to ...

(upgrade_from_1_7_conflict): ... this, update comment and remove XFail.

(test_list): Update reference.

* subversion/tests/libsvn_wc/entries-compat.c

(create_open): Update comment.

  1. … 6 more files in changeset.
* subversion/cmdline/upgrade_tests.py

(upgrade_from_1_7): Update comment.