Daniel Näslund <daniel{AT}longitudo.com>

Patch Suggested
r40415, r40389, r40372, r39510, r39311, r38973, r38966, r38893, r38778, r38752, r38696, r38621, r38568 r40395

r40415 | dlr | 2009-11-06 15:30:29 -0600 (Fri, 06 Nov 2009)

Remove use of the deprecated svn_path_canonicalize() API.

* subversion/libsvn_client/repos_diff.c
 (make_dir_baton, make_file_baton, delete_entry): Replace
   svn_path_join() with svn_dirent_join(). An eb->target WC directory
   is the "base" parameter for each call.

Patch by: Daniel Näslund <daniel{AT}longitudo.com>

r40395 | dlr | 2009-11-05 18:24:22 -0600 (Thu, 05 Nov 2009)

* subversion/libsvn_client/deprecated.c
  (wrap_pre_blame3_receiver): Replace use of strlen(3) with sizeof.

Suggested by: Daniel Näslund <daniel{_AT_}longitudo.com>

r40389 | julianfoad | 2009-11-05 12:51:32 -0600 (Thu, 05 Nov 2009)

Avoid passing a variable as the format-string argument of printf functions,
to avoid compiler warnings about 'format not a string literal'.

* subversion/libsvn_client/diff.c
  (display_prop_diffs): Move the printf format specifiers out of the variable
    part of the string, into a literal format argument.

* subversion/libsvn_client/export.c
  (copy_one_versioned_file): Move the printf format specifiers out of the
    variable part of the string, into a literal format argument.

Patch by: Daniel Näslund <daniel{_AT_}longitudo.com>
          Julian Foad

r40372 | neels | 2009-11-04 05:34:51 -0600 (Wed, 04 Nov 2009)

* notes/sparse-directories.txt: Remove obsolete warning.
Patch by: Daniel Näslund <daniel@longitudo.com>
Tweaked by: me

r39510 | stsp | 2009-09-22 04:58:21 -0500 (Tue, 22 Sep 2009)

Use less adm_access in 'svn patch'.

* subversion/libsvn_client/patch.c
  (init_patch_target): Update docstring.
  (apply_one_patch): Remove ADM_ACCESS parameter. Use svn_wc_add4() and
   svn_wc_delete4(). Open an access baton internally for svn_wc_merge3().
  (apply_textdiffs): Remove ADM_ACCESS parameter.
  (svn_client_patch): Put a comment here explaining why we cannot remove
   adm_access usage from this function just yet. Track parameter removal.

Patch by: Daniel Näslund <daniel@longitudo.com>
(tweaked and log message by me)

r39311 | stsp | 2009-09-14 14:25:09 -0500 (Mon, 14 Sep 2009)

Fix issue 3459: "svn patch does not tolerate empty lines of context
in unidiff"

As a side effect, libsvn_client is shielded from the notion of leading
diff symbols on lines coming from modified and original texts.

* subversion/libsvn_diff/parse_diff.c
  (remove_leading_char_transformer): New. Line-transformer callback that
   shaves leading diff symbols.
  (svn_diff__parse_next_hunk): Tolerate empty lines of context in hunks.
   Set line-transformer callback on original_text and modified_text.

* subversion/tests/libsvn_diff/parse-diff-test.c
  (unidiff): While here, fix a faulty hunk header in the test diff.
  (test_parse_unidiff): Change assertions to compare lines without
   leading diff symbols.

* subversion/tests/cmdline/patch_tests.py
  (patch_chopped_leading_spaces): New. Same as patch_unidiff() but with
   leading empty spaces removed on empty lines.
  (test_list): Add patch_chopped_leading_spaces().

* subversion/libsvn_client/patch.c
  (match_hunk, copy_hunk_text): Compare whole lines since there are no
   leading diff symbols anymore.

Patch by: Daniel Näslund <daniel@longitudo.com>
(tweaked by me)

r38973 | stsp | 2009-08-27 15:35:11 -0500 (Thu, 27 Aug 2009)

Create a new callback for svn_stream_readline() that can perform
arbitrary transformations on a line before it is returned to the
caller of svn_stream_readline().

* subversion/include/svn_io.h
  (svn_io_line_transformer_cb_t): New callback type.
  (svn_stream_set_line_transformer_callback): Declare.
  (svn_stream_readline): Document the new line transformation feature.

* subversion/libsvn_subr/stream.c
  (svn_stream_t): Add new field 'transformer_cb'.
  (svn_stream_create): Initialize the new field.
  (svn_stream_set_line_transformer_callback): New function to set the
    line transformer callback on a stream.
  (line_transformer): New helper function for svn_stream_readline().
  (svn_stream_readline): Invoke the line transformation callback if defined.
    Also, add a comment explaining that the iterpool is on purpose not
    destroyed right after the loop has exited.

* subversion/tests/libsvn_subr/stream-tests.c
  (line_transformer): An implementation of svn_io_line_transformer_cb_t,
   reverses the supplied line.
  (test_stream_line_transformer): New test, testing line transformations
    on a stream.
  (test_stream_line_filter_and_transformer): New test, testing line
    transformations as well as line filtering on a stream.
  (test_funcs): Add the 2 new tests.

Patch by: Daniel Näslund <daniel@longitudo.com>

r38966 | rhuijben | 2009-08-27 08:02:24 -0500 (Thu, 27 Aug 2009)

Create a new function that fetches an adm_access for a path from

* subversion/include/private/svn_wc_private.h
   (svn_wc__adm_retrieve_from_context): New function.

* subversion/libsvn_wc/lock.c
   (svn_wc__adm_retrieve_from_context): New function that fetches an
      existing adm_access baton for a path from wc_ctx.

Patch by: Daniel Näslund <daniel{_AT_}longitudo.com>

r38893 | hwright | 2009-08-20 15:44:45 -0500 (Thu, 20 Aug 2009)

As part of getting rid of adm_access batons for WC-NG, replace some
calls to svn_wc_entry() with svn_wc__maybe_get_entry().

Patch by: Daniel Näslund <daniel@longitudo.com>
Tweaked by: me

* subversion/include/private/svn_wc_private.h
 (svn_wc__maybe_get_entry): Declare.

* subversion/libsvn_wc/entries.c
 (svn_wc__maybe_get_entry): New. Wrapper for
   svn_wc__get_entry_versioned() with error and return semantics like

* subversion/libsvn_client/patch.c
 (merge_file_changed, merge_file_added, merge_file_deleted,
  merge_dir_added, init_patch_target): Replaced svn_wc_entry() with
   svn_wc__maybe_get_entry(). Use absolute paths.

r38778 | hwright | 2009-08-17 10:58:36 -0500 (Mon, 17 Aug 2009)

Use svn_wc_cleanup3() in svn_client_cleanup().

Patch by: Daniel Näslund <daniel@longitudo.com>

* subversion/libsvn_client/update.c
  (svn_client_cleanup): Use svn_wc_cleanup3() with svn_wc_context_t
    parameter. Remove use of diff3_cmd.

r38752 | hwright | 2009-08-14 10:48:09 -0500 (Fri, 14 Aug 2009)

Use svn_wc_context_t and absolute paths in svn_wc_cleanup3(). Remove
diff3_cmd parameter.

Patch by: Daniel Näslund <daniel@longitudo.com>

* subversion/include/svn_wc.h
 (svn_wc_cleanup3): New.
 (svn_wc_cleanup2): Deprecate.

* subversion/libsvn_wc/deprecated.c
 (svn_wc_cleanup2): Reimplement as a wrapper.

* subversion/libsvn_wc/log.c
 (svn_wc_cleanup3): New. Use absolute paths. No diff3_cmd. Add
   svn_wc_context_t parameter
 (svn_wc_cleanup2): Remove.

r38696 | julianfoad | 2009-08-12 11:27:53 -0500 (Wed, 12 Aug 2009)

Fix issue #3342: Summary of conflicts printed at end of up/sw/merge.
Print the summary after the whole operation, rather than after each target.

Patch by: Daniel Näslund <daniel{_AT_}longitudo.com>

* subversion/svn/merge-cmd.c
  (svn_cl__merge): Call svn_cl__print_conflict_stats.

* subversion/svn/cl.h
  (svn_cl__print_conflict_stats): Declare.

* subversion/svn/update-cmd.c
  (svn_cl__update): Call svn_cl__print_conflict_stats.

* subversion/svn/switch-cmd.c
  (svn_cl__switch): Call svn_cl__print_conflict_stats.

* subversion/svn_notify.c
  (svn_cl__print_conflict_stats): Changed name from print_conflict_stats.
  (notify): Remove references to print_conflict_stats. Do not clear
    counters for conflicts.

* subversion/tests/cmdline/basic_tests.py
  (basic_update): Changed tests involving skipping to include summary.

r38621 | stsp | 2009-08-07 12:01:01 -0500 (Fri, 07 Aug 2009)

Follow-up to r38568: Fix two svnlook tests which were marked XFAIL.

* subversion/tests/cmdline/svnlook_tests.py
  (test_print_property_diffs, diff_ignore_eolstyle): Remove XFAIL.

* subversion/svnlook/main.c
  (maybe_append_eol): New helper function for display_prop_diffs().
  (display_prop_diffs): Use libsvn_diff for diffing property values.

Patch by: Daniel Näslund <daniel@longitudo.com>

r38568 | stsp | 2009-08-05 09:03:44 -0500 (Wed, 05 Aug 2009)

Partly fix issue 1493: Property diffs/merge should use libsvn_diff.

This commit makes 'svn diff' display property diffs generated by libsvn_diff.
It does not implement merging of property values via libsvn_diff, however.

Two tests are marked XFAIL by this commit, they will be fixed soon.

Patch by: Daniel Näslund <daniel@longitudo.com>

* subversion/libsvn_diff/diff_memory.c
  (output_unified_flush_hunk): New parameter for choosing hunk delimiter.
  (output_unified_diff_modified): Track above parameter addition.
  (svn_diff_mem_string_output_unified2): Rev this function, adding
   parameters specifying whether a diff header should be generated,
   and for choosing the hunk delimiter. Pass the latter parameter down
   to output_unified_flush_hunk().
  (svn_diff_mem_string_output_unified): Re-implement as a wrapper around
   the new revision.

* subversion/include/svn_diff.h
  (svn_diff_mem_string_output_unified2): Declare.

* subversion/libsvn_client/diff.c
  (maybe_append_eol): New helper function for display_prop_diffs().
  (display_prop_diffs): Use libsvn_diff for diffing property values.

* subversion/tests/cmdline/diff_tests.py,
  (diff_only_property_change, diff_prop_change_local_edit,
   diff_prop_on_named_dir, diff_property_changes_to_base,
   diff_prop_change_local_propmod, diff_repos_wc_add_with_props,
   diff_with_depth, diff_in_depthy_wc, merge_in_new_file_and_diff,
   diff_symlink_to_dir): Update expected output to new property diff format.

* subversion/tests/cmdline/svnlook_tests.py
   (test_print_property_diffs, diff_ignore_eolstyle): Mark XFAIL until
    new-style prop diffs are implemented in svnlook.