changeset 99388:fcdc9cfd2092

(vc-bzr-dir-extra-headers): New function. (vc-bzr-dir-printer): Rename from vc-bzr-status-printer.
author Chong Yidong <cyd@stupidchicken.com>
date Tue, 04 Nov 2008 17:36:43 +0000
parents 6d44458b18f2
children 6f533d3d2a12
files lisp/vc-bzr.el
diffstat 1 files changed, 15 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/vc-bzr.el	Tue Nov 04 17:36:19 2008 +0000
+++ b/lisp/vc-bzr.el	Tue Nov 04 17:36:43 2008 +0000
@@ -585,10 +585,10 @@
             (:conc-name vc-bzr-extra-fileinfo->))
   extra-name)         ;; original name for rename targets, new name for
 
-(defun vc-bzr-status-printer (info)
+(defun vc-bzr-dir-printer (info)
   "Pretty-printer for the vc-dir-fileinfo structure."
   (let ((extra (vc-dir-fileinfo->extra info)))
-    (vc-default-status-printer 'Bzr info)
+    (vc-default-dir-printer 'Bzr info)
     (when extra
       (insert (propertize
 	       (format "   (renamed from %s)"
@@ -664,6 +664,19 @@
   (apply 'vc-bzr-command "status" (current-buffer) 'async dir "-v" "-S" files)
   (vc-exec-after
    `(vc-bzr-after-dir-status (quote ,update-function))))
+
+(defun vc-bzr-dir-extra-headers (dir)
+  (let ((str (with-temp-buffer
+	       (vc-bzr-command "info" t 0 dir)
+	       (buffer-string))))
+    (concat
+     (propertize "Parent branch: " 'face 'font-lock-type-face)
+     (propertize 
+      (if (string-match "parent branch: \\(.+\\)$" str)
+	  (match-string 1 str)
+	"None")
+       'face 'font-lock-variable-name-face))))
+
 ;;; Revision completion
 
 (defun vc-bzr-revision-completion-table (files)