Checkout Tools
  • last updated 5 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Separate the implementations of the working copy diff editor (svn diff -r 123

PATH and svn diff -r 123:BASE) and the local diff (svn diff PATH).

These two diffs currently share a lot of code, but they have to look at

restructuring changes in a different way.

This code was originally designed before Subversion 1.4, where all

restructuring changes where simply handled by the repository side of the diff:

we reported the original checked out version as deleted in the adm crawler

and received the restructurings from the repository.

With the invention of the revert base (in 1.4) and now with full local layering

this model grows apart from the local diff, which just reports changes against

the origin of the file. Separating the implementation makes things much

simpler.

No functional changes (yet).

* subversion/libsvn_wc/diff.c

Deleted file.

* subversion/libsvn_wc/diff_editor.c

New file; copied from subversion/libsvn_wc/diff.c

(header): Updated.

(svn_wc_diff6): Remove function.

* subversion/libsvn_wc/diff_local.c

New file; copied from subversion/libsvn_wc/diff.c

(*): Remove all functions and structs only used from the diff editor.

  1. … 2 more files in changeset.
Remove the now unused (and new in 1.7) local_dir_abspath from all functions

of the svn_wc_diff_callbacks4_t interface.

The only functional change is in merge_dir_opened where local_dir_abspath

was still used as a shortcut to get the parent directory.

* subversion/include/svn_wc.h

(svn_wc_diff_callbacks4_t): Remove unused arguments.

* subversion/libsvn_client/diff.c

(diff_props_changed,

diff_dir_props_changed,

diff_file_changed,

diff_file_added,

diff_file_deleted_with_diff,

diff_file_deleted_no_diff,

diff_dir_added,

diff_dir_deleted,

diff_dir_opened,

diff_dir_closed): Remove unused arguments. Update callers.

* subversion/libsvn_client/merge.c

(merge_props_changed,

merge_dir_props_changed,

merge_file_changed,

merge_file_added,

merge_file_deleted,

merge_dir_added,

merge_dir_deleted,

merge_dir_opened,

merge_dir_closed): Remove unused arguments.

(do_file_merge): Update caller.

* subversion/libsvn_client/repos_diff.c

(diff_deleted_dir,

delete_entry,

add_directory,

open_directory,

close_file,

close_directory): Update callers.

* subversion/libsvn_wc/diff.c

(file_diff,

walk_local_nodes_diff,

report_wc_file_as_added,

delete_entry,

open_directory,

close_directory,

close_file): Update callers.

  1. … 4 more files in changeset.
Add some const qualifiers to avoid compiler warnings.

* subversion/libsvn_wc/diff.c

(struct file_baton): Make base_checksum const.

(close_file): Make variable const.

Various preparations for moving the working copy obstruction handling from

the url<->url diff editor into the merge code.

The old obstruction checks fully relied on the access baton available checks

for all directory checks and we can't map this to wc-ng without some

restructuring.

This patch by itself removes the assumption that the diff editor is for

driving merges only, by removing a baton type expectation.

(This patch is a first part from a larger set which will be applied over the

next few days)

* subversion/include/svn_wc.h

(svn_wc_diff_callbacks4_t): Add file opened event and allow skipping of

files and directories alike.

* subversion/libsvn_client/client.h

(svn_client__dry_run_deletions): Remove function.

(svn_client__get_diff_editor): Move arguments around. Add

walk_deleted_dirs argument.

* subversion/libsvn_client/diff.c

(diff_props_changed,

diff_dir_props_changed): Update arguments.

(diff_file_opened): New function.

(diff_file_changed,

diff_file_added): Update caller.

(diff_dir_added,

diff_dir_opened,

diff_dir_closed): Update arguments.

(diff_repos_repos): Update caller.

* subversion/libsvn_client/merge.c

(svn_client__dry_run_deletions): Remove function.

(merge_dir_props_changed): New function, wrapping merge_props_changed.

(merge_file_opened): New function.

(merge_file_deleted): Record deleted files in dry run mode.

(merge_dir_added): Add new arguments.

(merge_dir_deleted): Record delected directories in dry run mode.

(merge_dir_opened): Add argument.

(merge_dir_closed): Add argument. Clear deleted files hash.

(merge_callbacks): Update list.

(drive_merge_report_editor): Update caller.

* subversion/libsvn_client/repos_diff.c

(edit_baton): Remove dav boolean.

(delete_entry): Don't call into the merge code when performing a dry run.

(add_directory): Update caller.

(open_directory): Update caller.

(open_file): Call new callback to allow skipping the ra file call and other

events on obstructions.

(close_directory): Remove call into merge code. Update caller.

(change_file_prop,

change_dir_prop): Handle binary properties correctly and remove check for dav

as this check is safe anyway.

(svn_client__get_diff_editor): Update arguments. Remove uri parsing.

* subversion/libsvn_wc/deprecated.c

