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

    Refactor find-revision command.
---
 vc/el/vc-fossil.el | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/vc/el/vc-fossil.el b/vc/el/vc-fossil.el
index ed3cf5d..b12c5e4 100644
--- a/vc/el/vc-fossil.el
+++ b/vc/el/vc-fossil.el
@@ -213,13 +213,11 @@ If `files` is nil return the status for all files."
          (vc-switches 'Fossil 'checkin)))
 
 (defun vc-fossil-find-revision (file rev buffer)
-  (if (zerop (length rev))
-      (apply #'vc-fossil-command buffer 0 file
-             "cat"
-             (vc-switches 'Fossil 'checkout))
-    (apply #'vc-fossil-command buffer 0 file
-           "cat" "-r" rev
-           (vc-switches 'Fossil 'checkout))))
+  (apply #'vc-fossil-command buffer 0 file
+         "cat"
+         (nconc
+          (unless (zerop (length rev)) (list "-r" rev))
+          (vc-switches 'Fossil 'checkout))))
 
 (defun vc-fossil-checkout (file &optional editable rev)
   (apply #'vc-fossil-command nil 0 file

Reply via email to