X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=main.lisp;h=a6cf82f19533decbaa14bc844c2aa6c2a002d102;hb=a567ca7005e52873467abcb41912ebe3edb407e4;hp=85c3aff36b8d47353112d7e553563340393b5371;hpb=5d66ace14bf1d859d364e0004335d1a6800e0d40;p=vcs-tree.git diff --git a/main.lisp b/main.lisp index 85c3aff..a6cf82f 100644 --- a/main.lisp +++ b/main.lisp @@ -9,7 +9,7 @@ ;;;; ;;;; Process all subdirectories that are managed by either CVS or SVN ;;;; -;;;; $Id: xlunit.asd 7061 2003-09-07 06:34:45Z kevin $ +;;;; $Id$ ;;;; ************************************************************************* @@ -100,23 +100,24 @@ Returns a list of directories managed by CVS or SVN." (defun process-vcs-directory (dir action options) (flet ((process (dir type-name) - (let ((cmd - (ecase action - (:update - (format nil "~A update" type-name)) - (:status - (format nil "~A status" type-name)) - (:commit - (format nil "~A commit~A" type-name - (aif (find "m" options :key #'car :test 'string=) - (format nil " -m \"~A\"" (cdr it)) - "")))))) + (let* ((vcs-cmd + (ecase action + (:update + (format nil "~A update" type-name)) + (:status + (format nil "~A status" type-name)) + (:commit + (format nil "~A commit~A" type-name + (aif (find "m" options :key #'car :test 'string=) + (format nil " -m \"~A\"" (cdr it)) + ""))))) + (cmd (format nil "(cd ~A; ~A)" (namestring dir) vcs-cmd))) + (format t "~A ~A:~%" vcs-cmd (namestring dir)) (multiple-value-bind (output error status) - (shell-command-output cmd :directory dir :whole t) + (shell-command-output cmd :directory dir :whole t) (if (zerop status) - (format t "~A ~A: ~A~%" cmd (namestring dir) output) - (format t "~A ~A: ~A ~A ~A~%" cmd (namestring dir) output - error status)))))) + (format t "~A~%" output) + (format t "Exit status ~D: ~A ~A~%" status output error)))))) (cond ((is-cvs-managed dir) (process dir "cvs"))