647 |
it is finished." |
it is finished." |
648 |
(when (memq (process-status proc) '(signal exit)) |
(when (memq (process-status proc) '(signal exit)) |
649 |
(let ((cvs-postproc (process-get proc 'cvs-postprocess)) |
(let ((cvs-postproc (process-get proc 'cvs-postprocess)) |
650 |
(cvs-buf (process-get proc 'cvs-buffer))) |
(cvs-buf (process-get proc 'cvs-buffer)) |
651 |
|
(procbuf (process-buffer proc))) |
652 |
|
(unless (buffer-live-p cvs-buf) (setq cvs-buf nil)) |
653 |
|
(unless (buffer-live-p procbuf) (setq procbuf nil)) |
654 |
;; Since the buffer and mode line will show that the |
;; Since the buffer and mode line will show that the |
655 |
;; process is dead, we can delete it now. Otherwise it |
;; process is dead, we can delete it now. Otherwise it |
656 |
;; will stay around until M-x list-processes. |
;; will stay around until M-x list-processes. |
657 |
(process-put proc 'postprocess nil) |
(process-put proc 'postprocess nil) |
658 |
(delete-process proc) |
(delete-process proc) |
659 |
;; Don't do anything if the main buffer doesn't exist any more. |
;; Don't do anything if the main buffer doesn't exist any more. |
660 |
(when (buffer-live-p cvs-buf) |
(when cvs-buf |
661 |
(with-current-buffer cvs-buf |
(with-current-buffer cvs-buf |
662 |
(cvs-update-header (process-get proc 'cvs-header) nil) |
(cvs-update-header (process-get proc 'cvs-header) nil) |
663 |
(setq cvs-mode-line-process (symbol-name (process-status proc))) |
(setq cvs-mode-line-process (symbol-name (process-status proc))) |
664 |
(force-mode-line-update) |
(force-mode-line-update) |
665 |
(when cvs-postproc |
(when cvs-postproc |
666 |
(if (null (buffer-live-p (process-buffer proc))) |
(if (null procbuf) |
667 |
;;(set-process-buffer proc nil) |
;;(set-process-buffer proc nil) |
668 |
(error "cvs' process buffer was killed") |
(error "cvs' process buffer was killed") |
669 |
(with-current-buffer (process-buffer proc) |
(with-current-buffer procbuf |
670 |
;; do the postprocessing like parsing and such |
;; Do the postprocessing like parsing and such. |
671 |
(save-excursion (eval cvs-postproc)) |
(save-excursion (eval cvs-postproc))))))) |
672 |
;; check whether something is left |
;; Check whether something is left. |
673 |
(unless (get-buffer-process (current-buffer)) |
(when (and procbuf (not (get-buffer-process procbuf))) |
674 |
;; IIRC, we enable undo again once the process is finished |
(with-current-buffer procbuf |
675 |
;; for cases where the output was inserted in *vc-diff* or |
;; IIRC, we enable undo again once the process is finished |
676 |
;; in a file-like buffer. --Stef |
;; for cases where the output was inserted in *vc-diff* or |
677 |
(buffer-enable-undo) |
;; in a file-like buffer. --Stef |
678 |
(with-current-buffer cvs-buffer |
(buffer-enable-undo) |
679 |
(message "CVS process has completed in %s" |
(with-current-buffer (or cvs-buf (current-buffer)) |
680 |
(buffer-name)))))))))))) |
(message "CVS process has completed in %s" |
681 |
|
(buffer-name)))))))) |
682 |
|
|
683 |
(defun cvs-parse-process (dcd &optional subdir old-fis) |
(defun cvs-parse-process (dcd &optional subdir old-fis) |
684 |
"Parse the output of a cvs process. |
"Parse the output of a cvs process. |