Daniel Näslund <dannas@elego.de> (dannas)

Patch Review Suggested
r942605, r942591, r942162, r940982, r940651, r940600, r940162, r940159, r940118, r940117, r940113, r940111, r940019, r938595, r938546, r938246, r937824, r937520, r937475, r937468, r935319, r935314, r935177, r934592, r934588, r934569, r933864, r933863, r933405, r933196, r933192, r932577, r932571, r931989, r931980, r930662, r930648, r930184, r929442, r929288, r929279, r922387, r922176, r920118, r919999, r918521, r917049, r907089, r907043, r906588, r905750, r904280, r904186, r903181, r902116, r902093, r892903, r887867, r883643, r880566, r880565, r880543, r880519, r880515, r880489, r880463, r880446, r879584, r879385, r879047, r879040, r878967, r878852, r878826, r878770, r878695, r878642 r933767 r880469

r942605 | dannas | 2010-05-09 15:14:09 -0500 (Sun, 09 May 2010)

Replace some uses of entry->kind.

* subversion/libsvn_wc/status.c
  (assemble_status.c): Use information fetched with
    svn_wc__db_read_info() for detecting what kind a path has in the db.

r942591 | dannas | 2010-05-09 14:35:28 -0500 (Sun, 09 May 2010)

First step of removing the usage of the entry field in svn_wc_status3_t
for detecting if a path is versioned. No semantic changes.

We still have a number of usages inside libsvn_wc of status->entry.

* subversion/include/svn_wc.h
  (svn_wc_status3_t): Introduce new field 'versioned'.

* subversion/libsvn_wc/status.c
  (assemble_status): Initialize status->versioned.

* subversion/svn/status-cmd.c
  (print_status): Replace usage of status->entry with status->versioned.

* subversion/libsvn_client/delete.c
  (find_undeletables): Replace usage of status->entry with

r942162 | dannas | 2010-05-07 13:12:53 -0500 (Fri, 07 May 2010)

Change doc comment referring to traversal_info to talk about external_func 
instead. The status code has replaced the use of traversal_info with an
svn_wc_external_update_t callback.

* subversion/libsvn_wc/status.c
  (get_dir_status): See above.

r940982 | dannas | 2010-05-04 12:41:24 -0500 (Tue, 04 May 2010)

Fix wrongly choosen pools.

* subversion/libsvn_wc/util.c
  (svn_wc__status2_from_3): Use result_pool for the things that should 
    be returned and scratch_pool for the rest. Plain and simple.

Suggested by: gstein

r940651 | dannas | 2010-05-03 17:01:53 -0500 (Mon, 03 May 2010)

Remove field 'tree_conflict' from svn_wc_status3_t and replace the uses 
of it with status->conflicted.

* subversion/include/svn_wc.h
  (svn_wc_status3_t): Remove field 'tree_conflict'.

* subversion/libsvn_wc/util.c
  (svn_wc__status2_from_3): Initialize the tree_conflict field for 

* subversion/libsvn_wc/status.c
  (assemble_status): Remove initializations for status->tree_conflict.
   svn_wc__is_sendable_status): Replace status->tree_conflict with 
    status->conflicted. Safe to do since we're checking unversioned items
    to be returned and there can't be any other kind of conflict on an
    unversioned path.
  (svn_wc_dup_status3): Don't duplicate status->tree_conflict

r940600 | dannas | 2010-05-03 15:21:56 -0500 (Mon, 03 May 2010)

Add comment to describe why we only check for tree conflicts when setting
status->conflicted for unversioned paths.

It was the only scenario I could come up with and the only one, caught by the

* subversion/libsvn_wc/status.c
  (assemble_status): See above.

r940162 | dannas | 2010-05-02 01:05:30 -0500 (Sun, 02 May 2010)

As part of WC-NG, use a node func for fetching a changelist instead of
reading from the entry field.

* subversion/svn/status-cmd.c
  (print_status): Use svn_wc__node_get_changelist() instead of checking 
    the 'entry' field of svn_wc_status3_t.

r940159 | dannas | 2010-05-02 00:47:50 -0500 (Sun, 02 May 2010)

Be less specific about conflict types that svn_wc_status3_t can detect.
We will probably have more conflict tyepds in the future.

Bert said on IRC: 
1.7 will most likely have 4 or 5 conflict types. I think we need
obstructions to allow updates to continue behind all conflicts, and maybe
somebody gets to marking patch conflicts. 

* subversion/include/svn_wc.h
  (svn_wc_status3_t): Change doc comment for field 'conflicted'.

Suggested by: rhuijben

r940118 | dannas | 2010-05-01 17:20:27 -0500 (Sat, 01 May 2010)

Follow-up to r940111. Add doc comment to the new 'conflicted' field.

* subversion/include/svn_wc.h
  (svn_wc_status3_t): See above.

r940117 | dannas | 2010-05-01 17:09:51 -0500 (Sat, 01 May 2010)

Follow-up to r940111. Fix OUT parameters not beeing set by default.

* subversion/libsvn_wc/node.c
  (svn_wc__node_check_conflicts): Initialize all OUT parameters to FALSE.
    Constify cd.