(wrap_4to3_file_opened): New function.

(wrap_4to3_dir_added,

wrap_4to3_dir_props_changed,

wrap_4to3_dir_opened,

wrap_4to3_dir_closed): Add arguments.

(diff_callbacks3_wrapper): Update list.

* subversion/libsvn_wc/diff.c

(walk_local_nodes_diff): Update caller.

(report_wc_directory_as_added): Update caller.

(open_directory): Call callback.

(close_directory): Update caller and call callback.

(open_file): Call callback.

  1. … 6 more files in changeset.
Fix some accesses of freed memory when using ra_svn by duplicating paths

provided to the editor into the baton pool.

* subversion/libsvn_wc/diff.c

(make_dir_baton, make_file_baton): Duplicate path in baton pool.

The ambient depth filter is the local equivalent of the repository filtering.

The repository knows only about the wc-ng BASE layer, so the filter should do

the same thing and ignore layers above BASE for retrieving filtering

information.

When the repository reports a node as added, it also tells us "You don't know

about that node", so we shouldn't look at its existing information in the

working copy as that will just return a path not found.

(We just told the server what we have and don't have via the adm crawler,

so it just tells us what we already read from the wc).

* subversion/libsvn_wc/ambient_depth_filter_editor.c

(edit_baton): Remove read_base.

(ambient_read_info): Remove hidden and read_base arguments.

(make_dir_baton): Add added boolean and use it to check if we should call

ambient_read_info.

(make_file_baton): Add added boolean and use it to check if we should call

ambient_read_info. Use status instead of hidden.

(open_root,

delete_entry): Update caller. Use status instead of hidden.

(add_directory): Update caller.

(open_directory): Update caller. Use status instead of hidden.

(add_file,

open_file): Update caller.

(svn_wc__ambient_depth_filter_editor): Remove read_base.

* subversion/libsvn_wc/status.c

(svn_wc_get_status_editor5): Update caller.

* subversion/libsvn_wc/update_editor.c

(make_editor): Update caller.

* subversion/libsvn_wc/wc.h

(svn_wc__ambient_depth_filter_editor): Update comment and prototype.

  1. … 4 more files in changeset.
Following up on r1091187, and r1092502 also use the server side depth filtering

for the working copy diff handling.

Like the other cases this required making the server provide less changes,

which improves overall performance.

* subversion/include/svn_wc.h

(svn_wc_get_diff_editor6): Update documentation. Reorder a few arguments to

our new standard ordering.

(svn_wc_get_diff_editor5): Update documentation.

* subversion/libsvn_client/diff.c

(diff_repos_wc): Tell libsvn_wc the ra layer can filter. Call ra_update

with depth unknown to follow the ambient depth. Update caller.

* subversion/libsvn_wc/deprecated.c

(svn_wc_get_diff_editor5): Update caller.

* subversion/libsvn_wc/diff.c

(svn_wc_get_diff_editor6): Follow prototype changes. Don't use the

ambient depth filter if not necessary.

  1. … 3 more files in changeset.
Make the diff editor report changes relative from the anchor, instead of

relative from whatever is passed in to work more like the other editors.

(And reverse this behavior in the deprecated wrappers)

* subversion/include/svn_wc.h

(svn_wc_get_diff_editor6): Update arguments. Takes an anchor_abspath now.

(svn_wc_diff6): Update arguments. Takes a target_abspath now.

* subversion/libsvn_client/diff.c

(diff_cmd_baton): Store anchor.

(diff_props_changed): Update documentation.

(diff_dir_props_changed): New function, wrapping diff_dir_props_changed.

Calculate old style path.

(diff_file_changed,

diff_file_added,

diff_file_deleted_with_diff,

diff_file_deleted_no_diff,

diff_dir_added,

diff_dir_deleted,

diff_dir_opened,

diff_dir_closed): Calculate old style path.

(find_wc_root): Remove function.

(diff_wc_wc): Calculate anchor and store in baton.

(diff_repos_wc): Fetch wcroot directly and store anchor in baton.

* subversion/libsvn_wc/deprecated.c

(diff_callbacks3_wrapper_baton): Add anchor.

(wrap_4to3_file_changed,

wrap_4to3_file_added,

wrap_4to3_file_deleted,

wrap_4to3_dir_added,

wrap_4to3_dir_deleted,

wrap_4to3_dir_props_changed,

wrap_4to3_dir_opened,

wrap_4to3_dir_closed): Join anchor before path.

(svn_wc_get_diff_editor5): Pass anchor_abspath and store anchor.

svn_wc_diff5): Pass target_abspath and store anchor.

* subversion/libsvn_wc/diff.c

(edit_baton): Remove anchor.

(dir_baton): Update documentation of compared.

(file_baton): Remove wc_path.

(make_edit_baton): Update arguments.

(make_file_baton): Don't calculate wc_path.

(walk_local_nodes_diff): Simplify and path anchor calculations.

(report_wc_directory_as_added): Use relpath join.

(set_target_revision): Root path is "" now.

(delete_entry,

add_directory,

open_directory): Simplify path calculations.

(close_directory): Store path as key.

(add_file,

open_file): Simplify path calculations.

(close_edit): Use "" for anchor path.

(svn_wc_get_diff_editor6): Ensure anchor_abspath is absolute.

(svn_wc_diff6): Expect abspath

  1. … 3 more files in changeset.
Following up on r1096057 and r1096068, move two more support functions in the

wc diff editor to using only the editor baton and passed paths.

* subversion/include/svn_wc.h

(svn_wc_get_diff_editor6): Update description of use_text_base, to remove

a few invalid assumptions I added. The definition is back in line with the

<=1.6 definition now.

* subversion/libsvn_wc/diff.c

(walk_local_nodes_diff): Use svn_wc__db_read_info() instead of two db calls.

(report_wc_file_as_added,

report_wc_directory_as_added): Update arguments to edit_baton and paths.

Update callers.

(delete_entry): Update caller.

(close_file): Initialize some variables when ignoring an error.

  1. … 1 more file in changeset.
* subversion/libsvn_wc/diff.c

(close_file): Reorganize. First get the BASE information properly and then

use that to reconstruct the repository version of the file.

If the repository provides a binary diff it should be applied against the

file the server expects it to be applied to. Not to some random other file

that happens to work.

Somehow our testsuite currently expects this not to be the case.

* subversion/libsvn_wc/diff.c

(includes): Add apr_md5.h.

(file_baton): Add 2 checksums. Remove window handler values.

(open_file): Verify that there is a BASE node, and store the current

checksum.

(window_handler_baton): New struct.

(window_handler): Use new struct. When done store the digest in the file

baton.

(apply_textdelta): Simplify pristine file obtain code. (And remove the

hack that set ->added for local additions instead of repos adds).

Initialize window_handler_baton.

(close_file): Verify that the expected checksum matches what we have and

if the node is not reported as added it should be there. Initialize

status correctly on error conditions.

  1. … 1 more file in changeset.
Following up on r1096057, more local changes untangling in the wc-diff editor.

* subversion/libsvn_wc/diff.c

(directory_elements_diff): Rename to walk_local_nodes_diff, and update

the arguments to only take the edit baton and specific arguments.

(close_directory): Update caller.

(close_edit): Update caller.

(svn_wc_diff6): Update caller.

Small first step for cleaning up the wc diff code.

No real changes (yet).

* subversion/libsvn_wc/diff.c

(file_diff): Disconnect from dir baton by updating the set of arguments

to just what is necessary.

(directory_elements_diff): Update caller.

(report_wc_file_as_added): Update caller.

Fix the diff issue I just broke by getting the pristine version via a new

api. This patch removes the guessing from which layer we should pick the

prisine, but I'm not 100% sure if we always pick the right version.

The diff code needs review, documentation (and should be compared to the 1.6

behavior).

* subversion/include/svn_wc.h

(svn_wc_get_diff_editor6): Explain use_text_base in WC-NG terms.

* subversion/libsvn_wc/diff.c

(get_nearest_pristine_text_as_file): Rename to ...

(get_pristine_file): ... this and add use_base argument to allow choosing

between the pristine and the BASE version. This removes the original

'just pick one' implementation.

(file_diff): Use the BASE version when replacing with a local addition,

otherwise pristine.

(report_wc_file_as_added): Follow eb->use_text_base.

(delete_entry): Follow eb->use_text_base.

(close_file): Follow eb->use_test_base.

* subversion/tests/cmdline/diff_tests.py

(diff_schedule_delete): Remove XFail marker. We can see under deletes again.

  1. … 2 more files in changeset.
In our pristine store we store the length (in bytes) of the pristine streams.

We can use this (and the new had_props boolean of _read_info()) to further

optimize the file comparison code below svn_wc__internal_file_modified_p(),

without additional IO.

* If a file doesn't have properties, it doesn't need translation, so

don't perform DB queries to get the translation details from the properties.

* If a file doesn't need translation *and* doesn't match the pristine

size, it is not equal to the pristine file.

* subversion/libsvn_wc/adm_crawler.c

(read_and_checksum_pristine_text): Update caller.

* subversion/libsvn_wc/adm_files.c

(svn_wc__get_pristine_contents): Add size argument.

* subversion/libsvn_wc/adm_files.h

(svn_wc__get_pristine_contents): Add size argument.

* subversion/libsvn_wc/adm_ops.c

(svn_wc_get_pristine_contents2): Update caller.

* subversion/libsvn_wc/copy.c

(copy_pristine_text_if_necessary): Update caller.

* subversion/libsvn_wc/diff.c

(apply_textdelta): Update caller.

