You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ma...@apache.org on 2012/08/03 17:09:28 UTC
svn commit: r1369014 - /subversion/trunk/contrib/client-side/emacs/dsvn.el
Author: mattiase
Date: Fri Aug 3 15:09:28 2012
New Revision: 1369014
URL: http://svn.apache.org/viewvc?rev=1369014&view=rev
Log:
Run svn diff with -x -p by default (because that is what is useful for
source code), and allow the user to customise these options.
* contrib/client-side/emacs/dsvn.el
(svn-diff-args): New defcustom.
(svn-diff, svn-log-diff, svn-diff-file): Use svn-diff-args.
Modified:
subversion/trunk/contrib/client-side/emacs/dsvn.el
Modified: subversion/trunk/contrib/client-side/emacs/dsvn.el
URL: http://svn.apache.org/viewvc/subversion/trunk/contrib/client-side/emacs/dsvn.el?rev=1369014&r1=1369013&r2=1369014&view=diff
==============================================================================
--- subversion/trunk/contrib/client-side/emacs/dsvn.el (original)
+++ subversion/trunk/contrib/client-side/emacs/dsvn.el Fri Aug 3 15:09:28 2012
@@ -130,6 +130,11 @@
:type 'boolean
:group 'dsvn)
+(defcustom svn-diff-args '("-x" "-p")
+ "*Additional arguments used for all invocations of `svn diff'."
+ :type '(repeat string)
+ :group 'dsvn)
+
;; start-file-process and process-file are needed for tramp but only appeared
;; in Emacs 23 and 22 respectively.
(setq svn-start-file-process
@@ -351,7 +356,9 @@ during the run."
"Run `svn diff'.
Argument ARG are the command line arguments."
(interactive "ssvn diff arguments: ")
- (svn-run-with-output "diff" (split-string arg) 'diff-mode))
+ (svn-run-with-output "diff"
+ (append svn-diff-args (split-string arg))
+ 'diff-mode))
(defun svn-commit ()
"Commit changes to one or more files."
@@ -573,7 +580,7 @@ VERBOSE-P."
(erase-buffer)
(setq default-directory dir)
(svn-call-process diff-buf
- "diff" "-r"
+ "diff" "-x" "-p" "-r"
(format "%d:%d" (1- commit-id) commit-id)))))
(defun svn-log-edit-files (commit-id)
@@ -601,7 +608,9 @@ VERBOSE-P."
"Run `svn diff' for the current log entry."
(interactive)
(let ((commit-id (svn-log-current-commit)))
- (svn-run-with-output "diff" (list "-c" (number-to-string commit-id))
+ (svn-run-with-output "diff"
+ (append svn-diff-args
+ (list "-c" (number-to-string commit-id)))
'diff-mode)))
(defun svn-log-edit ()
@@ -1957,7 +1966,8 @@ files instead."
(list (or (svn-getprop (point) 'file)
(svn-getprop (point) 'dir)
(error "No file on line"))))))
- (unless (svn-run-with-output "diff" files 'diff-mode)
+ (unless (svn-run-with-output "diff" (append svn-diff-args files)
+ 'diff-mode)
(message "No difference found"))))
(defun svn-previous-file (arg)