* subversion/libsvn_wc/node.c
  (...): Update callers. They no longer need to do the initialization.

Suggested by: gstein

r940113 | dannas | 2010-05-01 16:25:40 -0500 (Sat, 01 May 2010)

* subversion/include/svn_wc.h
  (svn_wc_conflicted_p3): Remove adm_access from doc comment, since
    it's not a parameter.

r940111 | dannas | 2010-05-01 16:06:36 -0500 (Sat, 01 May 2010)

A first step towards avoiding expensive computations involving conflicts
in the status code.

The idea is to have one single flag indicating if a path has any
conflicts. If the API users wants more information, they can get it
themselves. Two pros: The code will (hopefully) be faster and we get a
more unified grip on the conflict information. Earlier it has been
spread across status->text_status, status->prop_status and

* subversion/svn/cl.h
  (svn_cl__print_status_xml): Add ctx parameter.

* subversion/svn/status.c
  (print_status): Add ctx parameter. Check status->conflicted and use wc
    funcs for fetching further information.
   svn_cl__print_status): Do an explicit check for tree conflicts
    instead of relying on fields in svn_wc_status3_t. 

* subversion/svn/status-cmd.c
  (print_status_normal_or_xml): Update callers to pass a ctx parameter.

* subversion/include/svn_wc.h
  (svn_wc_status3_t): Add conflicted field.

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

* subversion/libsvn_wc/status.c
  (assemble_status): Initialize status->conflicted.

* subversion/libsvn_wc/node.c
  (svn_wc__node_check_conflicts): New.

r940019 | dannas | 2010-05-01 08:57:20 -0500 (Sat, 01 May 2010)

Use local_abspath instead of path in doc comment to match the name in the

* subversion/include/svn_wc.h
  (svn_wc_conflicted_p3): See above.

r938595 | dannas | 2010-04-27 13:32:04 -0500 (Tue, 27 Apr 2010)

Copy-paste a FIXME comment from r937512 that explains how we're dealing
with revisions for added but not yet committed nodes.

* subversion/svn/status.c
  (print_status): See above.

r938546 | dannas | 2010-04-27 11:29:24 -0500 (Tue, 27 Apr 2010)

* notes/editor-v2.txt
  (...): Remove references to the svnpatch editor since it's removed 
    from the code base.

r938246 | dannas | 2010-04-26 16:21:15 -0500 (Mon, 26 Apr 2010)

Implement converter function for converting svn_wc_status3_t to

* subversion/include/private/svn_wc_private.h
  (svn_wc__status2_from_3): Return svn_error_t * instead of
    svn_wc_status2_t *. Return the new status in an out parameter
    instead. We need to be able to return errors from the entry
    fetching function. Add wc_ctx and local_abspath parameters to be
    used when fetching the entry.

* subversion/libsvn_wc/deprecated.c
  (status_4_wrapper_baton): Add wc_ctx field to be used when calling
  (status4_wrapper_func): Track parameter and return value changes of
  (svn_wc_get_status_editor4): Initialize wc_ctx field of the
  (svn_wc_status2): Track parameter and return value changes of

* subversion/libsvn_wc/util.c
  (svn_wc__status2_from_3): Initialize the svn_wc_status2_t struct with
    values from svn_wc_status3_t.

* subversion/libsvn_client/deprecated.c
  (status4_wrapper_baton): Add wc_ctx field.
  (status4_wrapper_func): Track parameter and return value changes of
  (svn_client_status4): Initialize wc_ctx field of wrapper_baton.

r937824 | dannas | 2010-04-25 12:05:56 -0500 (Sun, 25 Apr 2010)

* subversion/libsvn_wc/util.c
  (svn_wc__status2_from_3): Fix typo. The parameter scratch_pool should 
    be result_pool.

r937520 | dannas | 2010-04-23 16:05:50 -0500 (Fri, 23 Apr 2010)

As part of WC-NG replace calls that fetches lock information from
the entry field in svn_wc_status3_t.

We could have just used a boolean locked field and let the callbacks
fetch the needed extra fields, but since the information is cheap to
fetch we can just as well get it at once.

* subversion/include/svn_wc.h
  (svn_wc_status3_t): Add lock_token, lock_owner, lock_comment and
    lock_creation_date fields.

* subversion/libsvn_wc/status.c
  (assemble_status): Set the new lock fields in svn_wc_status3_t.
  (svn_wc_dup_status3): Copy the fields that uses strings.

* subversion/svn/status.c
   svn_cl__print_status_xml): Use the new svn_wc_status3_t fields
    instead of the entry ones.

r937475 | dannas | 2010-04-23 14:11:34 -0500 (Fri, 23 Apr 2010)

* subversion/libsvn_wc/util.c
  (svn_wc__status2_from_3): Add note about the need to do a proper 
    conversion instead of just a cast.

r937468 | dannas | 2010-04-23 13:58:01 -0500 (Fri, 23 Apr 2010)

