emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/vc-fossil b632993 050/111: Handle switches in diff command


From: ELPA Syncer
Subject: [nongnu] elpa/vc-fossil b632993 050/111: Handle switches in diff command.
Date: Wed, 29 Sep 2021 08:59:19 -0400 (EDT)

branch: elpa/vc-fossil
commit b63299313f924b4080396c46e3c9fe09838e2413
Author: fifr <fifr>
Commit: fifr <fifr>

    Handle switches in diff command.
---
 vc/el/vc-fossil.el | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/vc/el/vc-fossil.el b/vc/el/vc-fossil.el
index 535f620..ba2f7bc 100644
--- a/vc/el/vc-fossil.el
+++ b/vc/el/vc-fossil.el
@@ -39,6 +39,22 @@
 
 (eval-when-compile (require 'vc))
 
+;;; Customization
+
+(defgroup vc-fossil nil
+  "VC Fossil backend."
+  :group 'vc)
+
+(defcustom vc-fossil-diff-switches t ; Fossil doesn't support common args like 
-u
+  "String or list of strings specifying switches for Fossil diff under VC.
+If nil, use the value of `vc-diff-switches'.  If t, use no switches."
+  :type '(choice (const :tag "Unspecified" nil)
+                 (const :tag "None" t)
+                 (string :tag "Argument String")
+                 (repeat :tag "Argument List" :value ("") string))
+  :group 'vc-fossil)
+
+
 ;;; BACKEND PROPERTIES
 
 (defun vc-fossil-revision-granularity () 'repository)
@@ -260,8 +276,10 @@ If `files` is nil return the status for all files."
   (let ((buf (or buffer "*vc-diff*")))
     (apply #'vc-fossil-command
            buf 0 file "diff" "-i"
-           `(,@(if rev1 `("--from" ,rev1) '())
-             ,@(if rev2 `("--to" ,rev2) '())))))
+           (nconc
+            (and rev1 (list "--from" rev1))
+            (and rev2 (list "--to" rev2))
+            (vc-switches 'Fossil 'diff)))))
 
 ;;; TAG SYSTEM
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]