* subversion/libsvn_client/commit.c
  (svn_client_commit6): Commit items might have both the ITEM_COPY and
   ITEM_DELETE flags set. Check these flags independently in order to
   catch the case where a moved-from path is comitted which has been
   replaced (i.e. the path has a copy shadowing the delete).


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1445614 13f79535-47bb-0310-9956-ffa450edef68
* subversion/tests/cmdline/merge_authz_tests.py
  (mergeinfo_and_skipped_paths,
   merge_fails_if_subtree_is_deleted_on_src,
   reintegrate_fails_if_no_root_access): Use sbox.ospath() rather than
   more cumbersome os.path.join() where possible.



git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1445694 13f79535-47bb-0310-9956-ffa450edef68
Cleaner solution to the problem fixed in r1445267.

* subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c
  (svn_swig_pl_set_revision): Return a svn_opt_revision_t instead of using a
    pointer to a pointer.

* subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h
  (svn_swig_pl_set_revision): Update declaration.

* subversion/bindings/swig/include/svn_types.swg
  (svn_opt_revision_t): Update typemap to match changes to
    svn_swig_pl_set_revision().

Patch by: Roderich Schupp <roderich.schupp{_AT_}gmail.com>



git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1445705 13f79535-47bb-0310-9956-ffa450edef68
Fix issue #3741, 'externals not removed when working copy is made shallow'.

* subversion/libsvn_client/update.c
  (update_internal): If the target tree is being cropped by the update,
   run the externals handler after the update has completed to account
   for externals which have been cropped. Otherwise, the external definition
   stays behind and obstructs future updates.

* subversion/tests/cmdline/externals_tests.py
  (update_dir_external_shallow, test_list): New test.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1445753 13f79535-47bb-0310-9956-ffa450edef68
When a merge raises conflicts, report the details in a more structured way
up to the libsvn_client top-level function.  At that point we still raise
the same error that we were doing, so there is no major functional change.

There is a minor functional change, which I think is for the better: we will
now do mergeinfo elision regardless of whether conflicts are raised, whereas
previously elision was skipped if conflicts were raised before the final
revision range of the merge.

* subversion/libsvn_client/merge.c
  (conflict_report_t, conflict_report_create, conflict_report_dup): New.
  (make_merge_conflict_error): Take a conflict report object instead of just
    a revision range, and only produce an error if the report indicates a
    conflict in a non-last revision range, to avoid callers all implementing
    that same logic.
  (do_merge): Report conflicts through a new output parameter instead of by
    throwing an error. Do mergeinfo elision regardless of conflicts. Move
    the 'use_sleep' output parameter to before the inputs for consistency.
  (merge_cousins_and_supplement_mergeinfo): The same, and add a result_pool
    in which to allocate the conflict report.
  (merge_locked, merge_reintegrate_locked,
   merge_peg_locked, do_automatic_merge_locked): Turn the conflict report
    into an error here instead.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1445761 13f79535-47bb-0310-9956-ffa450edef68
Update the SWIG bindings docs.

* subversion/bindings/swig/INSTALL
  Run 'make' in the 'build' tree, not the 'source' tree. Split the 'testing
  and using' section into separate sections. Expand the 'using' section for
  Python.

* subversion/bindings/swig/python/README
  Write better code examples.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1445801 13f79535-47bb-0310-9956-ffa450edef68
Raise tree-conflicts for finite depth move-updates that don't
modify but only bump the move source.  At present these conflicts
can only be resolved to 'working' thus breaking the move.

* subversion/libsvn_wc/wc_db_private.h
  (svn_wc__db_bump_moved_away): Add db parameter.

* subversion/libsvn_wc/wc_db.c
  (bump_revisions_post_update): Pass db.

* subversion/libsvn_wc/wc_db_update_move.c
  (mark_tree_conflict): Add comment.
  (svn_wc__db_read_conflict_internal): Trace error.
  (depth_sufficient_to_bump, bump_mark_tree_conflict): New.
  (bump_moved_away): Add depth and db parameters, raise conflict.
  (svn_wc__db_bump_moved_away): Add db parameter, raise conflict.

