On the tree-conflicts branch, make XML output of 'svn status' 
aware of tree-conflicts.

Also, remove the -t flag we added to 'svn status', which caused
human-readable tree conflict descriptions to be printed.
This functionality will go into svn info instead because
a) svn status is usually very concise. It produces mostly single
   letter status codes. The -t option produced rather verbose output.
   svn info already prints long single-line fields, so adding one
   multi-line field here is a bit less of a crime...
b) Putting this functionality into svn info requires much less changes,
   decreasing the size of the diff between trunk and the tree-conflicts
   branch by a few dozen lines.

svn info will be updated in a separate commit.

* subversion/include/svn_wc.h:
  (svn_wc_status2_t): Replace member tree_status (enum) with new
   member tree_conflicted (boolean).

* subversion/libsvn_wc/status.c
  (assemble_status, is_sendable_status, close_directory):
   Track replaced member.

* subversion/tests/cmdline/stat_tests.py
  (status_with_tree_conflicts): New test.

* subversion/svn/cl.h
  (svn_cl__opt_state_t): Remove member show_tree_conflicts.
  (svn_cl__print_commit_info): Remove show_tree_conflicts argument.

* subversion/svn/status.c
  (print_status): Remove show_tree_conflicts argument.
   Track replaced member in svn_wc_status2_t.
   Don't print human readable tree conflict descriptions anymore.
  (svn_cl__print_status_xml): Print tree-conflicted attribute in
   wc-status element for a directory with tree conflicts.
  (svn_cl__print_status): Remove show_tree_conflicts argument.
   Track removal of argument of print_status.

* subversion/svn/schema/status.rnc: Declare attribute tree-conflicted.

* subversion/svn/main.c
  (svn_cl__options): Remove --show-tree-conflicts (-t) flag.
  (svn_cl__cmd_table, main): Track flag removal.

* subversion/svn/status-cmd.c
  (status_baton): Remove show_tree_conflicts member.
  (svn_cl__print_status): Track removal of argument of svn_cl__print_status.
  (svn_cl__status): Track removal of show_tree_conflicts member of status_baton.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/tree-conflicts@868838 13f79535-47bb-0310-9956-ffa450edef68
On the tree-conflicts branch, remove two unused and unimplemented functions.

* subversion/libsvn_wc/tree_conflicts.c
  (svn_wc__is_tree_conflict_victim, svn_wc__tree_conflict_resolved): Removed.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/tree-conflicts@868839 13f79535-47bb-0310-9956-ffa450edef68
On the tree-conflicts branch, teach svn info about tree conflicts.

This includes XML output as well as output of human readable tree
conflict descriptions. The latter used to be triggered by passing
a '--show-tree-conflicts' (or '-t') flag to 'svn status'. This flag
has been removed from 'svn status' in favour of having 'svn info'
print tree conflict descriptions unconditionally.

* subversion/include/svn_wc.h
  (svn_wc_append_tree_conflict_info_xml): New function.

* subversion/include/svn_client.h
  (svn_info_t): Add new member tree_conflicts.

* subversion/libsvn_wc/tree_conflicts.c
  (svn_wc_append_tree_conflict_info_xml): Implement.

* subversion/libsvn_client/info.c
  (build_info_from_dirent, build_info_from_entry):
   Track new member of svn_into_t.

* subversion/svn/schema/info.rnc: Include tree conflicts elements.

* subversion/svn/info-cmd.c
  (print_info_xml): Print XML info about tree conflicts.
  (print_info): Print human readable descriptions of tree conflicts.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/tree-conflicts@868841 13f79535-47bb-0310-9956-ffa450edef68
On the tree-conflicts branch, merge outstanding changes from trunk.

Merged revisions 28758-28882 via svnmerge from 
https://svn.collab.net/repos/svn/trunk


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/tree-conflicts@868957 13f79535-47bb-0310-9956-ffa450edef68
On the tree-conflicts branch, teach "svn resolved" about tree conflicts.

* subversion/include/svn_wc.h:
  (svn_wc_resolved_conflict4): New function. Same as svn_wc_resolved_conflict3,
   but can also resolve tree conflicts.

* subversion/libsvn_wc/adm_ops.c
  (resolve_conflict_on_entry): New argument resolve_tree.
   If resolve_tree is true and the entry is a directory,
   resolve tree conflicts if applicable.
  (resolve_callback_baton): New member resolve_tree.
  (resolve_found_entry_callback): Track new argument to
   resolve_conflict_on_entry.
  (svn_wc_resolved_conflict3): Call svn_wc_resolved_conflict4 with
   resolve_tree set to FALSE.
  (svn_wc_resolved_conflict4): New function (see svn_wc.h changes above).

* subversion/libsvn_client/resolved.c
  (svn_client_resolved2): Call svn_wc_resolved_conflict4 instead of
   svn_wc_resolved_conflict3 to handle tree conflicts.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/tree-conflicts@868958 13f79535-47bb-0310-9956-ffa450edef68
On the tree-conflicts branch, merge outstanding changes from trunk.

Merged revisions 28885-28921 via svnmerge from 
https://svn.collab.net/repos/svn/trunk


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/tree-conflicts@868997 13f79535-47bb-0310-9956-ffa450edef68
On the tree-conflicts branch, teach "svn revert" about tree conflicts.

* subversion/libsvn_wc/adm_ops.c
  (revert_admin_things): Delete tree conflict things.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/tree-conflicts@868998 13f79535-47bb-0310-9956-ffa450edef68
On the tree-conflicts branch, tidy up a few comments and remove
two dead function declarations.

* subversion/libsvn_wc/tree_conflicts.h
  (svn_wc__is_tree_conflict_victim, svn_wc__tree_conflict_resolved):
   Remove declarations for these functions. Their implementations
   have been removed long ago.

* subversion/libsvn_wc/update_editor.c
  (do_entry_deletion): Mention notes/tree-conflicts/detection.txt
   in a comment. Refine comment about use case 3 detection.
  (open_file): Mention notes/tree-conflicts/detection.txt in a comment.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/tree-conflicts@868999 13f79535-47bb-0310-9956-ffa450edef68
On the tree-conflicts branch, make all tests pass.

Add various new tree-conflict-related tests and optimize existing ones.

Some tests not directly related to tree conflicts inadvertently
cause tree conflicts, so their expected output or status has been
adjusted.

* build.conf: Include tree conflict C tests in MSVC __ALL__ project.

* subversion/tests/cmdline/revert_tests.py
  (revert_tree_conflicts_in_updated_files): New test.
  (test_list): Add new test.

* subversion/tests/cmdline/switch_tests.py
  (failed_anchor_is_target): Expect a tree conflicted directory.
  (tree_conflicts_in_switched_files): New test.
  (test_list): Add new test.

* subversion/tests/cmdline/stat_tests.py
  (status_with_tree_conflicts): Do not expect files to be renamed
   because the shared tree conflict test setup function does
   not do renames anymore. Also, call run_svn instead of
   run_and_verify_svn because we check the output manually anyway.

* subversion/tests/cmdline/update_tests.py
  (update_delete_modified_files,
   prop_update_on_scheduled_delete): Expect a tree conflicted directory.
  (tree_conflicts_in_updated_files): Do not expect files to be renamed
   because the shared tree conflict test setup function does
   not do renames anymore. Also, check output, disk and status starting
   from the WC root for consistency with other tests.

* subversion/tests/cmdline/commit_tests.py
  (commit_fails_at_path): Track parameter changes to run_and_verify_commit
   made on trunk in r28802.
  (tree_conflicts_block_commit): Do not expect files to be renamed
   because the shared tree conflict test setup function does
   not do renames anymore. Also, check output, disk and status starting
   from the WC root for consistency with other tests.
  (tree_conflicts_resolved): New test.
  (test_list): Add new test.

* subversion/tests/cmdline/info_tests.py: New file.

* subversion/tests/cmdline/svntest/actions.py
  (set_up_tree_conflicts): Add do_copy parameter to support switch tests.
   While deliberately causing tree conflicts, delete files instead of
   renaming them, because current tree conflict code cannot tell moves
   apart from deletes anyway.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/tree-conflicts@869001 13f79535-47bb-0310-9956-ffa450edef68
