Mercurial > emacs
diff lisp/vc-svn.el @ 107095:d1489c6b5705
add primative implementation of vc-svn-revision-table
author | Mark A. Hershberger <mah@everybody.org> |
---|---|
date | Fri, 05 Feb 2010 14:20:17 -0500 |
parents | e59c65208b1c |
children | 1918e70c8b37 0507a7e69be1 |
line wrap: on
line diff
--- a/lisp/vc-svn.el Fri Feb 05 14:09:38 2010 -0500 +++ b/lisp/vc-svn.el Fri Feb 05 14:20:17 2010 -0500 @@ -31,6 +31,10 @@ (eval-when-compile (require 'vc)) +;; Clear up the cache to force vc-call to check again and discover +;; new functions when we reload this file. +(put 'SVN 'vc-functions nil) + ;;; ;;; Customization options ;;; @@ -722,6 +726,21 @@ (beginning-of-line) (if (looking-at vc-svn-annotate-re) (match-string 1)))) +(defun vc-svn-revision-table (files) + (let ((vc-svn-revisions '())) + (with-current-buffer "*vc*" + (vc-svn-command nil 0 files "log" "-q") + (goto-char (point-min)) + (forward-line) + (let ((start (point-min)) + (loglines (buffer-substring-no-properties (point-min) + (point-max)))) + (while (string-match "^r\\([0-9]+\\) " loglines) + (push (match-string 1 loglines) vc-svn-revisions) + (setq start (+ start (match-end 0))) + (setq loglines (buffer-substring-no-properties start (point-max))))) + vc-svn-revisions))) + (provide 'vc-svn) ;; arch-tag: 02f10c68-2b4d-453a-90fc-1eee6cfb268d