As part of WC-NG, replace entry calls for revisions from
svn_wc_status3_t related code. While doing that, we define a strict
idea of what a revision in svn_wc_status3_t means. The revision returned
from libsvn_wc is:

  "The revision of the unmodified (BASE) node, or SVN_INVALID_REVNUM if
  any (structural) changes have been made to that node."

We have three compability concerns to address:
1) svn_wc_status3_t only gives us the revision information for BASE.
   svn_wc__node_get_working_rev_info() is used for returning the WORKING
   state as the entries code would have done it.

2) The entries code set the revision of newly added nodes to 0 but the
   db sets them to -1. Since too many tests needs to be changed and 'svn
   info' also uses 0, I'll change those values in a follow-up patch

3) Despite the attempt to mimic the semantics of the entries code, we
   have two changes in behaviour. An entry_rev field has been added to
   StateItem to allow the testsuite to handle those differences.

* subversion/tests/cmdline/copy_tests.py
  (repos_to_wc): Change revision to 0 since the node is added. Don't
    check against entries since the behavior differs.

* subversion/tests/cmdline/svntest/wc.py
  (tweak_for_entries_compare): Set wc_rev to entry_rev when the later
    exists. Clear entry_rev afterwards to avoid it interfering when
    doing the compare between the output from entries-dump and our
  (StateItem): Add new member entry_rev for tracking differences in
    behaviour between WC-1 code and WC-NG.

* subversion/tests/cmdline/merge_tests.py
  (merge_into_missing): Add revision to status output for missing dir.
    Previously, missing dirs did not have a revision, only files had.
    Don't check entries since the behavior differs.

* subversion/svn/status.c
  (print_status): Replace checks for revisions using entries with the
    direct fields in svn_wc_status3_t. Set the revision for added and
    replaced nodes to 0. WC-NG sets those revisions to -1, but changing
    all the involved tests is for a follow-up.

* subversion/include/svn_wc.h
  (svn_wc_status3_t): Add fields revision, changed_rev, changed_date and

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

* subversion/libsvn_wc/node.c
  (svn_wc__node__get_working_rev_info): New.

* subversion/libsvn_wc/status.c
  (assemble_status): Fill in the new fields with data from the wc db.
  (svn_wc_dup_status3): Copy the changed_author field.

* subversion/svn/status-cmd.c
  (status_baton): Add svn_client_ctx member. 
  (print_status): Fetch revision information about WORKING nodes with
    svn_wc__node_get_working_rev(). It's a temporary thing until we've
    decided what behaviour we prefer and the means for detecting what
    state the wc is in.
  (svn_cl__status): Set ctx member of status_baton.

r935319 | dannas | 2010-04-18 04:01:37 -0500 (Sun, 18 Apr 2010)

As part of WC-NG, remove some uses of svn_wc_entry_t.

* subversion/libsvn_client/export.c
  (copy_one_versioned_file): Use svn_wc__node_is_status_deleted() 
    instead of checking entry->schedule. Use svn_wc__node_get_url()
    instead of checking entry->url.

r935314 | dannas | 2010-04-18 03:23:35 -0500 (Sun, 18 Apr 2010)

As part of WC-NG, remove a usage of svn_wc_entry_t. 

* subversion/libsvn_client/delete.c
  (svn_client__can_delete): Use svn_wc__node_is_file_external() instead 
    of checking the entry.

r935177 | dannas | 2010-04-17 08:58:01 -0500 (Sat, 17 Apr 2010)

After the changes in r922176, versioned but not yet committed files were
not properly detected. Fixed now!

* subversion/svnversion/main.c
  (main): Check for invalid revision number for both files and dirs.

* subversion/tests/cmdline/svnversion_tests.py
  (svnversion_with_structural_changes): New.
  (tests_list): Add new test.

Review by: stsp

r934592 | dannas | 2010-04-15 15:57:52 -0500 (Thu, 15 Apr 2010)

* subversion/tests/cmdline/patch_tests.py
  (patch_with_ignore_whitespaces): Use make_patch_path() instead of mkstemp()
   to create a filename for the patch file.

r934588 | dannas | 2010-04-15 15:42:30 -0500 (Thu, 15 Apr 2010)

Follow-up to r934569. Add missing doc comments.

* subversion/include/svn_diff.h
  (svn_diff_parse_next_patch): Add missing doc comment for IGNORE_WHITESPACES

* subversion/include/svn_client.h
  (svn_client_patch): Add missing doc comment for IGNORE_WHITESPACES parameter.

* subversion/libsvn_client/patch.c
   apply_one_patch): Add missing doc comment for IGNORE_WHITESPACES parameter.

* subversion/libsvn_diff/parse-diff.c
  (parse_next_hunk): Add missing doc comment for IGNORE_WHITESPACES parameter. 

r934569 | dannas | 2010-04-15 14:48:28 -0500 (Thu, 15 Apr 2010)

Fix #3610 - 'svn patch' should be able to ignore whitespace changes.

Mail clients often mess with whitespaces in different ways:
* remove leading whitespaces at the beginning of a line
* convert tabs to spaces
* remove trailing whitespaces at the end of a line

With the --ignore-whitespaces, we allow hunks to be matched without 
taking whitespaces into account. The matching hunks will be applied
as-is without any attempt to guess what the correct whitespaces should

Since this matching is not as restrictive as the usual one, there's a
risk of erroneus behaviour, i.e. matching a patch with all leading
spaces removed makes it impossible to distinguish between a context line
and some other line, intended to be ignored. 

If people don't like the result of patching, they can edit the patch
to their liking and re-apply it (or ask the submitter to resubmit
the patch -- mangled patches are usually the submitter's fault).

* subversion/include/svn_diff.h
  (svn_diff_parse_next_patch): Add IGNORE_WHITESPACES parameter.

* subversion/include/svn_client.h
  (svn_client_patch): Add IGNORE_WHITESPACES parameter.

* subversion/libsvn_client/patch.c
  (apply_patches_baton_t): Add IGNORE_WHITESPACES field.
  (match_hunk): Add IGNORE_WHITESPACES parameter. if ignore_whitespaces
    is set, do a matching with all whitespaces removed.
   apply_one_patch): Add IGNORE_WHITESPACES parameter.
  (apply_patches): Pass IGNORE_WHITESPACES parameter from baton to
    svn_diff_parse_next_patch() and apply_one_patch().
  (svn_client_patch): Add IGNORE_WHITESPACES. Pass it on via baton to

* subversion/libsvn_diff/parse-diff.c
  (parse_next_hunk): Add IGNORE_WHITESPACES parameter. Treat lines not
    starting with '+' or '-' as context lines if the
    ignore_whitespaces parameter is set.
  (svn_diff_parse_next_patch): Add IGNORE_WHITESPACES parameter.

* subversion/tests/libsvn_diff/parse-diff-test.c
  (test_parse_unidiff): Update callers to use the IGNORE_WHITESPACES

* subversion/tests/libsvn_client/client-test.c
  (test_patch): Update callers to use the IGNORE_WHITESPACES parameter.

* subversion/tests/cmdline/patch_tests.py
  (patch_with_ignore_whitespaces): New.
  (test_list): Add new test.

* subversion/svn/cl.h
  (svn_cl__opt_state_t): Add IGNORE_WHITESPACES field.

* subversion/svn/main.c
  (svn_cl__longopt_t): Add IGNORE_WHITESPACES field.
  (svn_cl__cmd_table): Add --ignore-whitespaces option.
  (main): Handle --ignore-whitespaces option.

r933864 | dannas | 2010-04-14 02:02:43 -0500 (Wed, 14 Apr 2010)

* subversion/libsvn_client/patch.c
  (find_existing_children): Use svn_wc_status3_t as parameter instead 
    of svn_wc_status2_t.

r933863 | dannas | 2010-04-14 01:51:00 -0500 (Wed, 14 Apr 2010)

Sync svn-patch-improvements branch with trunk.

r933767 | stsp | 2010-04-13 14:45:17 -0500 (Tue, 13 Apr 2010)

On the svn-patch-improvements branch, revamp handling of deleted directories.

While not originally intended, this is almost a complete rewrite of the
logic handling directory deletions. Compared to the previous implementation:
 - It does not modify lists in place while iterating them.
 - It does not add empty directories which can be deleted as 'fake' patch
   targets, but deletes them directly, and skips targets which were deleted
   together with the parent directories.
 - It splits the overall task into more steps.

* subversion/libsvn_client/patch.c
  (patch_target_t): New field PARENT_DIR_DELETED, to trigger special
   processing of targets which are within deleted directories.
  (init_patch_target): Initialise PARENT_DIR_DELETED.
  (is_dir_empty): Rename to ...
  (check_dir_empty): ... this, and in addition to the list of deleted
   targets, accept a list of directories we know will be removed.
  (add_target_to_hash_keyed_by_parent_dir, sort_compare_path_component_count,
   condense_deleted_targets): Remove.
  (push_if_unique): New helper function, needed because we do not use
   a hash table anymore to ensure path uniqueness.
  (delete_empty_dirs): New function, which determines which directories will
   be empty after patching, deletes them, and marks any targets which are
   children of the deleted directories.
  (install_patched_target): Skip targets which had their parent dir removed
   from above them.
  (apply_patches): Call delete_empty_dirs() instead of the removed
   condense_deleted_targets(). Do not notify about targets which were
   deleted together with their parent directories.

* subversion/tests/cmdline/patch_tests.py
  (patch_remove_empty_dir): Rename to ...
  (patch_remove_empty_dirs): .. this, and adjust expected output because
   notification order has changed.
  (test_list): Track renamed function.

Review by: dannas

r933405 | dannas | 2010-04-12 15:54:33 -0500 (Mon, 12 Apr 2010)

Follow-up to r923571. Update one caller I missed in the previous

* subversion/libsvn_wc/deprecated.c
  (svn_wc_status2): Use svn_wc__status2_from_3().

Suggested by: gstein
Approved by: gstein

r933196 | dannas | 2010-04-12 06:32:58 -0500 (Mon, 12 Apr 2010)

Follow-up to r932571. Correct errors in doc comments.

Obvious fix.

* subversion/include/svn_wc.h
  (svn_wc_status3_t): Add missing @since tag.
  (svn_wc_dup_status2): Correct comment to point out that the function 
    should be the same as svn_wc_dup_status3().

Suggested by: gstein

r933192 | dannas | 2010-04-12 06:17:01 -0500 (Mon, 12 Apr 2010)

Follow-up to r932571. Since converting a svn_wc_status3_t struct to a
svn_wc_status2_t dito will be a pretty complex operation, we create a
function to handle it.

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

* subversion/libsvn_wc/util.c
  (svn_wc__status2_from_3): New.

* subversion/libsvn_wc/deprecated.c
  (status4_wrapper_func): Call the new func.

* subversion/libsvn_client/deprecated.c
  (status4_wrapper_func): Call the new func.

Suggested by: gstein
Approved by: julianfoad

r932577 | dannas | 2010-04-09 15:23:46 -0500 (Fri, 09 Apr 2010)

Remove the @since tags for fields in svn_wc_status3_t since the whole 
struct is new.

* subversion/include/svn_wc.h
  (svn_wc_status3_t): See above.

Approved by: gstein

r932571 | dannas | 2010-04-09 15:07:51 -0500 (Fri, 09 Apr 2010)

As part of replacing the entries field in svn_wc_status2_t for WC-NG, we
rev it to svn_wc_status3_t. No semantic changes, except for adjusting some
compat wrappers, else just revving.

As for now, the compat wrappers just casts to the previous type. When we
start doing changes, the conversions will be a lot more complicated.

* subversion/include/svn_wc.h
  (svn_wc_status3_t): New. An exact copy svn_wc_status2_t at the moment.
  (svn_wc_status2_t): Mark as deprecated.
  (svn_wc_dup_status3): New.
  (svn_wc_dup_status2): Mark as deprecated.
   svn_wc_status_func4_t): Replace svn_wc_status2_t parameter.

* subversion/include/private/svn_wc_private.h
  (svn_wc__is_sendable_status): Replace svn_wc_status2_t.

* subversion/libsvn_wc/status.c
  (edit_baton): Replace svn_wc_status2_t.
  (dir_baton): Update comment referring to status2_t.
   close_directory): Replace svn_wc_status2_t.
  (svn_wc_dup_status3): New.
  (svn_wc_dup_status2): Moved from here ..

* subversion/libsvn_wc/deprecated.c
  (svn_wc_dup_status2): .. to here.
  (status4_wrapper_func): Replace svn_wc_status2_t parameter and use
  (svn_wc_status2): Use svn_wc_status3() for fetching the status struct.

* subversion/libsvn_client/deprecated.c
  (status4_wrapper_func): Use the new status3_t type.

* subversion/libsvn_client/blame.c,
    Use the new svn_wc_status3_t and in some cases svn_wc_dup_status3().

Approved by: gstein

r931989 | dannas | 2010-04-08 11:16:54 -0500 (Thu, 08 Apr 2010)

Use svn_path_component_count() instead of my own logic for code reuse.

* subversion/libsvn_client/patch.c
  (sort_compare_nr_of_path_elements): Move ..
  (sort_compare_path_component_count): .. to here. The name change
    reflects that we count path components instead of as previous, 
    individual characters. Replace my logic with 
  (condense_deleted_targets): Update callers.

Suggested by: stsp

r931980 | dannas | 2010-04-08 10:52:53 -0500 (Thu, 08 Apr 2010)

Sync svn-patch-improvements branch with trunk.

r930662 | dannas | 2010-04-04 05:55:25 -0500 (Sun, 04 Apr 2010)

Make 'svn patch' able to remove dirs beeing empty after patching, taking
into account both versioned and unversioned files and dirs.

* subversion/tests/cmdline/patch_tests.py
  (patch_remove_empty_dir): New.
  (test_list): Add new test.

* subversion/libsvn_client/patch.c
  (status_baton): New.
  (find_existing_children, is_dir_empty,
    add_target_to_hash_keyed_by_parent_dir, is_dir_empty,
    condense_deleted_targets): New functions
  (apply_patches): Call condense_deleted_targets(). Check if a
    target has a patch associated with it before calling
    svn_diff__close_patch() since we're creating targets to delete dirs
    and those have no associated patch.

Review by: julianf, stsp, neels

r930648 | dannas | 2010-04-04 04:09:34 -0500 (Sun, 04 Apr 2010)

Sync svn-patch-improvements branch with trunk.

r930184 | dannas | 2010-04-02 03:49:16 -0500 (Fri, 02 Apr 2010)

Follow-up to r922176. Fix that tree changes were not considered when
determining if the wc has modifications.

* subversion/libsvn_wc/revision_status.c
  (analyze_status): Determine from status if a path has been added or
    deleted. Do some optimizations to avoid having to do a text
    comparison for determining if a wc has modifications.

Suggested by: gstein
Approved by: gstein

r929442 | dannas | 2010-03-31 04:25:41 -0500 (Wed, 31 Mar 2010)

Remove obsolute doc comment about 'svn patch' using diff callbacks. The
callbacks were removed in r879144 when we shaved off the SVNPATCH blocks
and only kept the unidiff part.

