comparison lisp/vc-bzr.el @ 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 622e1277bbf2
children 6974583b6281
comparison
equal deleted inserted replaced
99387:6d44458b18f2 99388:fcdc9cfd2092
583 (:copier nil) 583 (:copier nil)
584 (:constructor vc-bzr-create-extra-fileinfo (extra-name)) 584 (:constructor vc-bzr-create-extra-fileinfo (extra-name))
585 (:conc-name vc-bzr-extra-fileinfo->)) 585 (:conc-name vc-bzr-extra-fileinfo->))
586 extra-name) ;; original name for rename targets, new name for 586 extra-name) ;; original name for rename targets, new name for
587 587
588 (defun vc-bzr-status-printer (info) 588 (defun vc-bzr-dir-printer (info)
589 "Pretty-printer for the vc-dir-fileinfo structure." 589 "Pretty-printer for the vc-dir-fileinfo structure."
590 (let ((extra (vc-dir-fileinfo->extra info))) 590 (let ((extra (vc-dir-fileinfo->extra info)))
591 (vc-default-status-printer 'Bzr info) 591 (vc-default-dir-printer 'Bzr info)
592 (when extra 592 (when extra
593 (insert (propertize 593 (insert (propertize
594 (format " (renamed from %s)" 594 (format " (renamed from %s)"
595 (vc-bzr-extra-fileinfo->extra-name extra)) 595 (vc-bzr-extra-fileinfo->extra-name extra))
596 'face 'font-lock-comment-face))))) 596 'face 'font-lock-comment-face)))))
662 (defun vc-bzr-dir-status-files (dir files default-state update-function) 662 (defun vc-bzr-dir-status-files (dir files default-state update-function)
663 "Return a list of conses (file . state) for DIR." 663 "Return a list of conses (file . state) for DIR."
664 (apply 'vc-bzr-command "status" (current-buffer) 'async dir "-v" "-S" files) 664 (apply 'vc-bzr-command "status" (current-buffer) 'async dir "-v" "-S" files)
665 (vc-exec-after 665 (vc-exec-after
666 `(vc-bzr-after-dir-status (quote ,update-function)))) 666 `(vc-bzr-after-dir-status (quote ,update-function))))
667
668 (defun vc-bzr-dir-extra-headers (dir)
669 (let ((str (with-temp-buffer
670 (vc-bzr-command "info" t 0 dir)
671 (buffer-string))))
672 (concat
673 (propertize "Parent branch: " 'face 'font-lock-type-face)
674 (propertize
675 (if (string-match "parent branch: \\(.+\\)$" str)
676 (match-string 1 str)
677 "None")
678 'face 'font-lock-variable-name-face))))
679
667 ;;; Revision completion 680 ;;; Revision completion
668 681
669 (defun vc-bzr-revision-completion-table (files) 682 (defun vc-bzr-revision-completion-table (files)
670 (lexical-let ((files files)) 683 (lexical-let ((files files))
671 ;; What about using `files'?!? --Stef 684 ;; What about using `files'?!? --Stef