On the tree-conflicts branch, improve human-readable tree conflict
descriptions.

* subversion/libsvn_wc/tree_conflicts.c
  (new_tree_conflict_phrases): Describe all events in past tense.
   When the user gets to see the phrases, the events have already happened.

* subversion/tests/libsvn_wc/tree-conflict-human-readable-test.c
  (test_get_one_human_readable_tree_conflict_description):
   Track above change to tree conflict descriptions.

* subversion/tests/cmdline/info_tests.py:
  (info_with_tree_conflicts): Track above change to tree conflict
   descriptions.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/tree-conflicts@869004 13f79535-47bb-0310-9956-ffa450edef68
Create 'fs-rep-sharing' branch.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/fs-rep-sharing@869036 13f79535-47bb-0310-9956-ffa450edef68
On the 'fs-rep-sharing' branch, commit my first pass at implementing
some shared string storage in the Berkeley DB backend.  It doesn't
currently attempt to share representations for properties -- only for
file contents.

This is for issue #2286.

   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
   *                                                               *
   *   THIS NEEDS CODE REVIEW + TESTS BEFORE BRINGING INTO TRUNK   *
   *                                                               *
   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

* subversion/libsvn_fs_base/notes/structure
  Update grammar for this new table.

* subversion/libsvn_fs_base/fs.h
  (base_fs_data_t): Add 'checksum_reps' member.

* subversion/libsvn_fs_base/fs.c
  (cleanup_fs, open_databases, base_hotcopy): Handle Yet Another
    Database File, `checksum-reps'

* subversion/libsvn_fs_base/bdb/checksum-reps-table.h,
* subversion/libsvn_fs_base/bdb/checksum-reps-table.c
  New files implementing a 'checksum-reps' index table.

* subversion/include/svn_error_codes.h
  (SVN_ERR_FS_NO_SUCH_CHECKSUM_REP): New error code.

* subversion/libsvn_fs_base/err.h,
* subversion/libsvn_fs_base/err.c
  (svn_fs_base__err_no_such_checksum_rep): New.

* subversion/libsvn_fs_base/tree.c
  (struct txn_deltify_args): Note that 'base_id' can be NULL, and why.
  (txn_body_txn_deltify): Only deltify if both IDs are provided.  In
    any case, index the data representation checksum of the newly
    committed node.
  (deltify_mutable): Call txn_deltify_args() to index the
    to-be-deltafied items data representation checksum.

* subversion/libsvn_fs_base/dag.h
  (svn_fs_base__dag_index_data_checksum): New function.

* subversion/libsvn_fs_base/dag.c
  (svn_fs_base__dag_index_data_checksum): New function.
  (svn_fs_base__dag_finalize_edits): If, while finalizing edits, we
    determine that we just wrote a duplicate body of contents, delete
    our edits and just reference the pre-existing contents.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/fs-rep-sharing@869037 13f79535-47bb-0310-9956-ffa450edef68
On the fs-rep-sharing branch:
Add libsvn_subr support for SHA-1.

* subversion/include/svn_sha1.h,
  subversion/libsvn_subv/sha1.c:
  New files.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/fs-rep-sharing@869043 13f79535-47bb-0310-9956-ffa450edef68
On the fs-rep-sharing branch:
First step toward supporting multiple checksum types.  Add a new datatype for
checksums, and appropriate setting and getting functions.  Rev the
svn_fs_file_md5_checksum() interface to allow it to return digests other
than MD5.

("Why is this happening on the fs-rep-sharing branch?" you ask.  Well,
currently, we use MD5 digests in the fs to make sure that the representation
is what we think it is.  MD5 works fine for that.  However, with representation
sharing, we are now using the checksum to detect duplicate representations and
only store the one of them.  Should somebody want to intentionally create
collisions in the database, MD5 is known to be vulnerable.  Hence the desire
to use something stronger, like SHA-1.)

* subversion/libsvn_fs_base/tree.c
  (file_checksum_args): Use a checksum, instead of an MD5 digest.
  (base_file_md5_checksum, base_file_checksum): Rename.
  (txn_body_file_checksum): Return the MD5 if requested, and all zeros if
   SHA-1 requested.

* subversion/include/svn_error_codes.h
  (SVN_ERR_BAD_CHECKSUM_KIND): New error.

* subversion/include/svn_fs.h
  (svn_fs_file_checksum): New.
  (svn_fs_file_md5_checksum): Deprecate.

* subversion/include/svn_types.h
  (svn_checksum_kind_t, svn_checksum_t, svn_checksum_create):

* subversion/libsvn_fs/fs-loader.h
  (root_vtable_t): Update type for file_checksum.

* subversion/libsvn_fs/fs-loader.c
  (svn_fs_file_checksum): New.
  (svn_fs_file_md5_checksum): Implement as wrapper around
   svn_fs_file_checksum().

* subversion/libsvn_subr/checksum.c:
  New.

* subversion/libsvn_fs_fs/tree.c
  (fs_file_md5_checksum, fs_file_checksum): Rename.  Return the MD5 if requested,
   and all zeros if SHA-1 requested.
  (root_vtable): Update reference to fs_file_checksum().


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/fs-rep-sharing@869050 13f79535-47bb-0310-9956-ffa450edef68
On the fs-rep-sharing branch:
Bring up-to-date with trunk at r28983.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/fs-rep-sharing@869058 13f79535-47bb-0310-9956-ffa450edef68
On the 'fs-rep-sharing' branch, mess around with the BDB
implementation a little bit.

WARNING: This code, when run on an svnsync of our Subversion
         repository, will spin into an infinite cycle of death around r114.
         I dunno why.

* subversion/libsvn_fs_base/dag.h
  (svn_fs_base__dag_index_checksums): Was svn_fs_base__dag_index_data_checksum.

* subversion/libsvn_fs_base/dag.c
  (store_checksum_rep): New helper function.
  (svn_fs_base__dag_index_checksums): Use store_checksum_rep() to
    store `checksum-reps' index records for file contents and properties
    and directory properties.  Was svn_fs_base__dag_index_data_checksum().

* subversion/libsvn_fs_base/bdb/checksum-reps-table.c
  (svn_fs_bdb__set_checksum_rep): Don't bother comparing the new value
    against an existing one (but leave the code visible for now).

* subversion/libsvn_fs_base/tree.c
  (txn_body_txn_deltify): Track rename of svn_fs_base__dag_index_data_checksum
    function.

* fs-rep-sharing/subversion/libsvn_fs_base/dag.c

  (svn_fs_base__dag_set_proplist): Check for and try to avoid
    duplicate property lists.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/fs-rep-sharing@869065 13f79535-47bb-0310-9956-ffa450edef68
On the 'fs-rep-sharing' branch, avoid deferencing a NULL value.

* subversion/libsvn_fs_base/dag.c
  (svn_fs_base__dag_set_proplist): Don't delete the rep whose key ain't.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/fs-rep-sharing@869081 13f79535-47bb-0310-9956-ffa450edef68
Make svn_checksum_create() behave as the rest of our checksum creation
functions: by returning a pointer to the new structure, instead of returning
an error.

* subversion/include/svn_types.h
  (svn_checksum_t): Include a pointer to the pool to be used for later
   digest allocation.
  (svn_checksum_create): Update interface.

* subversion/libsvn_subr/checksum.c
  (svn_checksum_create): Return a pointer to the new structure, update
   syntax throughout.

* subversion/libsvn_fs/fs-loader.c
  (svn_fs_file_md5_checksum): Update call to svn_checksum_create().


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/fs-rep-sharing@869114 13f79535-47bb-0310-9956-ffa450edef68
On the fs-rep-sharing branch:
Bring up-to-date with trunk at r29040.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/fs-rep-sharing@869115 13f79535-47bb-0310-9956-ffa450edef68
On the fs-rep-sharing branch:
Bring up-to-date with trunk at r29124.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/fs-rep-sharing@869199 13f79535-47bb-0310-9956-ffa450edef68