repos_diff_summarize.c

Checkout Tools
  • last updated 6 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Rename 'repos_diff_summarize.c' to 'diff_summarize.c', as it is no longer

specific to repository diffs.

* subversion/libsvn_client/diff_summarize.c

New name for ...

* subversion/libsvn_client/repos_diff_summarize.c

... this.

  1. … 1 more file in changeset.
In 'diff --summarize', don't call the summarizing callback if there is no

change to report. A follow-up to r1159880.

* subversion/libsvn_client/repos_diff_summarize.c

(send_summary): Assert that there is some change to report.

(cb_file_changed): Don't send a summary if there is no change to report.

Change the implementation of 'svn diff --summarize' to use the standard

'diff callbacks' mechanism, so that it may be more easily extended. The

summary mode currently supports only repos-repos diffs, and it was reporting

the summary results directly from a delta editor drive. Instead, write a

set of diff callbacks that produce summary information, and drive them via

the existing svn_client__get_diff_editor() for a repos-repos diff. Later we

can drive the same diff callbacks from WC-WC and WC-repos diff sources.

* subversion/libsvn_client/client.h

(svn_client__get_diff_editor): Add a 'text_deltas' parameter to control

whether text deltas are expected by this editor. This should also

suppress the generation of text deltas (and full texts) when it is

false, but at the moment it does not.

(svn_client__get_diff_summarize_editor): Remove; replace with ...

(svn_client__get_diff_summarize_callbacks): ... this new function.

* subversion/libsvn_client/diff.c

(diff_repos_repos): Update the call to svn_client__get_diff_editor().

(diff_summarize_repos_repos): Use svn_client__get_diff_summarize_callbacks

combined with svn_client__get_diff_editor, instead of

svn_client__get_diff_summarize_editor.

* subversion/libsvn_client/merge.c

(drive_merge_report_editor): Update the call to

svn_client__get_diff_editor().

* subversion/libsvn_client/repos_diff.c

(svn_client__get_diff_editor): Add a 'text_deltas' parameter, store it ...

(edit_baton): ... in here, and ...

(close_file): ... if it is false then don't check the received text

checksum, because if text deltas are not being received by this editor

then the checksum will not have been calculated correctly.

(diff_deleted_dir): Call the dir_deleted() callback for each subdirectory

in a deleted tree. This call had always been missing but the lack of it

had not previously been noticed.

* subversion/libsvn_client/repos_diff_summarize.c

(edit_baton, create_item_baton, delete_entry, add_directory,

open_directory, close_directory, add_file, open_file, apply_textdelta,

close_file, change_prop): Remove.

(summarize_baton_t, send_summary, props_changed, cb_dir_deleted,

cb_file_deleted, cb_dir_added, cb_dir_opened, cb_dir_closed,

cb_file_added, cb_file_opened, cb_file_changed, cb_dir_props_changed):

New.

(svn_client__get_diff_summarize_editor): Remove.

(svn_client__get_diff_summarize_callbacks): New.

  1. … 4 more files in changeset.
Tweak doc strings of 'editor' functions to mention the 'svn_delta_editor_t'

type explicitly, so I can more quickly jump to the API documentation.

* subversion/libsvn_client/repos_diff.c,

* subversion/libsvn_client/repos_diff_summarize.c,

* subversion/libsvn_wc/ambient_depth_filter_editor.c,

* subversion/libsvn_wc/diff_editor.c,

* subversion/libsvn_wc/status.c

(All editor functions): Tweak doc string.

  1. … 4 more files in changeset.
Just padding my stats.

(Actually, doing my regular trailing whitespace removal, similar to r875968.)

* everywhere:

for extsn in c h cpp java py pl rb; do

sed -i -e 's/[ \t]*$//' `find . -name "*.$extsn" | xargs grep '[ \t]$' -l`

done

  1. … 166 more files in changeset.
* subversion/libsvn_client/repos_diff_summarize.c

(diff_deleted_dir): Allocate SUM, which is only needed during the current

iteration, in the iterpool, rather than the function-global pool.

* subversion/libsvn_client/repos_diff_summarize.c

(ensure_summarize): Fix a typo.

For diff --summarize, fix issue #2333 "svn diff URL1 URL2 != svn diff

URL2 URL1". Similar to r983720, which fixed the normal diff command.

TODO: Respect the --depth option.

* subversion/libsvn_client/repos_diff_summarize.c:

(edit_baton): Add boolean flag walk_deleted_repos_dirs. Add a

cancel_func and cancel_baton for the walk.

(diff_deleted_dir): New function.

(delete_entry): Use diff_deleted_dir() to walk a dir.

(svn_client__get_diff_summarize_editor): Fill in the new baton fields.

* subversion/tests/cmdline/diff_tests.py:

(basic_diff_summarize): Expect output for "deleted" trees.

  1. … 1 more file in changeset.
* subversion/libsvn_client/repos_diff_summarize.c

(svn_client__get_diff_summarize_editor): Rename 'item_baton' to

'summarize_baton' to match the prototype and to not match a data type

of the same name.

Eliminate 'AM' in 'svn diff --summarize' output, for items added with

properties. Print 'A ' instead, which is consistent with 'svn status'.

The bug existed since 1.6 (or mayber earlier) over ra_file and ra_svn

only. Dunno why ra_dav wasn't affected.

* subversion/libsvn_client/repos_diff_summarize.c:

(change_prop): Set prop_changed only if not added.

* subversion/tests/cmdline/diff_tests.py:

(basic_diff_summarize): Tweak expectations to eliminate prop-

mod for added items.

(test_list): Remove conditional Skip() for basic_diff_summarize.

  1. … 1 more file in changeset.
Test out my new and fancy ASF commit priviledges by changing the copyright

wording in our license headers to reflect ownership by the ASF.

* NOTICE:

Change terminology to ASF, and update a link.

* subversion/libsvn_subr/opt.c

(svn_opt__print_version_info): Note that the product as a whole is

copyrighted by the ASF, and update the project website.

* everywhere:

Change license text to reflect ASF ownership.

  1. … 891 more files in changeset.
Relicense Subversion under the Apache License, Version 2.0.

* NOTICE: New.

* LICENSE: New.

* COPYING,

subversion/LICENSE: Remove.

* subversion/libsvn_subr/opt.c

(svn_opt__print_version_info): Note that the product as a whole is

copyrighted by the SVN Corp, and that it contains contributions from

many people, as referenced in NOTICE.

* subversion/bindings/swig/python/LICENSE_FOR_PYTHON_BINDINGS:

Relicense the SVN parts under Apache 2.0.

* everywhere:

Change copyright notices in file headers to reflect the Apache 2.0 license.

  1. … 882 more files in changeset.
Directly return some errors, removing superfluous invocations of SVN_ERR().

This only handles libsvn_client; the other libraries could be similarly

audited.

I tried not to be too agressive when doing this. There's a balance between

maintainability and efficiency: there are probably other places where we can

directly return, but tracking those down is tricky, and can introduce subtle

bugs for future maintainers.

* subversion/libsvn_client/relocate.c,

subversion/libsvn_client/delete.c,

subversion/libsvn_client/externals.c,

subversion/libsvn_client/repos_diff.c,

subversion/libsvn_client/export.c,

subversion/libsvn_client/info.c,

subversion/libsvn_client/merge.c,

subversion/libsvn_client/prop_commands.c,

subversion/libsvn_client/ra.c,

subversion/libsvn_client/revert.c,

subversion/libsvn_client/locking_commands.c,

subversion/libsvn_client/cat.c,

subversion/libsvn_client/diff.c,

subversion/libsvn_client/copy.c,

subversion/libsvn_client/mergeinfo.c,

subversion/libsvn_client/repos_diff_summarize.c,

subversion/libsvn_client/changelist.c,

subversion/libsvn_client/update.c,

subversion/libsvn_client/resolved.c,

subversion/libsvn_client/commit_util.c,

subversion/libsvn_client/add.c,

subversion/libsvn_client/commit.c:

Directly return errors from some called functions.

  1. … 21 more files in changeset.
Channeling Erik Hülsmann, remove all trailing whitespace within our source

tree:

for extsn in c h cpp java py pl rb; do

sed -i -e 's/[ \t]*$//' `find . -name "*.$extsn" | xargs grep '[ \t]$' -l`

done

Inspired by: ehu

  1. … 449 more files in changeset.
Fix issue #2765: 'diff --summarize file' displays erroneous output.

* subversion/include/svn_client.h

(svn_client_diff_summarize_t): Explain that the path field will be an empty

string if the target of the diff is a file.

* subversion/libsvn_client/client.h

(svn_client__get_diff_summarize_editor): Document the target parameter, and

