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."