From: Deniz Dogan <deniz.a.m.dogan@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Emacs-Devel devel <emacs-devel@gnu.org>
Subject: Re: [PATCH] Fix for vc-bzr-diff when vc-bzr-diff-switches is t
Date: Thu, 27 Jan 2011 10:50:49 +0100 [thread overview]
Message-ID: <AANLkTik=pb6MzuepVEepX8ZTimeXMct_GK5nqUd6BVdN@mail.gmail.com> (raw)
In-Reply-To: <jwvhbcvm4d2.fsf-monnier+emacs@gnu.org>
Here is my third attempt given your comments.
I'm still unable to test this patch properly since I don't have the
diff tool, but looking at the commands that Emacs executes depending
on vc-bzr-diff-switches it looks fine.
--
Deniz Dogan
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: deniz.a.m.dogan@gmail.com-20110127094656-\
# wpy4g0ar18lokk25
# target_branch: bzr+ssh://damd@bzr.savannah.gnu.org/emacs/trunk/
# testament_sha1: 2aad3701c56f1c2975786049462e411b2f4fc43e
# timestamp: 2011-01-27 10:47:25 +0100
# base_revision_id: rgm@gnu.org-20110127083843-kh1tiktwkt13fl8f
#
# Begin patch
=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog 2011-01-27 07:54:04 +0000
+++ lisp/ChangeLog 2011-01-27 09:46:56 +0000
@@ -1,3 +1,8 @@
+2011-01-27 Deniz Dogan <deniz.a.m.dogan@gmail.com>
+
+ * vc/vc-bzr.el (vc-bzr-diff): Don't pass --diff-options unless
+ there are any diff switches.
+
2011-01-27 Glenn Morris <rgm@gnu.org>
* msb.el (msb-after-load-hooks): Make it an obsolete alias.
=== modified file 'lisp/vc/vc-bzr.el'
--- lisp/vc/vc-bzr.el 2011-01-25 04:08:28 +0000
+++ lisp/vc/vc-bzr.el 2011-01-27 09:46:56 +0000
@@ -674,18 +674,23 @@
(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
# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWZ9oXhgAArt/gEuwAARa8///
XgSEAP////BQBate3Fm24Nw0dDm2ZrhJIQJ6jQYmmTEjCaDVPKbQgDJoyCUKYJqehiSjanqaGg0D
1ABoGT1B6gSJApPTIE1NNkTam1NGm0agANNAHqHMJgEwAmEwmmAAATJpoGElNKbTEmCZU3o1Mp4k
02kGj1AZAAE5SyROvpxqkvkgm/l9zF2WNGjNFnnwddBxY3CMVw4SU6kQpAlJ2aq5sdl0REMAD8Sd
PjnxYts5LF77xfxywL/wcSxsmfM9DTHXwXfhS/vcbivjk9cpSZz5sb4Hcb1bm00Ekczdl4I7hjA6
OMJ9qm7nnSD+feMV0wHjJPNyUrNPCLSHTk8wZtE99mX33dMM6BoVGl7WOXtCDhM4cx+aeGaYM3xu
7N0u1ruGb2/XOSb8qvZojq65mV625B5hw50wjKya3PLl/pkeXA1PR9gKJdjHfymFmZhvcGxKuSs9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J9iJUdUScKX
OwWzIHDbcdCLgsBcwwQyqW3Sjo44f7M5nlEMgoBTNBSyH82CKumG8LEYIpDF6jVubiYxxYYGLHqi
Vh5vlgiSa3UBjRq02d0KWiaCJgMmjbJSTSyIv6YW2yJooq9Uwzccp6HSbWfPOGnysedpleEUrrhT
pW08eBg4rICcUhueqVaOYiz6RXyzYNCqHDrrvOSbkoMdoU1pM1sw4UYv/Dtc7OHwWBsocFrWIYMa
4vB2tNNiiCLcsaO6qOwup56vpeHxRrwnP1OPnng0CF9u1RSn3Sl4XpNwWSMgNiOyoXErWuLnOsAq
LLQWTgrPNEKe3/i7kinChIT7QvDA
next prev parent reply other threads:[~2011-01-27 9:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-26 13:53 [PATCH] Fix for vc-bzr-diff when vc-bzr-diff-switches is t Deniz Dogan
2011-01-27 1:41 ` Glenn Morris
2011-01-27 2:53 ` Deniz Dogan
2011-01-27 3:13 ` Stefan Monnier
2011-01-27 9:50 ` Deniz Dogan [this message]
2011-01-27 17:19 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTik=pb6MzuepVEepX8ZTimeXMct_GK5nqUd6BVdN@mail.gmail.com' \
--to=deniz.a.m.dogan@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.