From d9de6d6fab83a48d3c97eecf92149d17eccb8fe1 Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Mon, 25 Jan 2010 00:02:10 -0500 Subject: [PATCH] working version of vc-bzr-revision-table --- lisp/ChangeLog | 5 ++++- lisp/vc-bzr.el | 13 +++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1b5d8f241ec..e3c34554afe 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,9 @@ 2010-01-24 Mark A. Hershberger - * progmodes/python.el: Replace reference to obsolete c-subward-mode. + * progmodes/python.el: Replace reference to obsolete + c-subward-mode. + + * vc-bzr.el: (vc-bzr-revision-table) New function. 2010-01-24 Dan Nicolaescu diff --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el index d04c783ca32..b3bbc272faa 100644 --- a/lisp/vc-bzr.el +++ b/lisp/vc-bzr.el @@ -898,6 +898,19 @@ stream. Standard error output is discarded." (interactive "e") (vc-dir-at-event e (popup-menu vc-bzr-shelve-menu-map e))) +(defun vc-bzr-revision-table (files) + (let ((vc-bzr-revisions '()) + (default-directory (file-name-directory (car files)))) + (with-temp-buffer + (vc-bzr-command "log" t 0 files "--line") + (let ((start (point-min)) + (loglines (buffer-substring-no-properties (point-min) (point-max)))) + (while (string-match "^\\([0-9]+\\):" loglines) + (push (match-string 1 loglines) vc-bzr-revisions) + (setq start (+ start (match-end 0))) + (setq loglines (buffer-substring-no-properties start (point-max)))))) + vc-bzr-revisions)) + ;;; Revision completion (eval-and-compile -- 2.39.5