* subversion/libsvn_wc/questions.c

(compare_and_verify): Don't do work that we can avoid, by receiving a bit

more information from the caller. If we don't translate and the filesize

doesn't match, don't read the files.

(svn_wc__internal_file_modified_p): Retrieve the filesize and whether we have

properties and pass that to compare_and_verify.

* subversion/libsvn_wc/update_editor.c

(apply_textdelta): Update caller.

* subversion/libsvn_wc/wc-queries.sql

(STMT_SELECT_PRISTINE_SIZE): New query.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_pristine_read): Add argument.

* subversion/libsvn_wc/wc_db_pristine.c

(pristine_read_baton_t): Add field.

(pristine_read_txn): Use new query. Set size if requested; allow NULL

contents.

(svn_wc__db_pristine_read): Set new argument in baton.

* subversion/libsvn_wc/workqueue.c

(process_commit_file_install): Don't force a sha1 comparison.

* subversion/tests/libsvn_wc/pristine-store-test.c

(pristine_write_read,

pristine_delete_while_open): Update caller.

  1. … 12 more files in changeset.
Following up on r1094135, apply a similar change to svn_wc__db_base_get_info()

and its callers.

This patch adds the following arguments:

had_props Does this node have pristine properties in BASE

needs_full_update Does this node need 'incomplete' handling in editor v1.

(currently equivalent to status ==

svn_wc__db_status_incomplete)

It also updates the last_mod_time and translated_size properties like how

they are now placed in _read_info().

* subversion/libsvn_wc/adm_crawler.c

(find_base_rev,

svn_wc_crawl_revisions5): Update callers.

* subversion/libsvn_wc/adm_ops.c

(svn_wc__internal_remove_from_revision_control) Update caller.

* subversion/libsvn_wc/ambient_depth_filter_editor.c

(ambient_read_info): Update callers.

* subversion/libsvn_wc/crop.c

(svn_wc_exclude): Update callers.

* subversion/libsvn_wc/diff.c

(get_nearest_pristine_text_as_file,

file_diff): Update callers.

* subversion/libsvn_wc/entries.c

(get_base_info_for_deleted,

read_one_entry): Update callers.

* subversion/libsvn_wc/node.c

(svn_wc__node_get_base_rev,

svn_wc__node_get_working_rev_info,

svn_wc__node_get_lock_info,

svn_wc__node_get_origin,

svn_wc__node_get_commit_status): Update callers.

* subversion/libsvn_wc/translate.c

(svn_wc__maybe_set_read_only): Update callers.

* subversion/libsvn_wc/update_editor.c

(complete_directory,

open_root,

create_tree_conflict,

check_tree_conflict,

open_directory,

close_directory,

open_file): Update callers.

* subversion/libsvn_wc/wc_db.c

(base_get_info): Update arguments list and retrieval.

(svn_wc__db_base_get_info): Update argument list and pass new arguments.

(get_info_for_copy,

bump_node_revision,

bump_revisions_post_commit,

end_directory_update): Update callers.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_base_get_info): Update argument list and documentation.

* subversion/libsvn_wc/workqueue.c

(remove_base_node,

run_base_remove,

run_deletion_postcommit): Update callers.

* subversion/tests/libsvn_wc/db-test.c

(test_getting_info,

validate_node): Update callers.

  1. … 12 more files in changeset.
Add three more arguments to our function with the most arguments. Do this to

allow handling more operations with a single read transaction and to allow

fixing code that should know about multiple WORKING layers.

This patch adds the following three new (optional) boolean output arguments:

had_props - Does it have pristine properties

op_root - Is it a layer defining operation

have_more_work - Does it have multiple working layers

Because I had to update all callers anyway, I moved a few arguments to a more

sensible location. (See the wc_db.h change for more information on that).

This patch just updates the callers to get the same information as before.

No functional changes in any of the callers.

* subversion/libsvn_wc/adm_crawler.c

(svn_wc_restore,

report_revisions_and_depths,

find_base_rev,

svn_wc_crawl_revisions5,

read_and_checksum_pristine_text): Update callers.

* subversion/libsvn_wc/adm_files.c

(svn_wc__text_base_path_to_read,

svn_wc__get_pristine_contents,

svn_wc__internal_ensure_adm): Update callers.

* subversion/libsvn_wc/adm_ops.c

(process_committed_leaf,

svn_wc__process_committed_internal,

svn_wc_delete4,

check_can_add_to_parent,

check_can_add_node,

revert_restore,

new_revert_partial,

svn_wc__internal_remove_from_revision_control,

svn_wc__internal_changelist_match): Update callers.

* subversion/libsvn_wc/ambient_depth_filter_editor.c

(ambient_read_info): Update caller.

* subversion/libsvn_wc/cleanup.c

(repair_timestamps): Update caller.

* subversion/libsvn_wc/conflicts.c

