comparison lisp/vc-hg.el @ 91951:d42fe75822fe

* vc.el (vc-status-menu, vc-status-menu-map-filter): New functions. (vc-status-mode-menu): Add a :filter. (vc-status-printer): Add faces. * vc-hg.el (vc-hg-extra-status-menu): New function. (vc-hg-dir-status): Clean up the buffer before using it.
author Dan Nicolaescu <dann@ics.uci.edu>
date Tue, 19 Feb 2008 07:10:33 +0000
parents 5d58981e6690
children b05f0b99514a
comparison
equal deleted inserted replaced
91950:d758efc0f23f 91951:d42fe75822fe
473 (define-key map [outgoing] '(menu-item "Show outgoing" vc-hg-outgoing)) 473 (define-key map [outgoing] '(menu-item "Show outgoing" vc-hg-outgoing))
474 map)) 474 map))
475 475
476 (defun vc-hg-extra-menu () vc-hg-extra-menu-map) 476 (defun vc-hg-extra-menu () vc-hg-extra-menu-map)
477 477
478 (defun vc-hg-extra-status-menu ()
479 '(["Show incoming" vc-hg-incoming]
480 ["Show outgoing" vc-hg-outgoing])
481
478 (define-derived-mode vc-hg-outgoing-mode vc-hg-log-view-mode "Hg-Outgoing") 482 (define-derived-mode vc-hg-outgoing-mode vc-hg-log-view-mode "Hg-Outgoing")
479 483
480 (define-derived-mode vc-hg-incoming-mode vc-hg-log-view-mode "Hg-Incoming") 484 (define-derived-mode vc-hg-incoming-mode vc-hg-log-view-mode "Hg-Incoming")
481 485
482 ;; XXX Experimental function for the vc-dired replacement. 486 ;; XXX Experimental function for the vc-dired replacement.
509 (defun vc-hg-dir-status (dir update-function status-buffer) 513 (defun vc-hg-dir-status (dir update-function status-buffer)
510 "Return a list of conses (file . state) for DIR." 514 "Return a list of conses (file . state) for DIR."
511 (with-current-buffer 515 (with-current-buffer
512 (get-buffer-create 516 (get-buffer-create
513 (expand-file-name " *VC-hg* tmp status" dir)) 517 (expand-file-name " *VC-hg* tmp status" dir))
518 (erase-buffer)
514 (vc-hg-command (current-buffer) 'async dir "status") 519 (vc-hg-command (current-buffer) 'async dir "status")
515 (vc-exec-after 520 (vc-exec-after
516 `(vc-hg-after-dir-status (quote ,update-function) ,status-buffer)))) 521 `(vc-hg-after-dir-status (quote ,update-function) ,status-buffer))))
517 522
518 ;; XXX this adds another top level menu, instead figure out how to 523 ;; XXX this adds another top level menu, instead figure out how to