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

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

[nongnu] elpa/vc-fossil 141937e 062/111: Fix checkout command for specia


From: ELPA Syncer
Subject: [nongnu] elpa/vc-fossil 141937e 062/111: Fix checkout command for special revisions.
Date: Wed, 29 Sep 2021 08:59:21 -0400 (EDT)

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

    Fix checkout command for special revisions.
    
    According to the documentation, special values of the REV argument
    should checkout certain versions of the file:
    
     * t should checkout head of current branch
     * "" should checkout head of trunk
     * nil should checkout the working version
     * explicit revision should checkout that revision
---
 vc/el/vc-fossil.el | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/vc/el/vc-fossil.el b/vc/el/vc-fossil.el
index b12c5e4..be99b7f 100644
--- a/vc/el/vc-fossil.el
+++ b/vc/el/vc-fossil.el
@@ -222,11 +222,12 @@ If `files` is nil return the status for all files."
 (defun vc-fossil-checkout (file &optional editable rev)
   (apply #'vc-fossil-command nil 0 file
          "update"
-         (append (cond
-                  ((eq rev t) nil)
-                  (rev (list rev))
-                  (t nil))
-                 (vc-switches 'Fossil 'checkout))))
+         (nconc
+          (cond
+           ((eq rev t) (list "current"))
+           ((equal rev "") (list "trunk"))
+           ((stringp rev) (list rev)))
+          (vc-switches 'Fossil 'checkout))))
 
 (defun vc-fossil-revert (file &optional contents-done)
   "Revert FILE to the version stored in the fossil repository."



reply via email to

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