--- subversion-1.3.1.orig/subversion/include/svn_client.h	2006-05-31 10:44:58.000000000 +0400
+++ subversion-1.3.1/subversion/include/svn_client.h	2006-05-31 16:31:21.281106932 +0400
@@ -1201,6 +1201,34 @@
                   svn_client_ctx_t *ctx,
                   apr_pool_t *pool);
 
+
+/* ----------------------------- */
+typedef enum svn_diff_output_t
+{
+  DIFF_OUTPUT_NONE = 0,
+  DIFF_OUTPUT_SHORT,
+  DIFF_OUTPUT_LONG,
+
+  DIFF_OUTPUT_MAX
+} svn_diff_output_t;
+
+typedef enum svn_diff_op_t
+{
+  DIFF_OP_FILE_ADDED = 0,
+  DIFF_OP_FILE_CHANGED,
+  DIFF_OP_FILE_DELETED,
+  DIFF_OP_DIR_ADDED,
+  DIFF_OP_DIR_DELETED,
+  DIFF_OP_PROP_CHANGED,
+
+  DIFF_OP_MAX
+} svn_diff_op_t;
+
+typedef struct svn_diff_output_selector_t
+{
+  svn_diff_output_t output[DIFF_OP_MAX];
+} svn_diff_output_selector_t;
+
 /**
  * Produce diff output which describes the delta between
  * @a path1/@a revision1 and @a path2/@a revision2.  Print the output 
@@ -1245,6 +1273,21 @@
  *
  * @since New in 1.3.
  */
