# HG changeset patch # User Andr Spiegel # Date 972659266 0 # Node ID 846bba8718d87fb11d93d766aa08ca2ebfd896f7 # Parent 451f8d2802e46111feda6ea90269ebdb56649d68 (vc-cvs-merge-news): Be prepared for no news at all. diff -r 451f8d2802e4 -r 846bba8718d8 lisp/ChangeLog --- a/lisp/ChangeLog Fri Oct 27 14:58:46 2000 +0000 +++ b/lisp/ChangeLog Fri Oct 27 15:07:46 2000 +0000 @@ -11,7 +11,8 @@ * vc-cvs.el (vc-cvs-checkin): Check both status and error message after command. If there's an unexpected error, signal it instead of being silent. - + (vc-cvs-merge-news): Be prepared for no news at all. + 2000-10-27 Miles Bader * shell.el (shell): Add BUFFER argument. diff -r 451f8d2802e4 -r 846bba8718d8 lisp/vc-cvs.el --- a/lisp/vc-cvs.el Fri Oct 27 14:58:46 2000 +0000 +++ b/lisp/vc-cvs.el Fri Oct 27 15:07:46 2000 +0000 @@ -5,7 +5,7 @@ ;; Author: FSF (see vc.el for full credits) ;; Maintainer: Andre Spiegel -;; $Id: vc-cvs.el,v 1.6 2000/10/22 15:31:11 spiegel Exp $ +;; $Id: vc-cvs.el,v 1.7 2000/10/27 11:37:17 spiegel Exp $ ;; This file is part of GNU Emacs. @@ -422,31 +422,33 @@ (vc-file-setprop file 'vc-workfile-version nil)) ;; get file status (prog1 - (if (re-search-forward - (concat "^\\([CMUP] \\)?" - (regexp-quote (file-name-nondirectory file)) - "\\( already contains the differences between \\)?") - nil t) - (cond - ;; Merge successful, we are in sync with repository now - ((or (match-string 2) - (string= (match-string 1) "U ") - (string= (match-string 1) "P ")) - (vc-file-setprop file 'vc-state 'up-to-date) - (vc-file-setprop file 'vc-checkout-time - (nth 5 (file-attributes file))) - 0);; indicate success to the caller - ;; Merge successful, but our own changes are still in the file - ((string= (match-string 1) "M ") - (vc-file-setprop file 'vc-state 'edited) - 0);; indicate success to the caller - ;; Conflicts detected! - (t - (vc-file-setprop file 'vc-state 'edited) - 1);; signal the error to the caller - ) - (pop-to-buffer "*vc*") - (error "Couldn't analyze cvs update result")) + (if (eq (buffer-size) 0) + 0 ;; there were no news; indicate success + (if (re-search-forward + (concat "^\\([CMUP] \\)?" + (regexp-quote (file-name-nondirectory file)) + "\\( already contains the differences between \\)?") + nil t) + (cond + ;; Merge successful, we are in sync with repository now + ((or (match-string 2) + (string= (match-string 1) "U ") + (string= (match-string 1) "P ")) + (vc-file-setprop file 'vc-state 'up-to-date) + (vc-file-setprop file 'vc-checkout-time + (nth 5 (file-attributes file))) + 0);; indicate success to the caller + ;; Merge successful, but our own changes are still in the file + ((string= (match-string 1) "M ") + (vc-file-setprop file 'vc-state 'edited) + 0);; indicate success to the caller + ;; Conflicts detected! + (t + (vc-file-setprop file 'vc-state 'edited) + 1);; signal the error to the caller + ) + (pop-to-buffer "*vc*") + (error "Couldn't analyze cvs update result"))) (message "Merging changes into %s...done" file)))) (defun vc-cvs-check-headers ()