Mercurial > hg
changeset 3000:b6e6d2a9c5bc
mercurial.el: use parents in modeline, not tip
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Tue, 22 Aug 2006 11:36:58 -0700 |
parents | e75fdc37100c |
children | a7c4c7537999 |
files | contrib/mercurial.el |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/mercurial.el Tue Aug 22 11:24:59 2006 -0700 +++ b/contrib/mercurial.el Tue Aug 22 11:36:58 2006 -0700 @@ -548,14 +548,12 @@ '(("M " . modified) ("A " . added) ("R " . removed) + ("! " . deleted) ("? " . nil))))) (if state (cdr state) 'normal))))) -(defun hg-tip () - (split-string (hg-chomp (hg-run0 "-q" "tip")) ":")) - (defmacro hg-view-output (args &rest body) "Execute BODY in a clean buffer, then quickly display that buffer. If the buffer contains one line, its contents are displayed in the @@ -637,10 +635,13 @@ hg-update-modeline is non-nil, or we have not yet checked the state of the file." (when (and (hg-root) (or force hg-update-modeline (not hg-mode))) - (let ((status (hg-file-status buffer-file-name))) + (let ((status (hg-file-status buffer-file-name)) + (parents + (split-string (hg-chomp + (hg-run0 "parents" "--template" "{rev}\n")) "\n"))) (setq hg-status status hg-mode (and status (concat " Hg:" - (car (hg-tip)) + (mapconcat 'identity parents "+") (cdr (assq status '((normal . "") (removed . "r")