(recursive_resolve_conflict): Update caller.

* subversion/libsvn_wc/copy.c

(copy_pristine_text_if_necessary,

svn_wc_copy3): Update callers.

* subversion/libsvn_wc/crop.c

(crop_children,

svn_wc_exclude,

svn_wc_crop_tree2): Update callers.

* subversion/libsvn_wc/diff.c

(get_nearest_pristine_text_as_file,

file_diff,

report_wc_file_as_added,

report_wc_directory_as_added,

delete_entry,

apply_textdelta,

close_file,

* subversion/libsvn_wc/entries.c

(get_base_info_for_deleted,

read_one_entry,

svn_wc_walk_entries3,

* subversion/libsvn_wc/lock.c

(svn_wc__internal_check_wc,

adm_available,

child_is_disjoint): Update callers.

* subversion/libsvn_wc/node.c

(svn_wc__node_get_repos_info,

svn_wc_read_kind,

svn_wc__node_get_depth,

svn_wc__node_get_changed_info,

svn_wc__node_get_changelist,

svn_wc__node_get_base_checksum,

svn_wc__node_get_translated_size,

svn_wc__node_get_repos_relpath,

svn_wc__internal_get_copyfrom_info,

svn_wc__internal_walk_children,

svn_wc__node_is_status_deleted,

svn_wc__node_is_status_absent,

svn_wc__node_is_status_not_present,

svn_wc__node_is_status_excluded,

svn_wc__node_is_added,

svn_wc__node_get_base_rev,

svn_wc__node_get_working_rev_info,

svn_wc__node_get_commit_base_rev,

svn_wc__internal_node_get_schedule,

svn_wc__node_get_info_bits,

svn_wc__get_mergeinfo_walk_info,

svn_wc__node_depth_is_exclude,

svn_wc__node_get_origin,

svn_wc__node_get_commit_status): Update callers.

* subversion/libsvn_wc/props.c

(svn_wc__get_pristine_props,

svn_wc__internal_propset,

svn_wc__props_modified): Update callers.

* subversion/libsvn_wc/questions.c

(compare_and_verify,

svn_wc__internal_file_modified_p,

svn_wc__internal_conflicted_p,

svn_wc__expand_keywords): Update caller.

* subversion/libsvn_wc/relocate.c

(svn_wc_relocate4): Update callers.

* subversion/libsvn_wc/status.c

(read_info,

internal_status): Update callers. Avoid C++ keyword mutable.

* subversion/libsvn_wc/translate.c

(svn_wc__expand_keywords): Update callers.

* subversion/libsvn_wc/update_editor.c

(already_in_a_tree_conflict,

delete_entry,

add_directory,

open_directory,

add_file,

open_file,

make_editor,

svn_wc__check_wc_root,

svn_wc_add_repos_file4):

* subversion/libsvn_wc/wc_db.c

(read_info): Update argument list of prototype.

(cross_db_copy,

get_info_for_copy,

temp_op_delete_txn): Update callers.

(read_info): Update argument list and calculate new values.

(svn_wc__db_read_info): Update argument list and update caller.

(read_url_txn,

svn_wc__db_global_relocate,

svn_wc__db_node_hidden,

has_switched_subtrees): Update callers.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_read_info): Update, extend and cleanup documentation. Update argument

list.

* subversion/libsvn_wc/workqueue.c

(remove_base_node,

log_do_committed,

run_file_install): Update callers.

* subversion/tests/libsvn_wc/db-test.c

(test_working_info,

test_global_relocate): Update callers.

  1. … 21 more files in changeset.
Remove a module-private function that trivially wrapped another

module-private function.

* subversion/libsvn_wc/wc.h

(svn_wc__internal_text_modified_p): Remove.

* subversion/libsvn_wc/questions.c

(svn_wc__internal_text_modified_p): Remove.

(svn_wc_text_modified_p2): Now use svn_wc__internal_file_modified_p().

* subversion/libsvn_wc/adm_ops.c

(svn_wc__internal_remove_from_revision_control): Now use

svn_wc__internal_file_modified_p().

* subversion/libsvn_wc/diff.c

(file_diff, close_file): Now use svn_wc__internal_file_modified_p().

* subversion/libsvn_wc/status.c

(assemble_status): Now use svn_wc__internal_file_modified_p().

* subversion/libsvn_wc/update_editor.c

(entry_has_local_mods, merge_file): Now use

svn_wc__internal_file_modified_p().

* subversion/libsvn_wc/wc_db.c

(has_local_mods): Now use svn_wc__internal_file_modified_p().

* subversion/libsvn_wc/workqueue.c

(log_do_committed): Now use svn_wc__internal_file_modified_p().

  1. … 7 more files in changeset.
Add an UPDATE_ROOT argument to svn_wc__db_base_get_info() and update all

callers to just pass NULL for it.

* subversion/libsvn_wc/wc_db.c

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_base_get_info): Add update_root argument.

