emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r99457: add primative implementation


From: Mark A. Hershberger
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r99457: add primative implementation of vc-svn-revision-table
Date: Fri, 05 Feb 2010 14:20:17 -0500
User-agent: Bazaar (2.0.2)

------------------------------------------------------------
revno: 99457
committer: Mark A. Hershberger <address@hidden>
branch nick: local
timestamp: Fri 2010-02-05 14:20:17 -0500
message:
  add primative implementation of vc-svn-revision-table
modified:
  lisp/ChangeLog
  lisp/vc-svn.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-02-05 11:15:28 +0000
+++ b/lisp/ChangeLog    2010-02-05 19:20:17 +0000
@@ -1,3 +1,7 @@
+2010-02-05  Mark A. Hershberger  <address@hidden>
+
+       * vc-svn.el (vc-svn-revision-table): New function.
+
 2010-02-05  Michael Albinus  <address@hidden>
 
        * net/ange-ftp.el (ange-ftp-insert-directory):

=== modified file 'lisp/vc-svn.el'
--- a/lisp/vc-svn.el    2010-01-28 05:54:48 +0000
+++ b/lisp/vc-svn.el    2010-02-05 19:20:17 +0000
@@ -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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]