+svn_error_t *svn_client_diff4 (const apr_array_header_t *diff_options,
+                               const char *path1,
+                               const svn_opt_revision_t *revision1,
+                               const char *path2,
+                               const svn_opt_revision_t *revision2,
+                               svn_diff_output_selector_t *selector,
+                               svn_boolean_t recurse,
+                               svn_boolean_t ignore_ancestry,
+                               svn_boolean_t ignore_content_type,
+                               const char *header_encoding,
+                               apr_file_t *outfile,
+                               apr_file_t *errfile,
+                               svn_client_ctx_t *ctx,
+                               apr_pool_t *pool);
+
 svn_error_t *svn_client_diff3 (const apr_array_header_t *diff_options,
                                const char *path1,
                                const svn_opt_revision_t *revision1,
@@ -1311,6 +1354,21 @@
  *
  * @since New in 1.3.
  */
+svn_error_t *svn_client_diff_peg4 (const apr_array_header_t *diff_options,
+                                   const char *path,
+                                   const svn_opt_revision_t *peg_revision,
+                                   const svn_opt_revision_t *start_revision,
+                                   const svn_opt_revision_t *end_revision,
+                                   svn_diff_output_selector_t *selector,
+                                   svn_boolean_t recurse,
+                                   svn_boolean_t ignore_ancestry,
+                                   svn_boolean_t ignore_content_type,
+                                   const char *header_encoding,
+                                   apr_file_t *outfile,
+                                   apr_file_t *errfile,
+                                   svn_client_ctx_t *ctx,
+                                   apr_pool_t *pool);
+
 svn_error_t *svn_client_diff_peg3 (const apr_array_header_t *diff_options,
                                    const char *path,
                                    const svn_opt_revision_t *peg_revision,
--- subversion-1.3.1.orig/subversion/libsvn_client/diff.c	2006-05-31 10:44:58.000000000 +0400
+++ subversion-1.3.1/subversion/libsvn_client/diff.c	2006-05-31 17:05:40.648539795 +0400
@@ -89,6 +89,7 @@
                     apr_hash_t *original_props,
                     const char *path,
                     const char *encoding,
+                    svn_boolean_t print_value,
                     apr_file_t *file,
                     apr_pool_t *pool)
 {
@@ -126,6 +127,9 @@
       SVN_ERR (file_printf_from_utf8 (file, encoding, _("Name: %s%s"),
                                       propchange->name, APR_EOL_STR));
 
+      if (!print_value)
+        continue;
+
       /* For now, we have a rather simple heuristic: if this is an
          "svn:" property, then assume the value is UTF-8 and must
          therefore be converted before printing.  Otherwise, just
@@ -262,6 +266,9 @@
   /* Client config hash (may be NULL). */
   apr_hash_t *config;
 
+  /* Diff output format selector */
+  svn_diff_output_selector_t *selector;
+
   /* Set this if you want diff output even for binary files. */
   svn_boolean_t force_binary;
 
@@ -303,12 +310,15 @@
   struct diff_cmd_baton *diff_cmd_baton = diff_baton;
   apr_array_header_t *props;
   apr_pool_t *subpool = svn_pool_create (diff_cmd_baton->pool);
-
+  svn_diff_output_t dout;
+ 
+  dout = diff_cmd_baton->selector->output[DIFF_OP_PROP_CHANGED];
   SVN_ERR (svn_categorize_props (propchanges, NULL, NULL, &props, subpool));
 
-  if (props->nelts > 0)
+  if (dout != DIFF_OUTPUT_NONE && props->nelts > 0)
     SVN_ERR (display_prop_diffs (props, original_props, path,
                                  diff_cmd_baton->header_encoding,
+                                 dout == DIFF_OUTPUT_LONG ? TRUE : FALSE,
                                  diff_cmd_baton->outfile, subpool));
 
   if (state)
@@ -549,17 +559,41 @@
                    apr_hash_t *original_props,
                    void *diff_baton)
 {
-  if (tmpfile1)
-    SVN_ERR (diff_content_changed (path,
-                                   tmpfile1, tmpfile2, rev1, rev2,
-                                   mimetype1, mimetype2, diff_baton));
-  if (prop_changes->nelts > 0)
-    SVN_ERR (diff_props_changed (adm_access, prop_state, path, prop_changes,
-                                 original_props, diff_baton));
+  struct diff_cmd_baton *diff_cmd_baton = diff_baton;
+  svn_diff_output_t dout;
+
   if (content_state)
     *content_state = svn_wc_notify_state_unknown;
   if (prop_state)
     *prop_state = svn_wc_notify_state_unknown;
+
+  if (prop_changes->nelts > 0)
+    SVN_ERR (diff_props_changed (adm_access, prop_state, path, prop_changes,
+                                 original_props, diff_baton));
+
+  dout = diff_cmd_baton->selector->output[DIFF_OP_FILE_CHANGED];
+
+  if (dout == DIFF_OUTPUT_NONE)
+      return SVN_NO_ERROR;
+
+  if (dout == DIFF_OUTPUT_SHORT)
+    {
+      if (tmpfile1)
+        {
+          SVN_ERR (file_printf_from_utf8
+                   (diff_cmd_baton->outfile,
+                    diff_cmd_baton->header_encoding,
+                    "Index: %s (changed)" APR_EOL_STR "%s" APR_EOL_STR,
+                    path, equal_string));
+        }
+
+      return SVN_NO_ERROR;
+    }
+
+  if (tmpfile1)
+    SVN_ERR (diff_content_changed (path,
+                                   tmpfile1, tmpfile2, rev1, rev2,
+                                   mimetype1, mimetype2, diff_baton));
   return SVN_NO_ERROR;
 }
 
@@ -584,6 +618,32 @@
                  void *diff_baton)
 {
   struct diff_cmd_baton *diff_cmd_baton = diff_baton;
+  svn_diff_output_t dout;
+
+  if (content_state)
+    *content_state = svn_wc_notify_state_unknown;
+  if (prop_state)
+    *prop_state = svn_wc_notify_state_unknown;
+
+  if (prop_changes->nelts > 0)
+    SVN_ERR (diff_props_changed (adm_access, prop_state, path, prop_changes,
+                                 original_props, diff_baton));
+
+  dout = diff_cmd_baton->selector->output[DIFF_OP_FILE_ADDED];
+
+  if (dout == DIFF_OUTPUT_NONE)
+      return SVN_NO_ERROR;
+
+  if (dout == DIFF_OUTPUT_SHORT)
+    {
+      SVN_ERR (file_printf_from_utf8
+               (diff_cmd_baton->outfile,
+                diff_cmd_baton->header_encoding,
+                "Index: %s (added)" APR_EOL_STR "%s" APR_EOL_STR, 
+                path, equal_string));
+
+      return SVN_NO_ERROR;
+    }
 
   /* We want diff_file_changed to unconditionally show diffs, even if
      the diff is empty (as would be the case if an empty file were
@@ -592,11 +652,9 @@
      user see that *something* happened. */
   diff_cmd_baton->force_empty = TRUE;
 
-  SVN_ERR (diff_file_changed (adm_access, content_state, prop_state, path,
-                              tmpfile1, tmpfile2, 
-                              rev1, rev2,
-                              mimetype1, mimetype2,
-                              prop_changes, original_props, diff_baton));
+  SVN_ERR (diff_content_changed (path,
+                                 tmpfile1, tmpfile2, rev1, rev2,
+                                 mimetype1, mimetype2, diff_baton));
   
   diff_cmd_baton->force_empty = FALSE;
 
@@ -605,51 +663,45 @@
 
 /* A svn_wc_diff_callbacks2_t function. */
 static svn_error_t *
-diff_file_deleted_with_diff (svn_wc_adm_access_t *adm_access,
-                             svn_wc_notify_state_t *state,
-                             const char *path,
-                             const char *tmpfile1,
-                             const char *tmpfile2,
-                             const char *mimetype1,
-                             const char *mimetype2,
-                             apr_hash_t *original_props,
-                             void *diff_baton)
+diff_file_deleted (svn_wc_adm_access_t *adm_access,
+                   svn_wc_notify_state_t *state,
+                   const char *path,
+                   const char *tmpfile1,
+                   const char *tmpfile2,
+                   const char *mimetype1,
+                   const char *mimetype2,
+                   apr_hash_t *original_props,
+                   void *diff_baton)
 {
   struct diff_cmd_baton *diff_cmd_baton = diff_baton;
-
+  svn_diff_output_t dout;
+ 
   /* We don't list all the deleted properties. */
-  return diff_file_changed (adm_access, state, NULL, path,
-                            tmpfile1, tmpfile2, 
-                            diff_cmd_baton->revnum1, diff_cmd_baton->revnum2,
-                            mimetype1, mimetype2,
-                            apr_array_make (diff_cmd_baton->pool, 1,
-                                            sizeof(svn_prop_t)),
-                            apr_hash_make (diff_cmd_baton->pool), diff_baton);
-}
-
-/* A svn_wc_diff_callbacks2_t function. */
-static svn_error_t *
-diff_file_deleted_no_diff (svn_wc_adm_access_t *adm_access,
-                           svn_wc_notify_state_t *state,
-                           const char *path,
-                           const char *tmpfile1,
-                           const char *tmpfile2,
-                           const char *mimetype1,
-                           const char *mimetype2,
-                           apr_hash_t *original_props,
-                           void *diff_baton)
-{
-  struct diff_cmd_baton *diff_cmd_baton = diff_baton;
-
   if (state)
     *state = svn_wc_notify_state_unknown;
 
-  SVN_ERR (file_printf_from_utf8
-           (diff_cmd_baton->outfile,
-            diff_cmd_baton->header_encoding,
-            "Index: %s (deleted)" APR_EOL_STR "%s" APR_EOL_STR, 
-            path, equal_string));
+  dout = diff_cmd_baton->selector->output[DIFF_OP_FILE_DELETED];
+
+  if (dout == DIFF_OUTPUT_NONE)
+      return SVN_NO_ERROR;
+
+  if (dout == DIFF_OUTPUT_SHORT)
+    {
+      SVN_ERR (file_printf_from_utf8
+               (diff_cmd_baton->outfile,
+                diff_cmd_baton->header_encoding,
+                "Index: %s (deleted)" APR_EOL_STR "%s" APR_EOL_STR, 
+                path, equal_string));
+
+      return SVN_NO_ERROR;
+    }
 
+  /* Long output requested */
+  SVN_ERR (diff_content_changed (path,
+                                 tmpfile1, tmpfile2,
+                                 diff_cmd_baton->revnum1,
+                                 diff_cmd_baton->revnum2,
+                                 mimetype1, mimetype2, diff_baton));
   return SVN_NO_ERROR;
 }
 
@@ -664,9 +716,21 @@
                 svn_revnum_t rev,
                 void *diff_baton)
 {
+  struct diff_cmd_baton *diff_cmd_baton = diff_baton;
+  svn_diff_output_t dout;
+
   if (state)
     *state = svn_wc_notify_state_unknown;
 
+  dout = diff_cmd_baton->selector->output[DIFF_OP_DIR_ADDED];
+
+  if (dout != DIFF_OUTPUT_NONE)
+    SVN_ERR (file_printf_from_utf8
+             (diff_cmd_baton->outfile,
+              diff_cmd_baton->header_encoding,
+              "Index: %s (directory added)" APR_EOL_STR "%s" APR_EOL_STR, 
+              path, equal_string));
+
   /* ### todo:  send feedback to app */
   return SVN_NO_ERROR;
 }
@@ -678,9 +742,21 @@
                   const char *path,
                   void *diff_baton)
 {
+  struct diff_cmd_baton *diff_cmd_baton = diff_baton;
+  svn_diff_output_t dout;
+
   if (state)
     *state = svn_wc_notify_state_unknown;
 
+  dout = diff_cmd_baton->selector->output[DIFF_OP_DIR_DELETED];
+
+  if (dout != DIFF_OUTPUT_NONE)
+    SVN_ERR (file_printf_from_utf8
+             (diff_cmd_baton->outfile,
+              diff_cmd_baton->header_encoding,
+              "Index: %s (directory deleted)" APR_EOL_STR "%s" APR_EOL_STR, 
+              path, equal_string));
+
   return SVN_NO_ERROR;
 }
   
@@ -2266,14 +2342,14 @@
    so that this code can be re-used for svn_client_merge(). 
 */
 svn_error_t *
-svn_client_diff3 (const apr_array_header_t *options,
+svn_client_diff4 (const apr_array_header_t *options,
                   const char *path1,
                   const svn_opt_revision_t *revision1,
                   const char *path2,
                   const svn_opt_revision_t *revision2,
+		  svn_diff_output_selector_t *selector,
                   svn_boolean_t recurse,
                   svn_boolean_t ignore_ancestry,
-                  svn_boolean_t no_diff_deleted,
                   svn_boolean_t ignore_content_type,
                   const char *header_encoding,
                   apr_file_t *outfile,
@@ -2286,8 +2362,7 @@
 
   diff_callbacks.file_changed = diff_file_changed;
   diff_callbacks.file_added = diff_file_added;
-  diff_callbacks.file_deleted = no_diff_deleted ? diff_file_deleted_no_diff :
-                                                  diff_file_deleted_with_diff;
+  diff_callbacks.file_deleted = diff_file_deleted;
   diff_callbacks.dir_added =  diff_dir_added;
   diff_callbacks.dir_deleted = diff_dir_deleted;
   diff_callbacks.dir_props_changed = diff_props_changed;
@@ -2302,6 +2377,7 @@
   diff_cmd_baton.header_encoding = header_encoding;
   diff_cmd_baton.revnum1 = SVN_INVALID_REVNUM;
   diff_cmd_baton.revnum2 = SVN_INVALID_REVNUM;
+  diff_cmd_baton.selector = selector;
 
   diff_cmd_baton.config = ctx->config;
   diff_cmd_baton.force_empty = FALSE;
@@ -2317,6 +2393,51 @@
                   pool);
 }
 
