From da4d4066794fa114d340a0c1d796aed1523a7c72 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 4 Nov 2008 17:36:43 +0000 Subject: [PATCH] (vc-bzr-dir-extra-headers): New function. (vc-bzr-dir-printer): Rename from vc-bzr-status-printer. --- lisp/vc-bzr.el | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el index 2fa1ee2509b..efa9fc9ef9e 100644 --- a/lisp/vc-bzr.el +++ b/lisp/vc-bzr.el @@ -585,10 +585,10 @@ stream. Standard error output is discarded." (: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 @@ stream. Standard error output is discarded." (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) -- 2.39.2