Changeset 12113


Ignore:
Timestamp:
May 22, 2009, 11:01:26 AM (10 years ago)
Author:
gb
Message:

Use the value of CCL:*SVN-PROGRAM*. Check to see if svn can be found
by RUN-PROGRAM (which looks for non-absolute program names on $PATH);
display an alert if not.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/cocoa-ide/ide-self-update.lisp

    r12058 r12113  
    180180  (let* ((result-status nil)
    181181         (info (with-output-to-string (out)
    182                  (run-program "svn" `("info" ,p)
     182                 (run-program *svn-program* `("info" ,p)
    183183                              :output out
    184184                              :status-hook (lambda (ep)
     
    194194(defmethod svn-update ((p string))
    195195  (let ((result-status nil))
    196     (run-program "svn" `("update" ,p)
     196    (run-program *svn-program* `("update" ,p)
    197197               :status-hook (lambda (ep)
    198198                              (multiple-value-bind (status status-code)
     
    224224(defun svn-revision ()
    225225  (svn-info-component "Revision:"))
     226
     227(defun check-svn ()
     228  (multiple-value-bind (status exit-code)
     229      (external-process-status
     230       (run-program *svn-program* '("--version" "--quiet")))
     231    (and (eq status :exited)
     232         (eql exit-code 0))))
    226233
    227234;;; -----------------------------------------------------------------
     
    376383                                      sender)
    377384  (declare (ignore sender))
    378   (if (gui::with-modal-progress-dialog "Checking for Updates..."
     385  (if (check-svn)
     386    (if (gui::with-modal-progress-dialog "Checking for Updates..."
    379387        "Checking for new CCL changes..."
    380388       (svn-update-available-p))
     
    391399      ;; no newer version available; display an informative alert window
    392400      (gui::alert-window :title "No Update Available"
    393                          :message "No update is available. Your copy of CCL is up-to-date.")))
    394 
     401                         :message "No update is available. Your copy of CCL is up-to-date."))
     402    ;; Can't execute svn.
     403    (gui::alert-window :title "Can't run svn."
     404                       :message "The \"svn\" program doesn't appear to be instaled correctly.  Setting CCL::*SVN-PROGRAM* to the full pathname of your \"svn\" program may fix this.")))
     405
Note: See TracChangeset for help on using the changeset viewer.