Teach 'svn diff' to compare arbitrary versioned or unversioned files or directories. The invocation syntax is:
Teach 'svn diff' to compare arbitrary versioned or unversioned files or
directories. The invocation syntax is:

  1) svn diff --old path/to/old/file --new path/to/new/file
  2) svn diff --old path/to/old/directory --new path/to/new/directory

Previously such invocations resulted in an error.
This change has no effect on any other existing invocation syntax.

Apart from file changes, property changes are shown too (for versioned
files only, of course).

This is somewhat work in progress. Most importantly, unit tests are lacking
at the moment. Manual testing with broad coverage indicates that the output
corresponds to standard diff tools, with minor svn-specific variations in
diff headers.

Another remaining issue is that the diff will currently recurse into
unversioned trees within working copies. We should probably detect
recursion within or into working copies and only consider versioned
files and directories within working copies.

* subversion/libsvn_client/diff.c
  (do_arbitrary_files_diff): New function that produces a diff between two
   arbitrary files via the file_{added,deleted,changed} diff callbacks.
  (arbitrary_diff_walker_baton, arbitrary_diff_walker): New function that
   produces a diff between two arbitrary directories. Uses the
   do_arbitrary_files_diff() function to show file differences.
  (do_arbitrary_dirs_diff): Entry point for walking arbitrary directory
   trees being diffed.
  (do_arbitrary_nodes_diff): New. Invokes the above new functions to show
   diffs between a pair files or a pair of directories.
  (diff_summarize_wc_wc): Adjust error message.


git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@1310291 13f79535-47bb-0310-9956-ffa450edef68

YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion