Checkout Tools
  • last updated 4 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Add 'svn diff' regression test for SVN-1722.

* subversion/tests/cmdline/diff_tests.py

(diff_nonexistent_in_wc): New test.

(test_list): Run it.

* subversion/tests/cmdline/diff_tests.py

(diff_file_replaced_by_symlink): Skip on Windows (as it passes trivially).

Document failure mode.

Add a test for a bug where git-diff errors out on a copy.

* subversion/tests/cmdline/diff_tests.py

(diff_git_format_copy): New test, XFail.

(test_list): Run it.

* subversion/tests/cmdline/diff_tests.py

(diff_file_replaced_by_symlink): New test.

(test_list): Run it.

Patch by: Dmitry Pavlenko <pavlenko{_AT_}tmatesoft.com

(tweaked by me, following danielsh's suggestions)

* subversion/tests/cmdline/diff_tests.py

Remove accidentally duplicated import symbols.

Another step in reducing coupling between diff drivers and diff writers.

Let svn_client__arbitrary_nodes_diff() anchor the diff processor API at the

requested target paths always, rather than sometimes there and sometimes at

the parent of one of them.

Move the responsibility for prefixing diff header paths with the first

path's basename in certain cases (when the targets are not both directories)

to the caller, where it is more appropriate since it is a presentation

issue.

* subversion/libsvn_client/client.h,

subversion/libsvn_client/diff_local.c

(svn_client__arbitrary_nodes_diff): Always anchor at the requested target

paths, even when they are not both directories. Remove the (now unused)

'anchor_at_given_paths' flag and (already unused) 'result_pool' params.

* subversion/libsvn_client/diff.c

(do_diff): Determine the prefix for diff header paths here, instead.

* subversion/tests/cmdline/diff_tests.py

(diff_arbitrary_files_and_dirs): Extend this case a little, adding a file

that is modified and a node that is replaced by a different kind.

  1. … 3 more files in changeset.
Add a test: a summary-diff reports an unmodified copy as modified.

* subversion/tests/cmdline/diff_tests.py

(diff_summary_repo_wc_local_copy_unmodified): New test, XFail.

(test_list): Run it.

Correct the diff test added in r1835188.

It failed on Windows, and worked on Linux only because of another bug

('diff --summarize' reporting 'M' even though the copied file was not in

fact modified).

* subversion/tests/cmdline/diff_tests.py

(diff_summary_repo_wc_local_copy): Pass the right filename to simple_append().

Fix a crash in diff.

diff-tests.py 91: Summary diff with a repository source side and a local copy

target side. This particular combination crashed in 1.10.0 and earlier

releases.

* subversion/libsvn_client/diff.c

(diff_repos_wc): Ensure 'root_relpath' and 'root_is_dir' outputs are

written in all cases.

* subversion/tests/cmdline/diff_tests.py

(diff_summary_repo_wc_local_copy): Remove XFail.

  1. … 1 more file in changeset.
Correct expectations of diff test added in r1835188 (still XFail).

* subversion/tests/cmdline/diff_tests.py

(diff_summary_repo_wc_local_copy): Expect 'M' not 'A' for a copied, modified file.

Add a test for a summary-diff case that crashes.

I found this case by code inspection.

* subversion/tests/cmdline/diff_tests.py

(diff_summary_repo_wc_local_copy): New test, XFail.

(test_list): Run it.

Correct the use of backslash-space sequence in Python strings.

Python docs state: "Changed in version 3.6: Unrecognized escape sequences

produce a DeprecationWarning. In some future version of Python they will be

a SyntaxError."

Where meant to be a literal string, replace with backslash-backslash-space;

where meant to be a regex, remove the backslash as it is unnecessary in

ordinary regular expressions.

Suggested by: danielsh

* subversion/tests/cmdline/externals_tests.py

Double the backslashes in externals definitions.

* subversion/tests/cmdline/diff_tests.py

* subversion/tests/cmdline/log_tests.py

* subversion/tests/cmdline/patch_tests.py

* subversion/tests/cmdline/special_tests.py

Double the backslashes in "\ No newline at end of..." diff lines.

* subversion/tests/cmdline/svnadmin_tests.py

(dump_exclude_all_rev_changes): Remove unnecessary escapes in regexes.

  1. … 5 more files in changeset.
Add an XFAIL test for #4706, 'diff --git crashes with unversioned files'.

* subversion/tests/cmdline/diff_tests.py

(diff_unversioned_files_git): New test.

(test_list): Add it.

Fix issue #SVN-4689, "diff --git added/deleted filenames should not be /dev/null".

* subversion/tests/cmdline/diff_tests.py

(diff_git_empty_files): Tweak the unused destination label parameter to say

"nonexistent", for consistency with all other occurrences.

(diff_symlinks): Update test expectations.

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

(make_git_diff_header): Update test expectations.

* subversion/libssvn_client/diff.c

(print_git_diff_header): Print normal a/b labels for add and delete, never /dev/null.

  1. … 2 more files in changeset.
Resolve issue #4597, and add a regression test for this problem.

The problem here is that our diff code doesn't handle full url, revision, peg

revision walking. The code assumes that the user either passes a single path

and upto 3 revisions -left, right, peg- or a path/url and a single revision.

The internal apis guessed which way they were called by looking at specific

argument combinations. In the 1.9 refactoring of diff to the common diff tree

processors the code was normalized to how we usually handle these revisions

in other code, fixing theoretical issues, but losing the notion that this

code is only used in a limited number of cases...

In the specific case of issue #4597 no peg revision was passed, but just a

(url/local path)+ revision... But because we still had an 'unspecified' peg

revision we applied the default rule, resolve revision in HEAD.

The patch resolves this problem by adding an additional argument telling that

we are in this specific case.

* subversion/libsvn_client/diff.c

(diff_repos_wc): Update arguments to more closely document behavior.

(do_diff): Add no_peg_revision argument. Update caller.

(svn_client_diff6,

svn_client_diff_peg6,

svn_client_diff_summarize2,

svn_client_diff_summarize_peg2): Update caller.

* subversion/tests/cmdline/diff_tests.py

(diff_peg_resolve): New test.

(test_list): Add diff_peg_resolve.

  1. … 1 more file in changeset.
When parsing diffs note a possible file mode on git index lines to allow

seeing if we are processing git symlinks or Subversion symlinks in all

scenarios.

Extend our diff code to produce proper index lines when we are diffing

symlinks.

* subversion/libsvn_client/diff.c

(maybe_print_mode_change): Print index line when there is no mode change and

shas are available.

(print_git_diff_header): Pass shas.

(display_prop_diffs): Update caller.

(transform_link_to_git): Calculate sha over the link when transformed.

(diff_content_changed): Update caller.

* subversion/libsvn_diff/parse-diff.c

(parse_next_hunk): Minor consistency fix. Ignore '\' lines outside hunks.

(git_index): New function.

(transitions): Add parser transitions to note index line.

(svn_diff_parse_next_patch): Remove "index " hacks.

* subversion/tests/cmdline/diff_tests.py

(diff_symlinks): Update expected result.

  1. … 2 more files in changeset.
* subversion/tests/cmdline/diff_tests.py

(diff_symlinks): Following up on r1706372, use symlink of different size

than 'iota' to properly detect changes during 'svn diff'.

When running 'svn diff --git' write diffs of symlinks in the same format as

git and 'hg diff -g'.

* subversion/libsvn_client/diff.c

(EXEC_BIT,

NO_EXEC_BIT): Replace these strings...

(exec_mode,

noexec_mode,

kind_file_mode,

kind_symlink_mode): ... with these integers.

(print_git_diff_header_added,

print_git_diff_header_deleted,

maybe_print_mode_change): Calculate mode based on exec+symlink.

(print_git_diff_header): Use property hash as argument.

(display_prop_diffs): Update caller.

(transform_link_to_git): New function.

(diff_content_changed): Transform links if using git format.

* subversion/tests/cmdline/diff_tests.py

(diff_symlinks): New test.

(test_list): Add test.

  1. … 1 more file in changeset.
Make svn diff -r HEAD path use the right set of properties when the local

directory is marked incomplete.

* subversion/libsvn_wc/diff_editor.c

(dir_baton): Add is_incomplete.

(open_directory): Initialize is_incomplete.

(close_directory): Only use provided properties if is_incomplete.

* subversion/tests/cmdline/diff_tests.py

(diff_incomplete_props): New test.

(test_list): Add diff_incomplete_props.

  1. … 1 more file in changeset.
Following up on r1674600, avoid testing the same thing twice and

add a few more edge cases.

* subversion/tests/cmdline/diff_tests.py

(diff_incomplete): Extend test.

Following up on r1674413 and a few more recent incomplete fixes, handle

incomplete like status normal in a few more local diff cases.

Note that this patch depends on the copy fix in r1674455, because that fixes

the issue I found while writing the original version of this test.

* subversion/libsvn_wc/diff_local.c

(diff_status_callback): Handle db status incomplete like db status normal.

* subversion/tests/cmdline/diff_tests.py

(diff_incomplete): New regression test.

(test_list): Add diff_incomplete.

  1. … 1 more file in changeset.
Implement initial support for 'svn diff --summarize --ignore-properties'.

This is part of issue #4567.

We filter property changes, and paths which only have property changes, in the

svn client during diff display. This is not ideal because we want this feature

to be available in the API and we want to avoid adding further special cases

for different diff modes.

However, this simple patch makes a potential 1.9.x backport easier.

An implementation in libsvn_client is planned for later on trunk (1.10-dev)

and will supersede this patch.

See http://colabti.org/irclogger/irclogger_log/svn-dev?date=2015-03-23#l35

for IRC discussion.

Suggested by: julianfoad

Chris <devnullaccount@yahoo.se>

http://mail-archives.apache.org/mod_mbox/subversion-dev/201503.mbox/%3C1427103800.22413.YahooMailBasic%40web121602.mail.ne1.yahoo.com%3E

* subversion/svn/diff-cmd.c

(summarize_baton_t): Add ignore_properties flag.

(summarize_xml): Filter paths with no text/tree (i.e. property-only) changes.

Always show property modification status as "none".

(summarize_regular): Filter paths with no text/tree (i.e. property-only) changes.

Always show a blank property modification column.

(svn_cl__diff): Set ignore_properties flag in summarize baton.

* subversion/tests/cmdline/diff_tests.py

(diff_summarize_ignore_properties, test_list): New test.

  1. … 1 more file 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.
Make the standard commit logic in the test suite a bit stricter and easier

to use by using the existing run_and_verify_svn() infrastructure for

verifying the error result. When no arguments are passed, pass the directory

used for verifying the result, just like run_and_verify_update() and its

variants.

We already removed an argument from this function for 1.9, so cleaning it

up a bit more won't affect backporting.

* subversion/test/cmdline/authz_tests.py

* subversion/test/cmdline/basic_tests.py

* subversion/test/cmdline/blame_tests.py

* subversion/test/cmdline/changelist_tests.py

* subversion/test/cmdline/checkout_tests.py

* subversion/test/cmdline/commit_tests.py

* subversion/test/cmdline/copy_tests.py

* subversion/test/cmdline/depth_tests.py

* subversion/test/cmdline/diff_tests.py

* subversion/test/cmdline/entries_tests.py

* subversion/test/cmdline/export_tests.py

* subversion/test/cmdline/externals_tests.py

* subversion/test/cmdline/history_tests.py

* subversion/test/cmdline/lock_tests.py

* subversion/test/cmdline/log_tests.py

* subversion/test/cmdline/merge_authz_tests.py

* subversion/test/cmdline/merge_reintegrate_tests.py

* subversion/test/cmdline/merge_tests.py

* subversion/test/cmdline/merge_tree_conflict_tests.py

* subversion/test/cmdline/mergeinfo_tests.py

* subversion/test/cmdline/patch_tests.py

* subversion/test/cmdline/prop_tests.py

* subversion/test/cmdline/relocate_tests.py

* subversion/test/cmdline/resolve_tests.py

* subversion/test/cmdline/revert_tests.py

* subversion/test/cmdline/schedule_tests.py

* subversion/test/cmdline/special_tests.py

* subversion/test/cmdline/stat_tests.py

* subversion/test/cmdline/svnauthz_tests.py

* subversion/test/cmdline/svnlook_tests.py

* subversion/test/cmdline/svnversion_tests.py

* subversion/test/cmdline/switch_tests.py

* subversion/test/cmdline/trans_tests.py

* subversion/test/cmdline/tree_conflict_tests.py

* subversion/test/cmdline/update_tests.py

Tweak tests. Remove unneeded args if possible without changing behavior.

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

(run_and_verify_commit): Update error argument name and behavior. Supply

default args if none ar provided.

(inject_conflict_into_wc,

build_greek_tree_conflicts): Update caller.

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

(deep_trees_run_tests_scheme_for_update,

deep_trees_run_tests_scheme_for_switch,

deep_trees_run_tests_scheme_for_merge,

commit_routine_switching): Update caller.

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

(set_up_dir_replace,

set_up_branch): Update caller.

  1. … 37 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.
Fix the copy-from revision number reported in a diff header. It previously

reported 'nonexistent' instead of the copy-from revision in some cases.

1.8.x showed inconsistent revision indications in the diff '---' header in

different scenarios -- the copy-from revision in some cases, 'revision 0' in

some cases, possibly other indications in other cases. This fix doesn't make

everything great but just reduces the degree of inconsistency a little.

* subversion/libsvn_client/diff.c

(diff_file_added, diff_dir_added): Pass on the copy-from revision number.

* subversion/tests/cmdline/diff_tests.py

(diff_git_format_wc_wc,

diff_local_copied_dir): Update the expected output.

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

(diff_local_copied_dir): New test, for the fix in r1619380.

(test_list): Run it.

Apply a simple tweak which fixes the issue identified in r1605866, when not

noticing ancestry: drive the editor as if it is a checkout for local copies.

* subversion/libsvn_client/diff.c

(diff_repos_wc): When reporting a copy in ignore ancestry mode, report the

copy as from r0, to make the repository send all nodes as additions.

* subversion/tests/cmdline/diff_tests.py

(diff_replaced_moved): Remove XFail marker.

  1. … 1 more file in changeset.
Add a new XFail test, reproducing a missing node error reported when diffing

a replaced node below a copy or move against a repository location.

Found by: stsp

* subversion/tests/cmdline/diff_tests.py

(diff_replaced_moved): New test.

(test_list): Add diff_replaced_moved.

Fix diffing locally deleted nodes that happen to be directly below

directories that were copied, but via the default ignore-ancestry

handling processed as if they exist in the repository.

(Yes, hard to explain... see testcase added in r1605810,r1605813)

The more common case of nodes that were deeper below such directories

use the standard local diff code which has much better test coverage.

* subversion/libsvn_wc/diff_editor.c

(walk_local_nodes_diff): Properly handle svn_wc__db_status_deleted when there

is no base node.

* subversion/tests/cmdline/diff_tests.py

(diff_deleted_in_move_against_repos): Remove XFail marker.

  1. … 1 more file in changeset.