* subversion/libsvn_wc/adm_crawler.c

* subversion/libsvn_wc/adm_files.c

* subversion/libsvn_wc/adm_ops.c

* subversion/libsvn_wc/ambient_depth_filter_editor.c

* subversion/libsvn_wc/crop.c

* subversion/libsvn_wc/diff.c

* subversion/libsvn_wc/entries.c

* subversion/libsvn_wc/node.c

* subversion/libsvn_wc/update_editor.c

* subversion/libsvn_wc/workqueue.c

* subversion/tests/libsvn_wc/db-test.c

(*): Update all callers.

  1. … 12 more files in changeset.
Adjust references to pre-ASF-migration revisions by the +840074 offset.

Did *.h, *.c, and *.py files this go-round. Was thinking of doing everything

in five minutes, until I saw CHANGES (which needs a conversion script unless

you enjoy grunt work).

* subversion/libsvn_client/externals.c

* subversion/libsvn_client/log.c

* subversion/libsvn_client/repos_diff.c

* subversion/libsvn_delta/compose_delta.c

* subversion/libsvn_subr/error.c

* subversion/libsvn_subr/io.c

* subversion/libsvn_wc/diff.c

* subversion/svnserve/serve.c

* subversion/tests/cmdline/blame_tests.py

* subversion/tests/cmdline/depth_tests.py

* subversion/tests/cmdline/lock_tests.py

* subversion/tests/cmdline/merge_reintegrate_tests.py

* subversion/tests/cmdline/merge_tests.py

* subversion/tests/cmdline/update_tests.py

* subversion/tests/libsvn_repos/repos-test.c

* tools/buildbot/master/Feeder.py

* tools/dev/check-license.py

  1. … 16 more files in changeset.
Remove the remaining checks for obstruction statee in libsvn_wc. These

statee are no longer returned from the wc_db api since we switched to

single-db. This is a a final cleanup step before removing some parts

of the multi-db support.

No functional change.

* subversion/libsvn_wc/adm_crawler.c

(report_revisions_and_depths): Disable check for obstructed.

* subversion/libsvn_wc/adm_files.c

(svn_wc__get_pristine_contents): Disable check for obstructed and

remove base-deleted check (value is wc_db internal).

(svn_wc__internal_ensure_adm): Disable check for obstructed.

* subversion/libsvn_wc/adm_ops.c

(process_committed_leaf,

svn_wc__process_committed_internal,

svn_wc_add4): Disable obstructed status checks.

* subversion/libsvn_wc/copy.c

(svn_wc_copy3): Disable obstructed check.

* subversion/libsvn_wc/crop.c

(svn_wc_exclude,

svn_wc_crop_tree2): Disable obstructed checks.

* subversion/libsvn_wc/diff.c

