##// END OF EJS Templates
mercurial.el: use parents in modeline, not tip
Bryan O'Sullivan -
r3000:b6e6d2a9 default
parent child Browse files
Show More
@@ -548,14 +548,12 b' current frame."'
548 '(("M " . modified)
548 '(("M " . modified)
549 ("A " . added)
549 ("A " . added)
550 ("R " . removed)
550 ("R " . removed)
551 ("! " . deleted)
551 ("? " . nil)))))
552 ("? " . nil)))))
552 (if state
553 (if state
553 (cdr state)
554 (cdr state)
554 'normal)))))
555 'normal)))))
555
556
556 (defun hg-tip ()
557 (split-string (hg-chomp (hg-run0 "-q" "tip")) ":"))
558
559 (defmacro hg-view-output (args &rest body)
557 (defmacro hg-view-output (args &rest body)
560 "Execute BODY in a clean buffer, then quickly display that buffer.
558 "Execute BODY in a clean buffer, then quickly display that buffer.
561 If the buffer contains one line, its contents are displayed in the
559 If the buffer contains one line, its contents are displayed in the
@@ -637,10 +635,13 b' An update occurs if optional argument FO'
637 hg-update-modeline is non-nil, or we have not yet checked the state of
635 hg-update-modeline is non-nil, or we have not yet checked the state of
638 the file."
636 the file."
639 (when (and (hg-root) (or force hg-update-modeline (not hg-mode)))
637 (when (and (hg-root) (or force hg-update-modeline (not hg-mode)))
640 (let ((status (hg-file-status buffer-file-name)))
638 (let ((status (hg-file-status buffer-file-name))
639 (parents
640 (split-string (hg-chomp
641 (hg-run0 "parents" "--template" "{rev}\n")) "\n")))
641 (setq hg-status status
642 (setq hg-status status
642 hg-mode (and status (concat " Hg:"
643 hg-mode (and status (concat " Hg:"
643 (car (hg-tip))
644 (mapconcat 'identity parents "+")
644 (cdr (assq status
645 (cdr (assq status
645 '((normal . "")
646 '((normal . "")
646 (removed . "r")
647 (removed . "r")
General Comments 0
You need to be logged in to leave comments. Login now