 
 (defun svn-status-show-svn-diff (arg)
   "Run `svn diff' on the current file.
-If there is a newer revision in the repository, the diff is done against HEAD, otherwise
-compare the working copy with BASE.
+If the current file is a directory, compare it recursively.
+If there is a newer revision in the repository, the diff is done against HEAD,
+otherwise compare the working copy with BASE.
 If ARG then prompt for revision to diff against."
   (interactive "P")
   (svn-status-ensure-cursor-on-file)
-  (svn-status-show-svn-diff-internal (list (svn-status-get-line-information))
+  (svn-status-show-svn-diff-internal (list (svn-status-get-line-information)) t
                                      (if arg :ask :auto)))
 
 (defun svn-status-show-svn-diff-for-marked-files (arg)
   "Run `svn diff' on all selected files.
-See `svn-status-marked-files' for what counts as selected.
+If some files have been marked, compare those non-recursively;
+this is because marking a directory with \\[svn-status-set-user-mark]
+normally marks all of its files as well.
+If no files have been marked, compare recursively the file at point.
 If ARG then prompt for revision to diff against, else compare working copy with BASE."
   (interactive "P")
   (svn-status-show-svn-diff-internal (svn-status-marked-files)
+                                     (not (svn-status-some-files-marked-p))
                                      (if arg :ask "BASE")))
 
-(defun svn-status-show-svn-diff-internal (line-infos revision)
+(defun svn-status-show-svn-diff-internal (line-infos recursive revision)
   ;; REVISION must be one of:
   ;; - a string: whatever the -r option allows.
   ;; - `:ask': asks the user to specify the revision, which then becomes

                 (string= "." (svn-status-line-info->filename (car svn-status-files-to-commit)))))
      (svn-status-create-arg-file svn-status-temp-arg-file ""
                                  svn-status-files-to-commit "")
      (svn-run-svn t t 'commit "commit" "--targets" svn-status-temp-arg-file
                   "-F" svn-status-temp-file-to-remove
                   svn-status-default-commit-arguments))
    (set-window-configuration svn-status-pre-commit-window-configuration)

    (save-excursion
      (goto-char (point-min))
      (insert "## Lines starting with '## ' will be removed from the log message.\n")
      (insert "## File(s) to commit"
              (if svn-status-recursive-commit " recursively" "") ":\n")
      (let ((file-list svn-status-files-to-commit))
        (while file-list
          (insert (concat "## " (svn-status-line-info->filename (car file-list)) "\n"))