* subversion/libsvn_wc/wc-queries.sql
  (STMT_SELECT_MOVED_PAIR3): Select kind.
  (STMT_SELECT_HAS_NON_FILE_CHILDREN): New.
  (STMT_SELECT_HAS_GRANDCHILDREN): New.

* subversion/tests/libsvn_wc/op-depth-test.c
  (finite_move_update_bump): New test.
  (test_funcs): Add new test.

* subversion/tests/libsvn_wc/utils.h
  (sbox_wc_update_depth): New.

* subversion/tests/libsvn_wc/utils.c
  (sbox_wc_update): Make into a wrapper calling ...
  (sbox_wc_update_depth): ... this, don't set sticky flag.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1445812 13f79535-47bb-0310-9956-ffa450edef68
Add test for issue #4319 'faulty merge notifications when target subtree
unreadable'.

*subversion/tests/cmdline/merge_authz_tests.py

  (merge_notifications_and_authz_skips): New.

  (test_list): Add merge_notifications_and_authz_skips.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1445870 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_client/diff.c
  (diff_repos_wc): Retrieve the working copy kind of the node, not the
    on disk or symlink target kind.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1445889 13f79535-47bb-0310-9956-ffa450edef68
Refactor the repos-wc diff to be fully ancestry aware, but at the same
time able to suppress ancestry differences for files on files and
directories on directories.

For
$ svn diff --notice-ancestry --show-copies-as-adds PATH -r 123

The repos-wc diff will now properly describe all the changes required
to turn r123 into PATH. For reasonably simple cases these patches are
applicable with 'svn patch'.
(svn patch still misses support to explicitly add and remove directories)

$ svn diff --notice-ancesty --show-copies-as-adds PATH -r 123:BASE will
now always describe the changes against the current pristine version of
all nodes. (so the pristine of replacements)
The old code mixed between pristine and as-checked-out.

The diff tests appear to have been 'fixed' to hide a few bugs in the
diff handling.

* subversion/libsvn_wc/diff_editor.c
  (reverse_propchanges): Remove function.
  (get_pristine_file): Remove function.

  (dir_baton_t,
   file_baton_t): Use three booleans to keep track how the diff will be driven.
     Remove unneeded got_textdelta boolean.

  (make_dir_baton,
   make_file_baton): Remove initialization of shadowed.

  (NOT_PRESENT): New macro.

  (report_local_only_file,
   report_local_only_dir,
   report_base_only_file,
   report_base_only_dir): Add prototypes here.

  (file_diff): Rename to ...
  (base_working_diff): ... this to more closely resamble its only remaining
    function.

  (walk_local_nodes_diff): Don't create dir baton when directly walking inside
    a directory. Use that baton instead. Calculate what to report and use the
    report functions or base_working_diff to do the work.

  (report_local_only_file): Update assertion with more assumptions.

  (ensure_local_only_handled): Rename to ...
  (handle_local_only): ... and always report local changes if requested.

  (report_base_only_file): New function.
  (report_base_only_dir): New function.

  (open_root): Initialize left and right sources as we can report property
    changes on the root. (Diff processor correctness)

  (add_directory): Perform obstruction and ancestry check.
  (open_directory): Perform obstruction and ancestry check.

  (close_directory): Mark deleted children as handled. Only walk local children
    if necessary, otherwise rely on parent reporting. This to handle tree
    replacements. Simplify diff calculation. Properly pass batons.

  (add_file): Perform obstruction and ancestry check.
  (open_file): Perform obstruction and ancestry check.

  (close_file): Use temp_file_path instead of got_textdelta. Simplify diff
    calculation

  (wrap_dir_opened,
   wrap_dir_changed,
   wrap_file_changed): Add debug only assertions to verify diff drivers.

