aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeniz Dogan2011-01-27 18:51:06 +0100
committerDeniz Dogan2011-01-27 18:51:06 +0100
commit27bbeb296eff010bfa4262a1eca79362d3191070 (patch)
treeec903073725a96ff8a4d3825f3fbbcd89c893a75
parent89fdaac7aa8a2959cc53f0be61fe6c38c8c1d821 (diff)
downloademacs-27bbeb296eff010bfa4262a1eca79362d3191070.tar.gz
emacs-27bbeb296eff010bfa4262a1eca79362d3191070.zip
* vc/vc-bzr.el (vc-bzr-diff): Don't pass --diff-options unless
there are some diff switches.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/vc/vc-bzr.el28
2 files changed, 21 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3f5bbd33f66..bcf3c67a8b2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12011-01-27 Deniz Dogan <deniz.a.m.dogan@gmail.com>
2
3 * vc/vc-bzr.el (vc-bzr-diff): Don't pass --diff-options unless
4 there are some diff switches.
5
12011-01-27 Stefan Monnier <monnier@iro.umontreal.ca> 62011-01-27 Stefan Monnier <monnier@iro.umontreal.ca>
2 7
3 * progmodes/ruby-mode.el (ruby-syntax-propertize-function): 8 * progmodes/ruby-mode.el (ruby-syntax-propertize-function):
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el
index 4c63c6e6776..9693fa745ce 100644
--- a/lisp/vc/vc-bzr.el
+++ b/lisp/vc/vc-bzr.el
@@ -674,18 +674,22 @@ REV non-nil gets an error."
674 674
675(defun vc-bzr-diff (files &optional rev1 rev2 buffer) 675(defun vc-bzr-diff (files &optional rev1 rev2 buffer)
676 "VC bzr backend for diff." 676 "VC bzr backend for diff."
677 ;; `bzr diff' exits with code 1 if diff is non-empty. 677 (let* ((switches (vc-switches 'bzr 'diff))
678 (apply #'vc-bzr-command "diff" (or buffer "*vc-diff*") 678 (args
679 (if vc-disable-async-diff 1 'async) files 679 (append
680 "--diff-options" (mapconcat 'identity 680 ;; Only add --diff-options if there are any diff switches.
681 (vc-switches 'bzr 'diff) 681 (unless (zerop (length switches))
682 " ") 682 (list "--diff-options" (mapconcat 'identity switches " ")))
683 ;; This `when' is just an optimization because bzr-1.2 is *much* 683 ;; This `when' is just an optimization because bzr-1.2 is *much*
684 ;; faster when the revision argument is not given. 684 ;; faster when the revision argument is not given.
685 (when (or rev1 rev2) 685 (when (or rev1 rev2)
686 (list "-r" (format "%s..%s" 686 (list "-r" (format "%s..%s"
687 (or rev1 "revno:-1") 687 (or rev1 "revno:-1")
688 (or rev2 "")))))) 688 (or rev2 "")))))))
689 ;; `bzr diff' exits with code 1 if diff is non-empty.
690 (apply #'vc-bzr-command "diff" (or buffer "*vc-diff*")
691 (if vc-disable-async-diff 1 'async) files
692 args)))
689 693
690 694
691;; FIXME: vc-{next,previous}-revision need fixing in vc.el to deal with 695;; FIXME: vc-{next,previous}-revision need fixing in vc.el to deal with