+static svn_diff_output_selector_t sel_with_diff_deleted = {
+  {
+    DIFF_OUTPUT_LONG,
+    DIFF_OUTPUT_LONG,
+    DIFF_OUTPUT_LONG,
+    DIFF_OUTPUT_NONE,
+    DIFF_OUTPUT_NONE,
+    DIFF_OUTPUT_LONG
+  }
+};
+
+static svn_diff_output_selector_t sel_no_diff_deleted = {
+  {
+    DIFF_OUTPUT_LONG,
+    DIFF_OUTPUT_LONG,
+    DIFF_OUTPUT_SHORT,
+    DIFF_OUTPUT_NONE,
+    DIFF_OUTPUT_NONE,
+    DIFF_OUTPUT_LONG
+  }
+};
+
+svn_error_t *
+svn_client_diff3 (const apr_array_header_t *options,
+                  const char *path1,
+                  const svn_opt_revision_t *revision1,
+                  const char *path2,
+                  const svn_opt_revision_t *revision2,
+                  svn_boolean_t recurse,
+                  svn_boolean_t ignore_ancestry,
+                  svn_boolean_t no_diff_deleted,
+                  svn_boolean_t ignore_content_type,
+                  const char *header_encoding,
+                  apr_file_t *outfile,
+                  apr_file_t *errfile,
+                  svn_client_ctx_t *ctx,
+                  apr_pool_t *pool)
+{
+  return svn_client_diff4 (options, path1, revision1, path2, revision2,
+                          no_diff_deleted ? &sel_no_diff_deleted :
+                                            &sel_with_diff_deleted,
+                          recurse, ignore_ancestry, ignore_content_type,
+                          header_encoding, outfile, errfile, ctx, pool);
+}
+
 svn_error_t *
 svn_client_diff2 (const apr_array_header_t *options,
                   const char *path1,
@@ -2358,14 +2479,14 @@
 }
 
 svn_error_t *
-svn_client_diff_peg3 (const apr_array_header_t *options,
+svn_client_diff_peg4 (const apr_array_header_t *options,
                       const char *path,
                       const svn_opt_revision_t *peg_revision,
                       const svn_opt_revision_t *start_revision,
                       const svn_opt_revision_t *end_revision,
+		      svn_diff_output_selector_t *selector,
                       svn_boolean_t recurse,
                       svn_boolean_t ignore_ancestry,
-                      svn_boolean_t no_diff_deleted,
                       svn_boolean_t ignore_content_type,
                       const char *header_encoding,
                       apr_file_t *outfile,
@@ -2378,8 +2499,7 @@
 
   diff_callbacks.file_changed = diff_file_changed;
   diff_callbacks.file_added = diff_file_added;
-  diff_callbacks.file_deleted = no_diff_deleted ? diff_file_deleted_no_diff :
-                                                  diff_file_deleted_with_diff;
+  diff_callbacks.file_deleted = diff_file_deleted;
   diff_callbacks.dir_added =  diff_dir_added;
   diff_callbacks.dir_deleted = diff_dir_deleted;
   diff_callbacks.dir_props_changed = diff_props_changed;
@@ -2394,6 +2514,7 @@
   diff_cmd_baton.header_encoding = header_encoding;
   diff_cmd_baton.revnum1 = SVN_INVALID_REVNUM;
   diff_cmd_baton.revnum2 = SVN_INVALID_REVNUM;
+  diff_cmd_baton.selector = selector;
 
   diff_cmd_baton.config = ctx->config;
   diff_cmd_baton.force_empty = FALSE;
@@ -2410,6 +2531,30 @@
 }
 
 svn_error_t *
+svn_client_diff_peg3 (const apr_array_header_t *options,
+                      const char *path,
+                      const svn_opt_revision_t *peg_revision,
+                      const svn_opt_revision_t *start_revision,
+                      const svn_opt_revision_t *end_revision,
+                      svn_boolean_t recurse,
+                      svn_boolean_t ignore_ancestry,
+                      svn_boolean_t no_diff_deleted,
+                      svn_boolean_t ignore_content_type,
+                      const char *header_encoding,
+                      apr_file_t *outfile,
+                      apr_file_t *errfile,
+                      svn_client_ctx_t *ctx,
+                      apr_pool_t *pool)
+{
+  return svn_client_diff_peg4 (options, path, peg_revision, start_revision,
+                               end_revision,
+                               no_diff_deleted ? &sel_no_diff_deleted :
+                                                 &sel_with_diff_deleted,
+                               recurse, ignore_ancestry, ignore_content_type,
+                               header_encoding, outfile, errfile, ctx, pool);
+}
+
+svn_error_t *
 svn_client_diff_peg2 (const apr_array_header_t *options,
                       const char *path,
                       const svn_opt_revision_t *peg_revision,
--- subversion-1.3.1.orig/subversion/clients/cmdline/diff-cmd.c	2006-05-31 10:44:58.000000000 +0400
+++ subversion-1.3.1/subversion/clients/cmdline/diff-cmd.c	2006-05-31 16:45:41.849507956 +0400
@@ -33,6 +33,111 @@
 
 #include "svn_private_config.h"
 
+static struct {
+  const char *name;
+  svn_diff_output_t output;
+} names_outputs[] = {
+  { "none",   DIFF_OUTPUT_NONE },
+  { "short",  DIFF_OUTPUT_SHORT },
+  { "long",   DIFF_OUTPUT_LONG },
+
+  { NULL, DIFF_OUTPUT_MAX }
+};
+
+static struct {
+  const char *name;
+  svn_diff_op_t op;
+} names_ops[] = {
+  { "file-added",   DIFF_OP_FILE_ADDED },
+  { "file-changed", DIFF_OP_FILE_CHANGED },
+  { "file-deleted", DIFF_OP_FILE_DELETED },
+  { "dir-added",    DIFF_OP_DIR_ADDED },
+  { "dir-deleted",  DIFF_OP_DIR_DELETED },
+  { "prop-changed", DIFF_OP_PROP_CHANGED },
+
+  { NULL, DIFF_OP_MAX }
+};
+
+static svn_diff_output_t
+get_diff_output(const char *name)
+{
+  int i;
+
+  for (i = 0; names_outputs[i].name != NULL; i++)
+    if (!strcmp(name, names_outputs[i].name))
+      break;
+
+  return names_outputs[i].output;
+}
+
+static svn_diff_op_t
+get_diff_op(const char *name)
+{
+  int i;
+
+  for (i = 0; names_ops[i].name != NULL; i++)
+    if (!strcmp(name, names_ops[i].name))
+      break;
+
+  return names_ops[i].op;
+}
+
+static svn_error_t *
+svn_opt_parse_diff_format (svn_diff_output_selector_t *sel,
+                           const char *string,
+                           int no_diff_deleted,
+                           apr_pool_t *pool)
+{
+  char *p;
+  char *last;
+
+  /* Set default values */
+  sel->output[DIFF_OP_FILE_ADDED] = DIFF_OUTPUT_LONG;
+  sel->output[DIFF_OP_FILE_CHANGED] = DIFF_OUTPUT_LONG;
+  sel->output[DIFF_OP_FILE_DELETED] = no_diff_deleted ? DIFF_OUTPUT_SHORT :
+                                                        DIFF_OUTPUT_LONG;
+  sel->output[DIFF_OP_DIR_ADDED] = DIFF_OUTPUT_NONE;
+  sel->output[DIFF_OP_DIR_DELETED] = DIFF_OUTPUT_NONE;
+  sel->output[DIFF_OP_PROP_CHANGED] = DIFF_OUTPUT_LONG;
+
+  if (!string)
+    return SVN_NO_ERROR;
+
+  /* Override from explicit format specification */
+  p = apr_pstrdup (pool, string);
+  p = apr_strtok (p, ",", &last);
+  while (p)
+    {
+      char *val;
+      svn_diff_output_t out;
+      svn_diff_op_t op;
+
+      val = strchr (p, ':');
+      if (val)
+        {
+          *val++ = '\0';
+          op = get_diff_op (p);
+          out = get_diff_output (val);
+        }
+      else
+        {
+          op = DIFF_OP_MAX;
+          out = DIFF_OUTPUT_MAX;
+        }
+
+      if (op == DIFF_OP_MAX || out == DIFF_OUTPUT_MAX)
+        return svn_error_createf
+          (SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+           _("Syntax error in diff format specification '%s'"), string);
+
+      sel->output[op] = out;
+
+      p = apr_strtok(NULL, ",", &last);
+    }
+
+  return SVN_NO_ERROR;
+}
+
 
 /*** Code. ***/
 
@@ -44,6 +149,7 @@
               apr_pool_t *pool)
 {
   svn_cl__opt_state_t *opt_state = ((svn_cl__cmd_baton_t *) baton)->opt_state;
+  svn_diff_output_selector_t selector;
   apr_array_header_t *options;
   apr_array_header_t *targets;
   apr_file_t *outfile, *errfile;
@@ -173,6 +279,11 @@
   svn_opt_push_implicit_dot_target (targets, pool);
 
   subpool = svn_pool_create (pool);
+  SVN_ERR (svn_opt_parse_diff_format (&selector,
+                                      opt_state->diff_format,
+                                      opt_state->no_diff_deleted,
+                                      subpool));
+
   for (i = 0; i < targets->nelts; ++i)
     {
       const char *path = APR_ARRAY_IDX (targets, i, const char *);
@@ -184,14 +295,14 @@
           target1 = svn_path_join (old_target, path, subpool);
           target2 = svn_path_join (new_target, path, subpool);
           
-          SVN_ERR (svn_client_diff3 (options,
+          SVN_ERR (svn_client_diff4 (options,
                                      target1,
                                      &(opt_state->start_revision),
                                      target2,
                                      &(opt_state->end_revision),
+                                     &selector,
                                      opt_state->nonrecursive ? FALSE : TRUE,
                                      opt_state->notice_ancestry ? FALSE : TRUE,
-                                     opt_state->no_diff_deleted,
                                      opt_state->force,
                                      svn_cmdline_output_encoding (pool),
                                      outfile,
@@ -212,16 +323,16 @@
             peg_revision.kind = svn_path_is_url (path)
               ? svn_opt_revision_head : svn_opt_revision_working;
 
-          SVN_ERR (svn_client_diff_peg3 (options,
+          SVN_ERR (svn_client_diff_peg4 (options,
                                          truepath,
                                          &peg_revision,
                                          &opt_state->start_revision,
                                          &opt_state->end_revision,
+                                         &selector,
                                          opt_state->nonrecursive
                                          ? FALSE : TRUE,
                                          opt_state->notice_ancestry
                                          ? FALSE : TRUE,
-                                         opt_state->no_diff_deleted,
                                          opt_state->force,
                                          svn_cmdline_output_encoding(pool),
                                          outfile,
--- subversion-1.3.1.orig/subversion/clients/cmdline/cl.h	2006-05-31 10:44:58.000000000 +0400
+++ subversion-1.3.1/subversion/clients/cmdline/cl.h	2006-05-31 13:46:49.000000000 +0400
@@ -50,6 +50,7 @@
   svn_cl__autoprops_opt,
   svn_cl__config_dir_opt,
   svn_cl__diff_cmd_opt,
+  svn_cl__diff_format_opt,
   svn_cl__dry_run_opt,
   svn_cl__editor_cmd_opt,
   svn_cl__encoding_opt,
@@ -141,6 +142,7 @@
   svn_boolean_t autoprops;       /* enable automatic properties */
   svn_boolean_t no_autoprops;    /* disable automatic properties */
   const char *native_eol;        /* override system standard eol marker */
+  const char *diff_format;       /* diff format description */
 } svn_cl__opt_state_t;
 
 
--- subversion-1.3.1.orig/subversion/clients/cmdline/main.c	2006-05-31 10:44:58.000000000 +0400
+++ subversion-1.3.1/subversion/clients/cmdline/main.c	2006-05-31 14:02:16.000000000 +0400
@@ -151,6 +151,8 @@
                       N_("maximum number of log entries")},
     {"no-unlock",     svn_cl__no_unlock_opt, 0,
                       N_("don't unlock the targets")},
+    {"diff-format",   svn_cl__diff_format_opt, 1,
+                      N_("specify diff output format")},
     {0,               0, 0, 0}
   };
 
@@ -312,7 +314,7 @@
     {'r', svn_cl__old_cmd_opt, svn_cl__new_cmd_opt, 'N',
      svn_cl__diff_cmd_opt, 'x', svn_cl__no_diff_deleted,
      svn_cl__notice_ancestry_opt, svn_cl__force_opt, SVN_CL__AUTH_OPTIONS,
-     svn_cl__config_dir_opt} },
+     svn_cl__config_dir_opt, svn_cl__diff_format_opt} },
 
   { "export", svn_cl__export, {0},
     N_("Create an unversioned copy of a tree.\n"
@@ -1123,6 +1125,16 @@
       case svn_cl__no_unlock_opt:
         opt_state.no_unlock = TRUE;
         break;
+      case svn_cl__diff_format_opt:
+        if (opt_state.diff_format != NULL)
+          {
+            err = svn_error_create
+              (SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+               _("Multiple diff formats arguments encountered"));
+            return svn_cmdline_handle_exit_error (err, pool, "svn: ");
+          }
+        opt_state.diff_format = apr_pstrdup (pool, opt_arg);
+        break;
       default:
         /* Hmmm. Perhaps this would be a good place to squirrel away
            opts that commands like svn diff might need. Hmmm indeed. */