change the rest of the docstring to follow our conventions for non-public

header files.

* subversion/libsvn_client/diff.c

(diff_summarize_repos_repos): Call svn_client__get_diff_summarize_editor

with the target name as the first argument.

* subversion/libsvn_client/repos_diff_summarize.c

(edit_baton): New field 'target'.

(create_item_baton): If the target is a file, set b->path to "" instead of

the file name.

(svn_client__get_diff_summarize_editor): Stash the target parameter in the

edit baton.

* subversion/svn/diff-cmd.c

(summarize_func): Remove FIXME comment.

* subversion/tests/cmdline/diff_tests.py

(test_list): Remove XFail from basic_diff_summarize.

  1. … 5 more files in changeset.
Remove extra ';' in r25068 and some older examples of the same.

* subversion/libsvn_client/repos_diff_summarize.c (open_root):

* subversion/libsvn_fs_util/mergeinfo-sqlite-index.c (get_mergeinfo_for_path):

* subversion/libsvn_ra_dav/fetch.c (getlocks_end_element):

* subversion/mod_dav_svn/reports/replay.c (dav_svn__replay_report):

* subversion/svnadmin/main.c (subcommand_create):

Remove spurious ';'

  1. … 4 more files in changeset.
Fix several files with svn:eol-style missing.

* subversion/libsvn_subr/constructors.c,

subversion/libsvn_subr/user.c,

subversion/libsvn_subr/atomic.c,

subversion/libsvn_subr/compat.c,

subversion/libsvn_subr/dso.c,

subversion/libsvn_client/util.c,

subversion/libsvn_client/compat_providers.c,

subversion/libsvn_client/repos_diff_summarize.c,

subversion/libsvn_ra_serf/merge.c,

subversion/libsvn_ra_serf/serf.c,

subversion/libsvn_ra_serf/xml.c,

subversion/libsvn_ra_serf/propfind_buckets.c,

subversion/libsvn_ra_serf/locks.c,

subversion/libsvn_ra_serf/getlocks.c,

subversion/libsvn_ra_serf/util.c,

subversion/libsvn_ra_serf/getdate.c,

subversion/libsvn_ra_serf/blame.c,

subversion/libsvn_ra_serf/log.c,

subversion/libsvn_ra_serf/update.c,

subversion/libsvn_ra_serf/property.c,

subversion/libsvn_ra_serf/commit.c,

subversion/libsvn_ra_serf/getlocations.c,

subversion/libsvn_ra_serf/options.c,

subversion/libsvn_ra_serf/replay.c,

subversion/mod_dav_svn/mirror.c,

subversion/mod_dav_svn/reports/replay.c,

subversion/tests/libsvn_subr/error-test.c,

subversion/libsvn_ra_svn/streams.c,

subversion/libsvn_ra_svn/sasl_auth.c,

subversion/libsvn_ra_svn/simple_auth.c,

subversion/libsvn_delta/debug_editor.c,

subversion/libsvn_ra_dav/replay.c,

subversion/svnserve/sasl_auth.c,

tools/server-side/svnauthz-validate.c,

contrib/server-side/mod_dontdothat/mod_dontdothat.c:

Set the svn:eol-style=native.

  1. … 34 more files in changeset.
In diff --summarize, don't show file with both text and prop modifications

as having only property modifications.

Suggested by: Stefan Küng <tortoisesvn@gmail.com>

Martin Hauner <martin.hauner@gmx.net>

* subversion/libsvn_client/repos_diff_summarize.c

(ensure_summarize): Drop the sum_kind parameter. Initialize the kind to

normal.

(add_directory, add_file, apply_textdelta, change_prop): Initialize

the summary kind if appropriate.

Remove apparent support for "copy from" info in the "diff summarize" feature,

because the diff mechanism does not in fact supply this information, and

document the latter.

* subversion/include/svn_ra.h

(svn_ra_do_diff2): Mention that it does not supply "copy from" info.

* subversion/include/svn_client.h

(svn_client_diff_summarize_t): Remove copyfrom_path and copyfrom_rev fields.

* subversion/libsvn_client/repos_diff_summarize.c

(ensure_summarize, delete_entry, add_directory): Don't set "copyfrom" fields.

* subversion/svn/diff-cmd.c

(summarize_func): Remove printing of a "+" flag for copied items.

  1. … 3 more files in changeset.
Reformat the code to use a consistent no-space-before-param-list-paren style.

See here for the vote that decided this:

http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=111877

From: "Peter N. Lundblad" <peter@famlundblad.se>

To: "Peter N. Lundblad" <peter@famlundblad.se>

cc: dev@subversion.tigris.org

Subject: Results of: [VOTE] New space-before-parens style

Date: Wed, 8 Feb 2006 12:00:35 +0100 (CET)

Message-ID: <Pine.LNX.4.55.0602080918350.10805@localhost.localdomain>

I took the opportunity to make spacing among all parens in SVN_ERR

macro calls consistent. But I did not address consistency of casts,

nor whether a function name should always appear below its return type

in declarations and definitions, nor whether there should be a space

before/after the "*" when declaring pointer return types.

* www/hacking.html

(coding-style): Document that we are no-space-before-paren now.

* everywhere: Reformat.

  1. … 365 more files in changeset.
* subversion/libsvn_client/repos_diff_summarize.c

(create_item_baton, ensure_summarize): Add 'static' qualifier,

unexporting these private functions and quieting two warnings.

Patch by: Malcolm Rowe <malcolm-svn-dev@farside.org.uk>

Suggested by: me

Add new client API calls svn_client_diff_summarize and

svn_client_diff_summarize_peg.

A diff summary lists the changed items without calculating text deltas.

To achieve this the svn_ra__vtable_t do_diff function got a new boolean

parameter text_deltas that is finally passed to svn_repos_begin_report

to run the diff without creating text deltas.

Patch by: Martin Hauner <martin.hauner@gmx.net>

me

* subversion/include/svn_ra.h

(svn_ra_do_diff2): New method, similar to svn_ra_do_diff but with a

new text_deltas boolean parameter.

(svn_ra_do_diff): Deprecated.

* subversion/libsvn_ra/ra_loader.h

(svn_ra__vtable_t): Added text_deltas parameter to do_diff function.

* subversion/libsvn_ra/ra_loader.c

(svn_ra_do_diff2): New function.

(svn_ra_do_diff): Call svn_ra_do_diff2 with TRUE for the text_deltas

parameter.

* subversion/libsvn_ra/wrapper_template.h

(compat_do_diff): Pass TRUE for textdeltas parameter of do_diff.

* subversion/include/svn_client.h

(svn_client_diff_summarize, svn_client_diff_summarize_peg): New

functions.

(svn_client_diff_summarize_func_t): New callback type.

(svn_client_diff_summarize_t): New struct.

(svn_client_diff_summarize_kind_t): New enum type.

* subversion/libsvn_client/client.h

(svn_client__get_diff_summary_editor): New function.

* subversion/libsvn_client/repos_diff_summarize.c

New file, the implementation of the diff summary svn_delta_editor_t.

* subversion/libsvn_client/diff.c

(diff_parameters, diff_paths, diff_repos_repos): New helper structs

(check_paths, diff_prepare_repos_repos): New helper functions used to

remove most of the code duplication between diff and diff summarize.

(diff_summarize_repos_repos, do_diff_summarize, do_diff_summarize_peg,

svn_client_diff_summarize, svn_client_diff_summarize_peg):

New functions.

(diff_repos_repos): Replaced diff parameters with diff_parameters

structure. Removed code duplication with diff_summarize_repos_repos

by using the new helper functions.

(do_diff, do_diff_peg): Replaced diff parameters with diff_parameters

structure. Removed code duplication with do_diff_summarize and

do_diff_summarize_peg by using the new helper functions. Callers updated.

* subversion/libsvn_ra_dav/ra_dav.h

(svn_ra_dav__do_diff): Added text_deltas boolean parameter.

* subversion/libsvn_ra_dav/fetch.c

(svn_ra_dav__do_diff): Added text_deltas boolean parameter. Pass

new parameter to make_reporter.

* subversion/libsvn_ra_local/ra_plugin.c

(svn_ra_local__do_diff): Added text_deltas boolean parameter. Pass

new parameter to make_reporter.

* subversion/libsvn_ra_svn/client.c

(ra_svn_diff): Added text_deltas boolean parameter. Added text_deltas

to "diff" cmd.

* subversion/libsvn_ra_svn/protocol

(diff command): Added optional text-deltas parameter.

* subversion/svnserve/serve.c

(diff): Added parsing of the new text_deltas parameter. Pass new

parameter to accept_report.

  1. … 13 more files in changeset.