(file_diff): Remove obstructed check (file couldn't be obstructed)

* subversion/libsvn_wc/entries.c

(get_base_info_for_deleted,

read_one_entry): Disable obstructed checks.

* subversion/libsvn_wc/lock.c

(adm_available): Disable obstructed checks.

* subversion/libsvn_wc/node.c

(svn_wc__node_get_repos_info,

svn_wc__internal_node_get_url,

svn_wc__node_get_repos_relpath,

svn_wc__internal_get_copyfrom_info,

svn_wc__node_is_status_deleted,

svn_wc__node_is_added,

svn_wc__internal_is_replaced,

svn_wc__node_get_commit_base_rev,

svn_wc__internal_node_get_schedule): Disable checks for obstructed statee.

* subversion/libsvn_wc/props.c

(svn_wc__get_pristine_props): Disable check for obstructed.

* subversion/libsvn_wc/revision_status.c

(analyze_status): Disable check for obstructed status.

* subversion/libsvn_wc/status.c

(internal_status): Disable obstructed test.

* subversion/libsvn_wc/update_editor.c

(node_get_relpath_ignore_errors,

create_tree_conflict,

check_tree_conflict,

add_directory): Disable obstructed checks.

* subversion/libsvn_wc/workqueue.c

(remove_base_node,

log_do_committed): Disable obstructed checks.

  1. … 13 more files in changeset.
Revert r990790 and r990804. "Make the diff editor able to receive

copyfrom info"

It turns out that determing copyfrom information is more involved

than I first anticipated. We first need a proper definition of

what kind of information the server should send.

  1. … 16 more files in changeset.
[Note from the future: This commit was reverted in r990826]

Make the diff editor able to receive copyfrom information. Involves

passing down a 'send_copyfrom_args' to all RA implemtations.

The copyfrom information is needed when creating diffs with the git

unidiff extension for copied paths.

Note that this commit merely allows the copyfrom args to be passed to

the client. They copyfrom information is not yet stored and used.

* subversion/libsvn_ra/ra_loader.c

(svn_ra_do_diff4): New.

(svn_ra_do_diff3): Move from here ..

* subversion/libsvn_ra/deprecated.c

(svn_ra_do_diff3): .. To here.

(svn_ra_do_diff2): Call svn_ra_do_diff3() instead of the vtable

callback since the signature has changed.

* subversion/libsvn_ra/wrapper_template.h

(compat_do_diff): Track the new 'send_copyfrom_args' parameter.

* subversion/libsvn_ra/ra_loader.h

(svn_ra__vtable_t): Add 'send_copyfrom_args' parameter.

* subversion/libsvn_ra_local/ra_plugin.c

(svn_ra_local__do_diff): Add 'send_copyfrom_args' parameter.

* subversion/tests/cmdline/diff_tests.py

(test_list): Mark diff_backward_repos_wc_copy() as XFailing.

The tested code currently does not handle copied paths

with no text changes. Will be fixed in a follow-up.

* subversion/libsvn_ra_svn/protocol

(...) Update the diff command description.

* subversion/libsvn_ra_svn/client.c

(ra_svn_diff): Add 'send_copyfrom_args' to the command to be written.

* subversion/include/svn_ra.h

(svn_ra_do_diff4): New.

(svn_ra_do_diff3): Deprecate.

* subversion/libsvn_wc/diff.c

(add_file): Add TODO about recording the copyfrom info and checking

that the copyfrom revision is within the span of the diff operation.

* subversion/libsvn_client/repos_diff.c

(add_file): Add TODO about recording the copyfrom info and checking

that the copyfrom revision is within the span of the diff operation.

* subversion/libsvn_client/diff.c

(diff_repos_repos,

diff_repos_wc,

diff_summarize_repos_repos): Replace svn_ra_do_diff3() with

svn_ra_do_diff4().

* subversion/libsvn_ra_neon/ra_neon.h

(svn_ra_neon__do_diff): Add 'send_copyfrom_args' parameter.

* subversion/libsvn_ra_neon/fetch.c

(svn_ra_neon__do_diff): Add 'send_copyfrom_args' parameter.

* subversion/libsvn_ra_serf/update.c

(svn_ra_serf__do_diff): Add 'send_copyfrom_args' parameter.

* subversion/libsvn_ra_serf/ra_serf.h

(svn_ra_serf__do_diff): Add 'send_copyfrom_args' parameter.

* subversion/svnserve/serve.c

(diff): Parse the parameters for send_copyfrom_param.

  1. … 16 more files in changeset.
Make copies modified after being copied show up correctly in git diffs.

* subversion/tests/cmdline/diff_tests.py

(make_git_diff_header): In git diff headers for copies with modifications,

show the REPOS_RELPATH, which is relative to the repository root,

not the PATH_AS_SHOWN which comes from the command line.

(diff_git_format_wc_wc): Expand test to cover copies with modifications.

* subversion/libsvn_wc/diff.c

(file_diff): Move the MODIFIED local variable and related calls back into

a tighter scope, as we don't need it elsewhere anymore.

When generating git diffs, always report copies via the file_added()

callback, never through the file_changed() one. We used to show copies

with modifications via file_changed(), but that does not cause git diff

copy headers to be generated.

  1. … 1 more file in changeset.
Make copies show up correctly in the output of svn diff --git.

We used to show nothing for copies unless --show-copies-as-adds was specified.

But with git diffs, we need to show the 'copy from/copy to' headers.

The libsvn_wc diff code needs to know whether we're doing a git diff,

so that it can drive the callbacks in the libsvn_client diff code correctly.

* subversion/include/svn_wc.h

(svn_wc_get_diff_editor6, svn_wc_diff6): New parameter use_git_diff_format.

(svn_wc_get_diff_editor5, svn_wc_diff5): Update docstrings.

* subversion/libsvn_wc/diff.c

(edit_baton, make_edit_baton): New member/parameter use_git_diff_format.

(file_diff): When producing a git diff, call the file_added callback for

copies which have not been modified. We diff them against the text base,

so the content diff will be empty -- but the file_added callback will

also cause git diff headers to be printed.

(svn_wc_get_diff_editor6, svn_wc_diff6): New parameter use_git_diff_format,

passed on to make_edit_baton().

* subversion/libsvn_wc/deprecated.c

(svn_wc_get_diff_editor5, svn_wc_diff5): Make compatiblity wrappers set

the new use_git_diff_format parameter to FALSE.

* subversion/libsvn_client/diff.c

(diff_content_changed): Always print the Index: header when a git diff

header is printed, even if the content diff is empty.

(diff_parameters): New member use_git_diff_format.

(diff_wc_wc, diff_repos_wc, do_diff, svn_client_diff5): Handle the new

diff_parameters member.

[ Note from the future:

* notes/bar: Committed by accident in this commit, deleted again in r989813.

]

  1. … 4 more files in changeset.
Make the ambient depth filter capable of handling just the BASE_NODE depth,

and reduce the number of database operations on the way.

* subversion/libsvn_wc/ambient_depth_filter_editor.c

(edit_baton): Add read_base variable.

(read_ambient_info): New function.

(make_dir_baton, make_file_baton, open_root, delete_entry,

open_directory): Use read_ambient_info instead of one or more

other db operations.

(svn_wc__ambient_depth_filter_editor): Reorder arguments to new

standard ordering and accept read_base argument.

* subversion/libsvn_wc/diff.c

(svn_wc_get_diff_editor6): Update caller. Keep working_tree filtering.

* subversion/libsvn_wc/update_editor.c

(make_editor): Update caller. Request base_tree filtering.

* subversion/libsvn_wc/wc.h

(svn_wc__ambient_depth_filter_editor): Update prototype and documentation.

  1. … 3 more files in changeset.
Remove a left over reference to revert properties. New code should talk

about base_properties or pristine_properties. This patch should also fix

the crash reported by artagnon in: '[BUG] svn diff segfault' by making

sure that the file diff always sees pristine properties, even for added

files.

* subversion/libsvn_wc/diff.c

(file_diff): Retrieve base properties instead of revert properties and

ensure that baseprops is not NULL when retrieving pristine props.

* subversion/libsvn_wc/props.c

(svn_wc__get_revert_props): Remove now unused function.

* subversion/libsvn_wc/props.h

(svn_wc__get_revert_props): Remove function.

  1. … 2 more files in changeset.
Start stripping out code that is obsolete now that SVN_EXPERIMENTAL_PRISTINE

is defined.

* subversion/ibsvn_wc/adm_crawler.c,

subversion/libsvn_wc/diff.c,

subversion/libsvn_wc/copy.c

Remove SVN_EXPERIMENTAL_PRISTINE ifdefs and the pre-pristine-store code

chunks that were ifdef'd out.

  1. … 2 more files in changeset.
Make 'svn diff --git-diff --show-copies-as-adds' show git diff headers for

copied paths.

At the moment this only works if we invoke the diff operation with

--show-copies-as-adds set. Since we need to be backward compat with

the old flags, some changes needs to be done in the callers of the

diff callbacks to distinguish between:

unidiff (don't report copied paths without modifications)

unidiff (--show-copies-as-adds means do report copies without mods)

git diff (report copies for paths without modifications)

git diff (--show-copies-as-adds... Hardly needed?)

.. Just taking it one step at a time.

* subversion/libsvn_wc/diff.c

(file_diff): Fetch original_repos_relpath and pass it to the

file_added() callback if --show-copies-as-adds has been set.

* subversion/libsvn_client/diff.c

(diff_cmd_baton): Add WC_CTX member. Needed for fetching the

repos_relpath to compare scope of copyfrom_path in diff_file_added().

(diff_content_changed): Add COPYFROM_PATH member.

(diff_file_changed): Call diff_content_changed() with NULL value for

copyfrom_path.

(diff_file_added): Check scope of copyfrom_path to determine if we have

a copy or add.

(svn_client_diff5

svn_client_diff_peg5): Initialize WC_CTX member of diff_cmd_baton.

  1. … 1 more file in changeset.
Switch the argument order of (the new in 1.7) svn_dirent_split(),

svn_uri_split() and svn_relpath_split() functions to our new standard

order: output arguments before input arguments.

* subversion/include/svn_dirent_uri.h

(svn_dirent_split, svn_relpath_split, svn_uri_split): Reorder arguments.

* subversion/libsvn_client/add.c

* subversion/libsvn_client/commit.c

* subversion/libsvn_client/copy.c

* subversion/libsvn_client/delete.c

* subversion/libsvn_client/diff.c

* subversion/libsvn_client/externals.c

* subversion/libsvn_client/info.c

* subversion/libsvn_client/list.c

* subversion/libsvn_client/locking_commands.c

* subversion/libsvn_client/update.c

* subversion/libsvn_delta/path_driver.c

* subversion/libsvn_subr/dirent_uri.c

* subversion/libsvn_wc/adm_crawler.c

* subversion/libsvn_wc/adm_files.c

* subversion/libsvn_wc/adm_ops.c

* subversion/libsvn_wc/copy.c

* subversion/libsvn_wc/diff.c

* subversion/libsvn_wc/entries.c

* subversion/libsvn_wc/lock.c

* subversion/libsvn_wc/merge.c

* subversion/libsvn_wc/node.c

* subversion/libsvn_wc/old-and-busted.c

* subversion/libsvn_wc/props.c

* subversion/libsvn_wc/update_editor.c

* subversion/libsvn_wc/wc_db.c

* subversion/libsvn_wc/wc_db_pdh.c

* subversion/mod_dav_svn/repos.c

* subversion/svn/util.c

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

(*): Update callers.

  1. … 29 more files in changeset.