From: Glenn Morris Date: Sat, 22 Nov 2008 03:34:55 +0000 (+0000) Subject: (vc-mtn-diff-switches): New option. X-Git-Tag: emacs-pretest-23.0.90~1646 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a857238c11e6a30e2168a43c0ae78a1bd93bf7b5;p=emacs.git (vc-mtn-diff-switches): New option. (vc-mtn-program): Rename from vc-mtn-command, for consistency with other backends. Keep old name as alias. Update callers. Make it a defcustom. (vc-mtn-diff): Give it a doc string. Apply diff switches. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 00a56524b34..ded553a01f4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,30 @@ +2008-11-22 Glenn Morris + + * vc-mtn.el (vc-mtn-diff-switches): New option. + (vc-mtn-program): Rename from vc-mtn-command, for + consistency with other backends. Keep old name as alias. + Update callers. Make it a defcustom. + (vc-mtn-diff): Give it a doc string. Apply diff switches. + + * vc-arch.el (vc-arch-program): Rename from vc-arch-command, for + consistency with other backends. Keep old name as alias. + Make it a defcustom. + (vc-arch-command, vc-arch-trim-revlib): Adapt for above change. + + * vc-hg.el (vc-hg-program): New option. + (vc-hg-state, vc-hg-working-revision, vc-hg-command): + Use vc-hg-program rather than hard-coded "hg". + + * vc-svn.el: Remove leading `*' from defcustom doc-strings. + (vc-svn-program): Move defcustom to start. + (vc-svn-create-repo, vc-svn-modify-change-comment): + Use vc-svn-program rather than hard-coded "svn". + + * menu-bar.el: Stylistic consistency fixes for various menu and + help texts. + + * kmacro.el (kmacro-insert-counter): Doc fix. + 2008-11-21 Ivan Shmakov (tiny change) * progmodes/tcl.el (tcl-filter): Don't forcibly move point. diff --git a/lisp/vc-mtn.el b/lisp/vc-mtn.el index 42defb6f233..f5fffb7fc87 100644 --- a/lisp/vc-mtn.el +++ b/lisp/vc-mtn.el @@ -33,12 +33,30 @@ (eval-when-compile (require 'cl) (require 'vc)) +(defcustom vc-mtn-diff-switches t + "String or list of strings specifying switches for monotone diff under VC. +If nil, use the value of `vc-diff-switches'. +If you want to force an empty list of arguments, use t." + :type '(choice (const :tag "Unspecified" nil) + (const :tag "None" t) + (string :tag "Argument String") + (repeat :tag "Argument List" + :value ("") + string)) + :version "23.1" + :group 'vc) + +(define-obsolete-variable-alias 'vc-mtn-command 'vc-mtn-program "23.1") +(defcustom vc-mtn-program "mtn" + "Name of the monotone executable." + :type 'string + :group 'vc) + ;; Clear up the cache to force vc-call to check again and discover ;; new functions when we reload this file. (put 'Mtn 'vc-functions nil) -(defvar vc-mtn-command "mtn") -(unless (executable-find vc-mtn-command) +(unless (executable-find vc-mtn-program) ;; vc-mtn.el is 100% non-functional without the `mtn' executable. (setq vc-handled-backends (delq 'Mtn vc-handled-backends))) @@ -75,7 +93,8 @@ (let ((process-environment ;; Avoid localization of messages so we can parse the output. (cons "LC_MESSAGES=C" process-environment))) - (apply 'vc-do-command (or buffer "*vc*") okstatus vc-mtn-command files flags))) + (apply 'vc-do-command (or buffer "*vc*") okstatus vc-mtn-program + files flags))) (defun vc-mtn-state (file) ;; If `mtn' fails or returns status>0, or if the search files, just @@ -183,8 +202,11 @@ ;; ) (defun vc-mtn-diff (files &optional rev1 rev2 buffer) + "Get a difference report using monotone between two revisions of FILES." (apply 'vc-mtn-command (or buffer "*vc-diff*") 1 files "diff" - (append (if rev1 (list "-r" rev1)) (if rev2 (list "-r" rev2))))) + (append + (vc-switches (if vc-mtn-diff-switches 'mtn) 'diff) + (if rev1 (list "-r" rev1)) (if rev2 (list "-r" rev2))))) (defun vc-mtn-annotate-command (file buf &optional rev) (apply 'vc-mtn-command buf 0 file "annotate"