From 00cfcf93d15d1f494ac0f0d36c16ec44e5c71d45 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Wed, 31 May 2006 01:18:36 +0000 Subject: [PATCH] Prevent error visiting svn-managed file when "svn" not installed. --- v7/src/edwin/vc.scm | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/v7/src/edwin/vc.scm b/v7/src/edwin/vc.scm index 842e9feab..a74334535 100644 --- a/v7/src/edwin/vc.scm +++ b/v7/src/edwin/vc.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: vc.scm,v 1.90 2006/04/24 01:12:12 cph Exp $ +$Id: vc.scm,v 1.91 2006/05/31 01:18:36 cph Exp $ Copyright 1994,1995,1996,1997,1998,2000 Massachusetts Institute of Technology Copyright 2001,2002,2003,2005,2006 Massachusetts Institute of Technology @@ -2207,15 +2207,18 @@ the value of vc-log-mode-hook." status))) (define (%get-svn-status workfile) - (let ((port (open-output-string))) - (let ((status - (run-synchronous-subprocess - "svn" - (list "status" "--verbose" (file-namestring workfile)) - 'output port - 'working-directory (directory-pathname workfile)))) - (and (eqv? status 0) - (get-output-string port))))) + (let ((directory (directory-pathname workfile))) + (let ((program (os/find-program "svn" directory #!default #f))) + (and program + (let ((port (open-output-string))) + (let ((status + (run-synchronous-subprocess + path + (list "status" "--verbose" (file-namestring workfile)) + 'output port + 'working-directory directory))) + (and (eqv? status 0) + (get-output-string port)))))))) (define (parse-svn-status status) (and status -- 2.25.1