[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r102992: * vc/vc-bzr.el (vc-bzr-diff)
From: |
Deniz Dogan |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r102992: * vc/vc-bzr.el (vc-bzr-diff): Don't pass --diff-options unless |
Date: |
Thu, 27 Jan 2011 18:51:06 +0100 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 102992
committer: Deniz Dogan <address@hidden>
branch nick: emacs-trunk
timestamp: Thu 2011-01-27 18:51:06 +0100
message:
* vc/vc-bzr.el (vc-bzr-diff): Don't pass --diff-options unless
there are some diff switches.
modified:
lisp/ChangeLog
lisp/vc/vc-bzr.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-01-27 17:07:48 +0000
+++ b/lisp/ChangeLog 2011-01-27 17:51:06 +0000
@@ -1,3 +1,8 @@
+2011-01-27 Deniz Dogan <address@hidden>
+
+ * vc/vc-bzr.el (vc-bzr-diff): Don't pass --diff-options unless
+ there are some diff switches.
+
2011-01-27 Stefan Monnier <address@hidden>
* progmodes/ruby-mode.el (ruby-syntax-propertize-function):
=== modified file 'lisp/vc/vc-bzr.el'
--- a/lisp/vc/vc-bzr.el 2011-01-25 04:08:28 +0000
+++ b/lisp/vc/vc-bzr.el 2011-01-27 17:51:06 +0000
@@ -674,18 +674,22 @@
(defun vc-bzr-diff (files &optional rev1 rev2 buffer)
"VC bzr backend for diff."
- ;; `bzr diff' exits with code 1 if diff is non-empty.
- (apply #'vc-bzr-command "diff" (or buffer "*vc-diff*")
- (if vc-disable-async-diff 1 'async) files
- "--diff-options" (mapconcat 'identity
- (vc-switches 'bzr 'diff)
- " ")
- ;; This `when' is just an optimization because bzr-1.2 is *much*
- ;; faster when the revision argument is not given.
- (when (or rev1 rev2)
- (list "-r" (format "%s..%s"
- (or rev1 "revno:-1")
- (or rev2 ""))))))
+ (let* ((switches (vc-switches 'bzr 'diff))
+ (args
+ (append
+ ;; Only add --diff-options if there are any diff switches.
+ (unless (zerop (length switches))
+ (list "--diff-options" (mapconcat 'identity switches " ")))
+ ;; This `when' is just an optimization because bzr-1.2 is *much*
+ ;; faster when the revision argument is not given.
+ (when (or rev1 rev2)
+ (list "-r" (format "%s..%s"
+ (or rev1 "revno:-1")
+ (or rev2 "")))))))
+ ;; `bzr diff' exits with code 1 if diff is non-empty.
+ (apply #'vc-bzr-command "diff" (or buffer "*vc-diff*")
+ (if vc-disable-async-diff 1 'async) files
+ args)))
;; FIXME: vc-{next,previous}-revision need fixing in vc.el to deal with
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r102992: * vc/vc-bzr.el (vc-bzr-diff): Don't pass --diff-options unless,
Deniz Dogan <=