summaryrefslogtreecommitdiff
path: root/lisp/vc-mcvs.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2003-05-08 18:25:09 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2003-05-08 18:25:09 +0000
commit1207c9d2549cd6a58482fdd2b5afdceecdd2905b (patch)
tree3ac69c0b1d06b73344bc7202e37702cd6b0b9ac3 /lisp/vc-mcvs.el
parent783764747638cc6cfcdea17303e3761b638794d5 (diff)
downloademacs-1207c9d2549cd6a58482fdd2b5afdceecdd2905b.tar.gz
(vc-mcvs-read): Don't require `file' to exist.
(vc-mcvs-diff): Don't return 0 for newly added empty files.
Diffstat (limited to 'lisp/vc-mcvs.el')
-rw-r--r--lisp/vc-mcvs.el13
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/vc-mcvs.el b/lisp/vc-mcvs.el
index e72287c417b..d7123e15fa4 100644
--- a/lisp/vc-mcvs.el
+++ b/lisp/vc-mcvs.el
@@ -150,10 +150,11 @@ of a repository; then VC only stays local for hosts that match it."
root))))
(defun vc-mcvs-read (file)
- (with-temp-buffer
- (insert-file-contents file)
- (goto-char (point-min))
- (read (current-buffer))))
+ (if (file-readable-p file)
+ (with-temp-buffer
+ (insert-file-contents file)
+ (goto-char (point-min))
+ (read (current-buffer)))))
(defun vc-mcvs-map-file (dir file)
(let ((map (vc-mcvs-read (expand-file-name "MCVS/MAP" dir)))
@@ -485,7 +486,9 @@ The changes are between FIRST-VERSION and SECOND-VERSION."
;; Note: this is NOT a "mcvs diff".
(apply 'vc-do-command "*vc-diff*"
1 "diff" file
- (append diff-switches-list '("/dev/null"))))
+ (append diff-switches-list '("/dev/null")))
+ ;; Even if it's empty, it's locally modified.
+ 1)
(setq status
(apply 'vc-mcvs-command "*vc-diff*"
(if (and (vc-mcvs-stay-local-p file)