* subversion/tests/cmdline/diff_tests.py
  (diff_schedule_delete): Assume that diff -r 2:BASE returns the inverse of
     -r BASE:2, and as body what is contained in r2, not what is in
     the pristine of the locally deleted WORKING. Use 'diff -r BASE' for that.

  (diff_with_depth): When diffing against -r 2, assume that we receive a diff
     against r2, not against something in r1.

  (local_tree_replace): Remove XFail. Fix assumption. (Lambda was expected to
     be added twice instead of deleted and added).


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1445904 13f79535-47bb-0310-9956-ffa450edef68
Following up on r1445812 resolve the:

Program: ...n-2012\dev\Debug\subversion\tests\libsvn_wc\op-depth-test.exe
Module: ...n-2012\dev\Debug\subversion\tests\libsvn_wc\op-depth-test.exe
File: f:\svn-2012\dev\subversion\libsvn_wc\wc_db_update_move.c Line: 2105
Run-Time Check Failure #3 - The variable 'can_bump' is being used without
                            being initialized.

which currently hangs up the windows buildbots.

* subversion/libsvn_wc/wc_db_update_move.c
  (bump_moved_away): Initialize an otherwise uninitialized variable to the
    value that doesn't break the tests.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1445907 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_wc/diff_editor.c
  (wrap_dir_changed): Remove call to windows only RaiseException() which
    on invoking produces a nice stacktrace in our testlog.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1445910 13f79535-47bb-0310-9956-ffa450edef68
Fix up interactions between conflicts, sleep-for-timestamps, and reporting
other errors, following r1445761.

* subversion/libsvn_client/merge.c
  (merge_locked, merge_reintegrate_locked, do_automatic_merge_locked): Use a
    consistent source code style.
  (merge_peg_locked): Do things in a correct and consistent order: if there
    are conflicts we still need to sleep for timestamps and report any
    'real' error.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1445933 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_client/merge.c
  (merge_peg_locked): Allocate only the session in 'sesspool', duh, to fix
    a crash introduced by the code rearrangement in r1445933.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1445959 13f79535-47bb-0310-9956-ffa450edef68
Introduce svn_sort__array_reverse(), and use it in svn_rangelist_reverse()
which should now be more efficient because it was previously swapping the
pointed-to structures rather than just the pointers.

* subversion/include/svn_sorts.h,
  subversion/libsvn_subr/sorts.c
  (svn_sort__array_reverse): New function.

* subversion/libsvn_subr/mergeinfo.c
  (svn_rangelist_reverse): Use it.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1445967 13f79535-47bb-0310-9956-ffa450edef68
Allow svn_ra_get_file_revs2() and svn_repos_get_file_revs2() to report file
revisions backwards. This to allow optimizing 'svn blame' in a future
Subversion release without having to wait for yet another server upgrade
to support this new feature.

* subversion/include/svn_ra.h
  (svn_ra_get_file_revs2): Update documentation.

* subversion/include/svn_repos.h
  (svn_repos_get_file_revs2): Update documentation.

* subversion/libsvn_repos/rev_hunt.c
  (svn_repos_get_file_revs2): Update comment. Detect reversed arguments,
     which would originally just return an error or no revisions..
     and in that case reverse the revision array before walking it.

* subversion/tests/libsvn_repos/repos-test.c
  (test_get_file_revs): Extend test to also walk the revisions backwards.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1445973 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_subr/sorts.c
  (svn_sort__array_reverse): Replace a debug-only assertion with an
    implementation for non pointer sized array items, which I hope
    we never need. But everything is better than silent memory corruption
    in release mode.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1445980 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_subr/sorts.c
  (svn_sort__array_reverse): Use a more compatible variable type for buffer size.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1445983 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_wc/wc_db_update_move.c (bump_moved_away): Tweak comment.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1445996 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_wc/diff_editor.c
  (walk_local_nodes_diff): Remove unused variable.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1445998 13f79535-47bb-0310-9956-ffa450edef68