* subversion/include/svn_wc.h
  (svn_wc_diff_callbacks4_t): See above.

Approved by: julianfoad

r929288 | dannas | 2010-03-30 16:11:15 -0500 (Tue, 30 Mar 2010)

Fix bug with 'svn patch' not recognizing diff headers when parsing
patches without the 'Index' line and the '======' line. The old code
just assumed that the first line after the hunk would not be a '-'. But
it can be so we must handle it.

* subversion/libsvn_diff/parse-diff.c
  (parse_next_hunk): Check that we have not read all the lines, that the
    hunk header said, the hunk should consist of. We need to check for
    both nr of modified and original lines since we can do a reverse
    parsing. That means treating '+' as '-' and the other way around.

* subversion/tests/cmdline/patch_tests.py
  (patch_no_index_line): New.
  (test_list): Add the new test.

r929279 | dannas | 2010-03-30 15:57:53 -0500 (Tue, 30 Mar 2010)

Sync svn-patch-improvements branch with trunk.

r922387 | dannas | 2010-03-12 12:45:35 -0600 (Fri, 12 Mar 2010)

Follow up to r920118.

* subversion/libsvn_client/cleanup.c
  (svn_client_upgrade): Use svn__apr_hash_index_{key,val} to avoid
    casts. Use a more descriptive variable name for the path holding the
    svn:externals declaration.
Suggested by: philipm
Approved by: philipm

r922176 | dannas | 2010-03-12 02:21:45 -0600 (Fri, 12 Mar 2010)

As part of WC-NG, remove some uses of svn_wc_entry_t.

* subversion/include/svn_wc.h
  (svn_wc_revision_status2): Add note about us returning
* subversion/libsvn_wc/revision_status.c
   (status_baton): Rename this...
   (walk_baton): .. to this.
   (analyze_status): Change this to implement svn_wc__node_func_t and use
     WC-NG funcs instead of information in svn_wc_entry_t.
   (svn_wc_revision_status2): Use svn_wc__node_walk_children() instead of
     svn_wc_walk_status() to spare us from the overhead of invoking an
* subversion/svnversion/main.c
  (main): Determine if a path is unversioned by checking for

Approved by: gstein

r920118 | dannas | 2010-03-07 15:21:58 -0600 (Sun, 07 Mar 2010)

Fix issue #3483 - extend svn_client_upgrade() to include externals. I've
done the externals upgrading after wc upgrade is finished. In that way
no errors in the externals will affect the wc.

* subversion/libsvn_client/cleanup.c
  (svn_client_upgrade): Get all svn:externals. We need the target_dir so
    we have to parse the description. For each target_dir we call
    svn_wc_upgrade() which will recursively upgrade the external.

* subversion/tests/cmdline/upgrade_tests.py
  (upgrade_with_externals): New. Checks the format of a 1.6 wc upgraded
    to wc-ng.
  (test_list): Add upgrade with_externals.

* subversion/tests/cmdline/upgrade_tests_data/upgrade_with_extenals.tar.bz2
  (...): New. An 1.6 wc with the same structure as those used in

Approved by: rhuijben

r919999 | dannas | 2010-03-07 08:12:20 -0600 (Sun, 07 Mar 2010)

Sync svn-patch-improvements branch with trunk.

r918521 | dannas | 2010-03-03 09:38:17 -0600 (Wed, 03 Mar 2010)

Create branch for svn patch improvements.

r917049 | dannas | 2010-02-27 15:37:44 -0600 (Sat, 27 Feb 2010)

