comparison lisp/vc-cvs.el @ 37358:ae55f4048b3b

(vc-cvs-print-log, vc-cvs-diff): Don't invoke CVS as an async subprocess if start-process is unavailable. Suggested by Tim Van Holder <tim.van.holder@pandora.be>.
author Eli Zaretskii <eliz@gnu.org>
date Tue, 17 Apr 2001 05:59:57 +0000
parents 22fd463447c3
children 6934c28c6bc5
comparison
equal deleted inserted replaced
37357:ad563f9185fb 37358:ae55f4048b3b
3 ;; Copyright (C) 1995,98,99,2000,2001 Free Software Foundation, Inc. 3 ;; Copyright (C) 1995,98,99,2000,2001 Free Software Foundation, Inc.
4 4
5 ;; Author: FSF (see vc.el for full credits) 5 ;; Author: FSF (see vc.el for full credits)
6 ;; Maintainer: Andre Spiegel <spiegel@gnu.org> 6 ;; Maintainer: Andre Spiegel <spiegel@gnu.org>
7 7
8 ;; $Id: vc-cvs.el,v 1.20 2001/02/02 07:21:21 spiegel Exp $ 8 ;; $Id: vc-cvs.el,v 1.21 2001/03/10 10:49:05 spiegel Exp $
9 9
10 ;; This file is part of GNU Emacs. 10 ;; This file is part of GNU Emacs.
11 11
12 ;; GNU Emacs is free software; you can redistribute it and/or modify 12 ;; GNU Emacs is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by 13 ;; it under the terms of the GNU General Public License as published by
459 ;;; History functions 459 ;;; History functions
460 ;;; 460 ;;;
461 461
462 (defun vc-cvs-print-log (file) 462 (defun vc-cvs-print-log (file)
463 "Get change log associated with FILE." 463 "Get change log associated with FILE."
464 (vc-do-command nil (if (vc-cvs-stay-local-p file) 'async 0) 464 (vc-do-command
465 "cvs" file "log")) 465 nil
466 (if (and (vc-cvs-stay-local-p file) (fboundp 'start-process)) 'async 0)
467 "cvs" file "log"))
466 468
467 (defun vc-cvs-show-log-entry (version) 469 (defun vc-cvs-show-log-entry (version)
468 (when (re-search-forward 470 (when (re-search-forward
469 ;; also match some context, for safety 471 ;; also match some context, for safety
470 (concat "----\nrevision " version 472 (concat "----\nrevision " version
507 (apply 'vc-do-command "*vc-diff*" 509 (apply 'vc-do-command "*vc-diff*"
508 1 "diff" file 510 1 "diff" file
509 (append diff-switches-list '("/dev/null")))) 511 (append diff-switches-list '("/dev/null"))))
510 (setq status 512 (setq status
511 (apply 'vc-do-command "*vc-diff*" 513 (apply 'vc-do-command "*vc-diff*"
512 (if (vc-cvs-stay-local-p file) 'async 1) 514 (if (and (vc-cvs-stay-local-p file)
515 (fboundp 'start-process))
516 'async
517 1)
513 "cvs" file "diff" 518 "cvs" file "diff"
514 (and oldvers (concat "-r" oldvers)) 519 (and oldvers (concat "-r" oldvers))
515 (and newvers (concat "-r" newvers)) 520 (and newvers (concat "-r" newvers))
516 diff-switches-list)) 521 diff-switches-list))
517 (if (vc-cvs-stay-local-p file) 522 (if (vc-cvs-stay-local-p file)