# HG changeset patch # User Bryan O'Sullivan # Date 1156271818 25200 # Node ID b6e6d2a9c5bc949fa7928805fa0f5e6347f18c69 # Parent e75fdc37100ce6af485f78e415749369ce7aeb08 mercurial.el: use parents in modeline, not tip diff -r e75fdc37100c -r b6e6d2a9c5bc contrib/mercurial.el --- 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")