Mercurial > emacs
comparison lisp/vc-mcvs.el @ 91302:56a72e2bd635
Merge from emacs--devo--0
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-306
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sat, 29 Dec 2007 02:39:17 +0000 |
parents | 2fcaae6177a5 c5df210848ca |
children | 606f2d163a64 |
comparison
equal
deleted
inserted
replaced
91301:7774e5860c70 | 91302:56a72e2bd635 |
---|---|
176 | 176 |
177 | 177 |
178 (defalias 'vc-mcvs-state-heuristic 'vc-cvs-state-heuristic) | 178 (defalias 'vc-mcvs-state-heuristic 'vc-cvs-state-heuristic) |
179 | 179 |
180 (defun vc-mcvs-dir-state (dir) | 180 (defun vc-mcvs-dir-state (dir) |
181 "Find the Meta-CVS state of all files in DIR." | 181 "Find the Meta-CVS state of all files in DIR and subdirectories." |
182 ;; if DIR is not under Meta-CVS control, don't do anything. | 182 ;; if DIR is not under Meta-CVS control, don't do anything. |
183 (when (file-readable-p (expand-file-name "MCVS/CVS/Entries" dir)) | 183 (when (file-readable-p (expand-file-name "MCVS/CVS/Entries" dir)) |
184 (if (vc-stay-local-p dir) | 184 (if (vc-stay-local-p dir) |
185 (vc-mcvs-dir-state-heuristic dir) | 185 (vc-mcvs-dir-state-heuristic dir) |
186 (let ((default-directory dir)) | 186 (let ((default-directory dir)) |
187 ;; Don't specify DIR in this command, the default-directory is | 187 ;; Don't specify DIR in this command, the default-directory is |
188 ;; enough. Otherwise it might fail with remote repositories. | 188 ;; enough. Otherwise it might fail with remote repositories. |
189 (with-temp-buffer | 189 (with-temp-buffer |
190 (buffer-disable-undo) ;; Because these buffers can get huge | |
190 (setq default-directory (vc-mcvs-root dir)) | 191 (setq default-directory (vc-mcvs-root dir)) |
191 (vc-mcvs-command t 0 nil "status" "-l") | 192 (vc-mcvs-command t 0 nil "status") |
192 (goto-char (point-min)) | 193 (goto-char (point-min)) |
193 (while (re-search-forward "^=+\n\\([^=\n].*\n\\|\n\\)+" nil t) | 194 (while (re-search-forward "^=+\n\\([^=\n].*\n\\|\n\\)+" nil t) |
194 (narrow-to-region (match-beginning 0) (match-end 0)) | 195 (narrow-to-region (match-beginning 0) (match-end 0)) |
195 (vc-cvs-parse-status) | 196 (vc-cvs-parse-status) |
196 (goto-char (point-max)) | 197 (goto-char (point-max)) |
430 ) | 431 ) |
431 (pop-to-buffer "*vc*") | 432 (pop-to-buffer "*vc*") |
432 (error "Couldn't analyze mcvs update result"))) | 433 (error "Couldn't analyze mcvs update result"))) |
433 (message "Merging changes into %s...done" file)))) | 434 (message "Merging changes into %s...done" file)))) |
434 | 435 |
436 (defun vc-mcvs-modify-change-comment (files rev comment) | |
437 "Modify the change comments for FILES on a specified REV. | |
438 Will fail unless you have administrative privileges on the repo." | |
439 (vc-mcvs-command nil 0 files "rcs" (concat "-m" comment ":" rev))) | |
440 | |
441 | |
435 ;;; | 442 ;;; |
436 ;;; History functions | 443 ;;; History functions |
437 ;;; | 444 ;;; |
438 | 445 |
439 (defun vc-mcvs-print-log (files &optional buffer) | 446 (defun vc-mcvs-print-log (files &optional buffer) |