mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 18:40:39 -08:00
* vc.el (vc-print-log-internal): Move RCS/CVS specific code ...
* vc-rcs.el (vc-rcs-print-log-cleanup): ... here. New function. (vc-rcs-print-log): Use it. * vc-cvs.el (vc-cvs-print-log): Use vc-rcs-print-log-cleanup.
This commit is contained in:
parent
e0840eefe1
commit
db167d28c6
4 changed files with 29 additions and 13 deletions
|
|
@ -1,3 +1,12 @@
|
||||||
|
2009-08-29 Dan Nicolaescu <dann@ics.uci.edu>
|
||||||
|
|
||||||
|
* vc.el (vc-print-log-internal): Move RCS/CVS specific code ...
|
||||||
|
|
||||||
|
* vc-rcs.el (vc-rcs-print-log-cleanup): ... here. New function.
|
||||||
|
(vc-rcs-print-log): Use it.
|
||||||
|
|
||||||
|
* vc-cvs.el (vc-cvs-print-log): Use vc-rcs-print-log-cleanup.
|
||||||
|
|
||||||
2009-08-29 Stefan Monnier <monnier@iro.umontreal.ca>
|
2009-08-29 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||||
|
|
||||||
* files.el (get-free-disk-space): Use / for default-directory.
|
* files.el (get-free-disk-space): Use / for default-directory.
|
||||||
|
|
|
||||||
|
|
@ -494,13 +494,18 @@ Will fail unless you have administrative privileges on the repo."
|
||||||
;;; History functions
|
;;; History functions
|
||||||
;;;
|
;;;
|
||||||
|
|
||||||
|
(declare-function vc-rcs-print-log-cleanup "vc-rcs" ())
|
||||||
|
|
||||||
(defun vc-cvs-print-log (files &optional buffer)
|
(defun vc-cvs-print-log (files &optional buffer)
|
||||||
"Get change logs associated with FILES."
|
"Get change logs associated with FILES."
|
||||||
|
(require 'vc-rcs)
|
||||||
;; It's just the catenation of the individual logs.
|
;; It's just the catenation of the individual logs.
|
||||||
(vc-cvs-command
|
(vc-cvs-command
|
||||||
buffer
|
buffer
|
||||||
(if (vc-stay-local-p files 'CVS) 'async 0)
|
(if (vc-stay-local-p files 'CVS) 'async 0)
|
||||||
files "log"))
|
files "log")
|
||||||
|
(with-current-buffer buffer
|
||||||
|
(vc-exec-after (vc-rcs-print-log-cleanup))))
|
||||||
|
|
||||||
(defun vc-cvs-comment-history (file)
|
(defun vc-cvs-comment-history (file)
|
||||||
"Get comment history of a file."
|
"Get comment history of a file."
|
||||||
|
|
|
||||||
|
|
@ -538,10 +538,23 @@ directory the operation is applied to all registered files beneath it."
|
||||||
;;; History functions
|
;;; History functions
|
||||||
;;;
|
;;;
|
||||||
|
|
||||||
|
(defun vc-rcs-print-log-cleanup ()
|
||||||
|
(let ((inhibit-read-only t))
|
||||||
|
(goto-char (point-max))
|
||||||
|
(forward-line -1)
|
||||||
|
(while (looking-at "=*\n")
|
||||||
|
(delete-char (- (match-end 0) (match-beginning 0)))
|
||||||
|
(forward-line -1))
|
||||||
|
(goto-char (point-min))
|
||||||
|
(when (looking-at "[\b\t\n\v\f\r ]+")
|
||||||
|
(delete-char (- (match-end 0) (match-beginning 0))))))
|
||||||
|
|
||||||
(defun vc-rcs-print-log (files &optional buffer)
|
(defun vc-rcs-print-log (files &optional buffer)
|
||||||
"Get change log associated with FILE. If FILE is a
|
"Get change log associated with FILE. If FILE is a
|
||||||
directory the operation is applied to all registered files beneath it."
|
directory the operation is applied to all registered files beneath it."
|
||||||
(vc-do-command (or buffer "*vc*") 0 "rlog" (mapcar 'vc-name (vc-expand-dirs files))))
|
(vc-do-command (or buffer "*vc*") 0 "rlog" (mapcar 'vc-name (vc-expand-dirs files)))
|
||||||
|
(with-current-buffer (or buffer "*vc*")
|
||||||
|
(vc-rcs-print-log-cleanup)))
|
||||||
|
|
||||||
(defun vc-rcs-diff (files &optional oldvers newvers buffer)
|
(defun vc-rcs-diff (files &optional oldvers newvers buffer)
|
||||||
"Get a difference report using RCS between two sets of files."
|
"Get a difference report using RCS between two sets of files."
|
||||||
|
|
|
||||||
11
lisp/vc.el
11
lisp/vc.el
|
|
@ -1834,17 +1834,6 @@ allowed and simply skipped)."
|
||||||
(set (make-local-variable 'log-view-vc-backend) ',backend)
|
(set (make-local-variable 'log-view-vc-backend) ',backend)
|
||||||
(set (make-local-variable 'log-view-vc-fileset) ',files)
|
(set (make-local-variable 'log-view-vc-fileset) ',files)
|
||||||
|
|
||||||
;; FIXME: this seems to apply only to RCS/CVS, it doesn't quite
|
|
||||||
;; belong here in the generic code.
|
|
||||||
(goto-char (point-max))
|
|
||||||
(forward-line -1)
|
|
||||||
(while (looking-at "=*\n")
|
|
||||||
(delete-char (- (match-end 0) (match-beginning 0)))
|
|
||||||
(forward-line -1))
|
|
||||||
(goto-char (point-min))
|
|
||||||
(when (looking-at "[\b\t\n\v\f\r ]+")
|
|
||||||
(delete-char (- (match-end 0) (match-beginning 0))))
|
|
||||||
|
|
||||||
(shrink-window-if-larger-than-buffer)
|
(shrink-window-if-larger-than-buffer)
|
||||||
;; move point to the log entry for the working revision
|
;; move point to the log entry for the working revision
|
||||||
(vc-call-backend ',backend 'show-log-entry ',working-revision)
|
(vc-call-backend ',backend 'show-log-entry ',working-revision)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue