aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorAndrĂ© Spiegel <[email protected]>2000-10-27 15:07:46 +0000
committerAndrĂ© Spiegel <[email protected]>2000-10-27 15:07:46 +0000
commite1483c383115cc874a07ce2353567125ec36941f (patch)
treebefe3b720506c956bac316c33f99a7ac68667766 /lisp
parentb6ce6e3f79b0ea1f2c3c0c88f57f5f3094c334f1 (diff)
(vc-cvs-merge-news): Be prepared for no news at all.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/vc-cvs.el54
2 files changed, 30 insertions, 27 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5e1e3a6e21..8bffdf12c6 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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 <[email protected]>
* shell.el (shell): Add BUFFER argument.
diff --git a/lisp/vc-cvs.el b/lisp/vc-cvs.el
index fbe6b9a2b3..e1665068e1 100644
--- a/lisp/vc-cvs.el
+++ b/lisp/vc-cvs.el
@@ -5,7 +5,7 @@
;; Author: FSF (see vc.el for full credits)
;; Maintainer: Andre Spiegel <[email protected]>
-;; $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 @@ The changes are between FIRST-VERSION and SECOND-VERSION."
(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 ()