* COMMITTERS: Add myself as partial committer. (svn patch improvements 

r907089 | stsp | 2010-02-05 15:01:27 -0600 (Fri, 05 Feb 2010)

* subversion/tests/cmdline/patch_tests.py
  (patch_with_fuzz): For determining fuzz we have an algorithm that
   should only check for trailing and leading context. Make this test
   verify that this property of the algorithm holds by adding context
   in the middle of one of the hunks. Also fix an indentation error.

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

r907043 | cmpilato | 2010-02-05 12:41:47 -0600 (Fri, 05 Feb 2010)

On the '1.6.x-issue3390' branch, feign a backport of the issue 3390
fix by applying Daniel Näslund's backport patch, and then using 'svn
merge --record-only' to claim that this was a merge of r877016 and
r902093 from trunk.

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

r906588 | stsp | 2010-02-04 12:06:55 -0600 (Thu, 04 Feb 2010)

Fix bug with 'svn patch' not recognizing hunks with missing newline at
end of patch file.

* subversion/libsvn_diff/parse-diff.c
  (parse_next_hunk): Don't stop reading lines until we've reached eof
    and the line read is empty.

* subversion/tests/cmdline/patch_tests.py
  (patch_with_fuzz): Make this test check for regression by removing
   the newline from the end of the patch used in this test.

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

r905750 | stsp | 2010-02-02 13:12:45 -0600 (Tue, 02 Feb 2010)

Add notifications for hunks applied with fuzz.

* subversion/tests/cmdline/patch_tests.py
  (patch_with_fuzz): Add a line to the target to cause one hunk to apply
    with offset and fuzz. With that we have all kinds of currently known
    patch notifications tested.

* subversion/svn/notify.c
  (notify): Print a message for three different cases; fuzz, offset and

* subversion/include/svn_wc.h
  (svn_wc_notify_t): Add a new field hunk_fuzz.

* subversion/libsvn_client/patch.c
  (maybe_send_patch_notifications): Set the value of hunk_fuzz.

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

r904280 | stsp | 2010-01-28 16:20:32 -0600 (Thu, 28 Jan 2010)

Fix #3460 - svn patch is not fuzzy when applying unidiffs.

* subversion/include/private/svn_diff_private.h
  (svn_hunk_t): Add fields leading_context and trailing_context. They are
   used for determining if there is enough context to apply a patch
   with fuzz.

* subversion/libsvn_client/patch.c
  (hunk_info_t): Add field FUZZ.
  (match_hunk): Add new parameter FUZZ, specifying how many lines
   at the beginning and end of the hunk will always match.
   Ignore FUZZ if there isn't enough context to do fuzzy matching.
  (scan_for_match): Add new parameter FUZZ. Call match_hunk() with FUZZ.
  (get_hunk_info): Add new parameter FUZZ. Call scan_for_match() with
   FUZZ. Save FUZZ in HI for later use. Set HI->rejected to TRUE
   if no line can be found where the hunk applies.
  (copy_hunk_text): Remove. This interface cannot cope well enough
   with hunks applied with fuzz.
  (reject_hunk): Re-implement parts of copy_hunk_text() inline,
   copying the hunk's diff text to the target's reject stream.
  (apply_one_hunk): Rename to ...
  (apply_hunk): ... this, because it is the brother-in-law of reject_hunk().
   Re-implement parts of copy_hunk_text inline, copying hunk's modified
   text to the patched result. Except lines which matched with fuzz, because
   those must be copied verbatim from the target to retain the local changes
   which made fuzzy matching necessary.
  (apply_one_patch): Call get_hunk_info() repeatedly with increasing
   fuzz factor until either the hunk matches or the maximum fuzz
   factor is reached. Track renaming and removal of functions.

* subversion/libsvn_diff/parse-diff.c
  (parse_next_hunk): Count number of lines of context at start and end
   of hunk and save the information in hunk. Refactored some if
   statements for increased readability.

* subversion/tests/cmdline/patch_tests.py
  (patch_with_fuzz): New.
  (test_list): Add new test.

Patch by: Daniel Näslund <daniel{_AT_}longitudo.com>
Review by: julianfoad (older version)

r904186 | stsp | 2010-01-28 11:53:42 -0600 (Thu, 28 Jan 2010)

* subversion/libsvn_client/patch.c
  (maybe_send_patch_notification): Fix reporting of modified_length during
   hunk notifications.

* subversion/tests/cmdline/patch_tests.py
  (patch_offset): Adjust expected_output.

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

r903181 | stsp | 2010-01-26 05:35:56 -0600 (Tue, 26 Jan 2010)

Fix issue #3493 - svn patch skips missing dirs.
Also use wc-ng-style write locks as much as possible,
and add drops of coding-style improvements here and there.

* subversion/libsvn_client/patch.c
  (): Include client.h for svn_client__make_local_parents().
  (patch_target_t): New field PARENT_DIR_EXISTS.
  (resolve_target_path): Use WC APIs rather than svn_io to get
   information about nodes. Skip obstructed and ignored targets
   as well as unversioned targets. Replace use of entry_t with
   use of wc-ng node APIs. If the target's parent directory does
   not exist or is scheduled for deletion, set
   TARGET->PARENT_DIR_EXISTS to false instead of skipping the target.
   Also let this function determine TARGET->ADDED, rather than doing
   that near the end of the patching process.
 (maybe_send_patch_notification): Cope with target node-kinds of
  svn_node_unknown, which the wc-ng APIs can return.
 (apply_one_patch): Un-constify CTX parameter. Exit early if
  the target is skipped, so we can snip an indentation level
  from code below this check. Remove a useless comment.
  Don't set TARGET->ADDED anymore since that's now handled by
  resolve_target_path(). If the parent directory of the target
  does not exist, create it during normal runs. During dry-runs,
  just check if it could be created.
  Grab an adm_access lock in case we're deleting the target,
  since svn_wc_delete4() fails otherwise.
 (apply_patches_baton_t): New baton.
 (apply_textdiffs): Rename to  ...
 (apply_patches): ... this, and relocate all arguments passed to
  this function into the above-mentioned baton so we can call the
  function with a wc-ng-style write lock held.
 (svn_client_patch): Replace use of adm_access with wc-ng-style
  write locks.

* subversion/tests/cmdline/patch_tests.py
  (patch_add_new_dir): New. Tests for adding files with missing dirs,
   and the case where one of the dirs above the target is scheduled
   for deletion.

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

r902116 | stsp | 2010-01-22 09:27:13 -0600 (Fri, 22 Jan 2010)

Replace deprecated svn_wc_{crawl_revisions4(),get_update_editor3()}.
Remove a call to svn_wc_edited_externals().

* subversion/libsvn_client/update.c
  (svn_client__update_internal): Use the new get_update_editor4()
    and crawl_revisions5() with wc_ctx and external_func.
    Remove a call to svn_wc_edited_externals() since we already
    have the hashtables from our external_func.

Patch by: <daniel{_AT_}longitudo.com>

r902093 | stsp | 2010-01-22 08:23:45 -0600 (Fri, 22 Jan 2010)

Fix issue #3390, relative externals not updated during switch. As a side
effect - allow externals hash diff functionality to be used with abspaths.

* subversion/libsvn_client/switch.c
  (svn_client__switch_internal): Pass in an external_func to

* subversion/libsvn_client/externals.c
  (handle_externals_desc_change): Get the url for parent_dir with
    svn_wc__node_get_url(). Does not work for export where the
    parent_dir has no url. Then we resort to the old way of adding the
    parent_dir to the from_url.

* subversion/tests/cmdline/externals_tests.py
  (test_list): Remove XFail from switch_relative_external.

Patch by: Daniel Näslund <daniel{_AT_}longitudo.com>
Review by: stsp
           philip (older version)

r892903 | philip | 2009-12-21 11:48:06 -0600 (Mon, 21 Dec 2009)

Use recursive locking when deleting an external. No need to make a
distinction between files and dirs as the previous code did.

* subversion/libsvn_client/externals.c
  (handle_external_item_change): Remove the adm_access functions and use
    svn_wc_{acqurire,release}write_lock instead and svn_wc_locked2()

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

r887867 | philip | 2009-12-07 03:39:52 -0600 (Mon, 07 Dec 2009)

When updating to lose an external, the code should handle a locally missing
externals item, and it does. Add a test for this in an existing test case.

* subversion/tests/cmdline/externals_tests.py
  (update_lose_external): Remove one externals wc dir.

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

r883643 | stsp | 2009-11-24 04:18:54 -0600 (Tue, 24 Nov 2009)

* subversion/svn/main.c
  (svn_cl__cmd_table): In the svn:externals documentation of 'svn help
   propset', provide an example for using a peg revision, and also document
   that it is possible to put comments into externals definitions.

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

r880566 | julianfoad | 2009-11-12 17:37:51 -0600 (Thu, 12 Nov 2009)

Replace deprecated svn_path_join().

* subversion/svn/cl.h
  (svn_cl__path_join): New.

* subversion/svn/util.c
  (svn_cl__path_join): Wrap svn_path_join().

* subversion/svn/diff-cmd.c
  (svn_cl__diff, summarize_xml, summarize_regular): Replace svn_path_join()
    with svn_cl__path_join() since the resulting path is allowed to be both
    uri and dirent.

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

r880565 | stsp | 2009-11-12 15:51:55 -0600 (Thu, 12 Nov 2009)

* subversion/svn/conflict-callbacks.c                                           
  (svn_cl__conflict_handler): Add error message when trying to launch           
    an external merge tool for a property conflict.                             
Patch by: Daniel Näslund <daniel{_AT_}longitudo.com>                            
(error message tweaked by me)

r880543 | julianfoad | 2009-11-11 13:06:19 -0600 (Wed, 11 Nov 2009)

Fix failing three way diff for properties when invoking diff-full (df)
in the interactive conflict resolver. Fix potential null-pointer
dereferences in the same code.

* subversion/libsvn_wc/util.c
  (svn_wc__cd2_to_cd, svn_wc__cd_to_cd2): For a property conflict, make
    available all the usual files needed in a three way diff, as well as
    markers for binary format and mime-type. Check for NULL before
    duplicating fields that may be NULL.

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

r880519 | julianfoad | 2009-11-10 11:44:55 -0600 (Tue, 10 Nov 2009)

Remove use of the deprecated svn_path_join().

* subversion/libsvn_client/merge.c
  (record_mergeinfo_for_dir_merge, find_unmerged_mergeinfo):
    Replace svn_path_join() with svn_uri_join(). All "base" parameters
    are repos relative paths.

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

r880515 | julianfoad | 2009-11-10 08:38:01 -0600 (Tue, 10 Nov 2009)

Remove some uses of deprecated svn_path_join().

* subversion/libsvn_client/mergeinfo.c
  (svn_client__adjust_mergeinfo_source_paths): Replace svn_path_join()
    with svn_uri_join(). An svn_mergeinfo_t key is the "base" parameter.
  (svn_client__get_wc_mergeinfo): Replace svn_path_join() with
    svn_relpath_join(). The "base" parameter is created with a relative
    path from svn_dirent_dirname().
  (svn_client_mergeinfo_get_merged): Replace svn_path_join() with
    svn_uri_join(). target_repos_root is the "base" parameter.

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

r880489 | 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>

r880469 | 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>

r880463 | 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

r880446 | 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

r879584 | 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)

r879385 | 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)

r879047 | 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>

r879040 | 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>

r878967 | 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.

r878852 | 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.

r878826 | 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.

r878770 | 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.

r878695 | 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>

r878642 | 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.