Changeset 9819


Ignore:
Timestamp:
Jun 21, 2008, 10:01:17 PM (11 years ago)
Author:
gb
Message:

Handle Cygwin paths on Windows (for LOCAL-SVN-REVISION).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/win64/lib/misc.lisp

    r9325 r9819  
    755755(%fhave 'df #'disassemble)
    756756
     757(defloadvar *use-cygwin-svn*
     758    #+windows-target (not (null (getenv "CYGWIN")))
     759    #-windows-target nil)
     760
    757761(defun local-svn-revision ()
    758762  (or
     
    762766     (when f (read f)))
    763767   (with-output-to-string (s)
    764     (multiple-value-bind (status exit-code)
    765         (external-process-status
    766          (run-program "svnversion"  (list  (native-translated-namestring "ccl:") "/trunk/ccl"):output s))
    767       (when (and (eq :exited status) (zerop exit-code))
    768         (with-input-from-string (output (get-output-stream-string s))
    769           (let* ((line (read-line output nil nil)))
    770             (when (and line (parse-integer line :junk-allowed t) )
    771               (return-from local-svn-revision line)))))))))
     768     (let* ((root (native-translated-namestring "ccl:")))
     769       (when *use-cygwin-svn*
     770         (setq root (cygpath root)))
     771       (multiple-value-bind (status exit-code)
     772           (external-process-status
     773            (run-program "svnversion"  (list  root "/trunk/ccl"):output s))
     774         (when (and (eq :exited status) (zerop exit-code))
     775           (with-input-from-string (output (get-output-stream-string s))
     776             (let* ((line (read-line output nil nil)))
     777               (when (and line (parse-integer line :junk-allowed t) )
     778                 (return-from local-svn-revision line)))))
     779         (return-from local-svn-revision nil))))))
    772780
    773781
Note: See TracChangeset for help on using the changeset viewer.