]> git.eshelyaron.com Git - emacs.git/commitdiff
* vc.el (vc-print-log-internal): Move RCS/CVS specific code ...
authorDan Nicolaescu <dann@ics.uci.edu>
Sat, 29 Aug 2009 18:56:12 +0000 (18:56 +0000)
committerDan Nicolaescu <dann@ics.uci.edu>
Sat, 29 Aug 2009 18:56:12 +0000 (18:56 +0000)
* 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.

lisp/ChangeLog
lisp/vc-cvs.el
lisp/vc-rcs.el
lisp/vc.el

index 80b4ff118812a63f2fc5a1be66ce8f59cfdf5c84..4bf474b62dbc248317f11db15681b009ba9814a3 100644 (file)
@@ -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>
 
        * files.el (get-free-disk-space): Use / for default-directory.
index 33571c10c31cb92629713a58264f44c5075c6dbd..55a03d7990006818de7d6fb9bf43a33ef48d1761 100644 (file)
@@ -494,13 +494,18 @@ Will fail unless you have administrative privileges on the repo."
 ;;; History functions
 ;;;
 
+(declare-function vc-rcs-print-log-cleanup "vc-rcs" ())
+
 (defun vc-cvs-print-log (files &optional buffer)
   "Get change logs associated with FILES."
+  (require 'vc-rcs)
   ;; It's just the catenation of the individual logs.
   (vc-cvs-command
    buffer
    (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)
   "Get comment history of a file."
index ffb6d21c638f8dcbe7ba0acf962e7562bd0e8ebf..95ed4ac2f644eb7e4c694491e29d9b51e646f542 100644 (file)
@@ -538,10 +538,23 @@ directory the operation is applied to all registered files beneath it."
 ;;; 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)
   "Get change log associated with FILE.  If FILE is a
 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)
   "Get a difference report using RCS between two sets of files."
index f9a89d1dece11361a3afcb4d88c72ddb711570ac..fd95d86c5e1773e3e8cdd0878e93695a7b27f650 100644 (file)
@@ -1834,17 +1834,6 @@ allowed and simply skipped)."
       (set (make-local-variable 'log-view-vc-backend) ',backend)
       (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)
       ;; move point to the log entry for the working revision
       (vc-call-backend ',backend 'show-log-entry ',working-revision)