aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert1993-06-30 21:35:59 +0000
committerPaul Eggert1993-06-30 21:35:59 +0000
commit4b40fdea8fa54bdbe3824daeaa27dbacaae040a2 (patch)
treede3e61a56ac7cbe4af3c75d24ff834b80542d4a5
parent66f55a9d0cc58190f9521809d6aa37bb7884ddce (diff)
downloademacs-4b40fdea8fa54bdbe3824daeaa27dbacaae040a2.tar.gz
emacs-4b40fdea8fa54bdbe3824daeaa27dbacaae040a2.zip
(vc-update-change-log): Ensure that file names inserted into a ChangeLog
are relative to that ChangeLog.
-rw-r--r--lisp/vc.el29
1 files changed, 23 insertions, 6 deletions
diff --git a/lisp/vc.el b/lisp/vc.el
index 27490df9b9d..01b8b26d3bc 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -1115,6 +1115,7 @@ A prefix argument means do not revert the buffer afterwards."
1115The mark is left at the end of the text prepended to the change log. 1115The mark is left at the end of the text prepended to the change log.
1116With prefix arg of C-u, only find log entries for the current buffer's file. 1116With prefix arg of C-u, only find log entries for the current buffer's file.
1117With any numeric prefix arg, find log entries for all files currently visited. 1117With any numeric prefix arg, find log entries for all files currently visited.
1118Otherwise, find log entries for all registered files in the default directory.
1118From a program, any arguments are passed to the `rcs2log' script." 1119From a program, any arguments are passed to the `rcs2log' script."
1119 (interactive 1120 (interactive
1120 (cond ((consp current-prefix-arg) ;C-u 1121 (cond ((consp current-prefix-arg) ;C-u
@@ -1126,9 +1127,18 @@ From a program, any arguments are passed to the `rcs2log' script."
1126 (while buffers 1127 (while buffers
1127 (setq file (buffer-file-name (car buffers))) 1128 (setq file (buffer-file-name (car buffers)))
1128 (and file (vc-backend-deduce file) 1129 (and file (vc-backend-deduce file)
1129 (setq files (cons (file-relative-name file) files))) 1130 (setq files (cons file files)))
1130 (setq buffers (cdr buffers))) 1131 (setq buffers (cdr buffers)))
1131 files)))) 1132 files))
1133 (t
1134 (let ((RCS (concat default-directory "RCS")))
1135 (and (file-directory-p RCS)
1136 (mapcar (function
1137 (lambda (f)
1138 (if (string-match "\\(.*\\),v$" f)
1139 (substring f 0 (match-end 1))
1140 f)))
1141 (directory-files RCS nil "...\\|^[^.]\\|^.[^.]")))))))
1132 (let ((odefault default-directory)) 1142 (let ((odefault default-directory))
1133 (find-file-other-window (find-change-log)) 1143 (find-file-other-window (find-change-log))
1134 (barf-if-buffer-read-only) 1144 (barf-if-buffer-read-only)
@@ -1137,10 +1147,17 @@ From a program, any arguments are passed to the `rcs2log' script."
1137 (goto-char (point-min)) 1147 (goto-char (point-min))
1138 (push-mark) 1148 (push-mark)
1139 (message "Computing change log entries...") 1149 (message "Computing change log entries...")
1140 (let ((default-directory odefault)) 1150 (message "Computing change log entries... %s"
1141 (message "Computing change log entries... %s" 1151 (if (or (null args)
1142 (if (eq 0 (apply 'call-process "rcs2log" nil t nil args)) 1152 (eq 0 (apply 'call-process "rcs2log" nil t nil
1143 "done" "failed"))))) 1153 (mapcar (function
1154 (lambda (f)
1155 (file-relative-name
1156 (if (file-name-absolute-p f)
1157 f
1158 (concat odefault f)))))
1159 args))))
1160 "done" "failed"))))
1144 1161
1145;; Functions for querying the master and lock files. 1162;; Functions for querying the master and lock files.
1146 1163