Hi emacs, There is a fail in my previous patch. Using '--graph' in the vc-hg-log-switches causes the normal non SHORTLOG log print to use it, and the resulting long log is as broken. Please use this patch corrected where the '--graph' option is into the shortlog condition in vc-hg-print-log. Apologies. From 72963f6dc7d754e525d5df7e4d2a4d0b8896d814 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Santiago=20Pay=C3=A0=20i=20Miralta?= Date: Mon, 19 May 2014 01:20:14 +0200 Subject: [PATCH 2/2] [PATCH] * lisp/vc/vc-hg.el (vc-hg-root-log-format): New format supports graph, branches and bookmarks. Modern Mercurial log command supports --graph, also the graphlog extension is widely used in ancient Mercurial. So with adding this default configuration vc-hg users may see the graph DAG in the vc-change-log buffer when using SHORTLOG in vc-hg-print-log function. The vc-hg-root-log-format is compatible with or without the graph view. Also added branches and bookmarks to the log format, with some different but existing faces from add-log. --- lisp/vc/vc-hg.el | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 05b53a3..3323628 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -146,12 +146,14 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." :group 'vc-hg) (defcustom vc-hg-root-log-format - '("{rev}:{tags}: {author|person} {date|shortdate} {desc|firstline}\\n" - "^\\([0-9]+\\):\\([^:]*\\): \\(.*?\\)[ \t]+\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}\\)" - ((1 'log-view-message-face) - (2 'change-log-list) - (3 'change-log-name) - (4 'change-log-date))) +'("{rev}:{ifeq(branch, 'default','', '{branch}')}:{bookmarks}:{tags}: {author|person} {date|shortdate} {desc|firstline}\\n" + "^\\(?:[+@o x|-]*\\)\\([0-9]+\\):\\([^:]*\\):\\([^:]*\\):\\([^:]*\\): \\(.*?\\)[ \t]+\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}\\)" +((1 'log-view-message-face) + (2 'change-log-file) + (3 'change-log-list) + (4 'change-log-conditionals) + (5 'change-log-name) + (6 'change-log-date))) "Mercurial log template for `vc-hg-print-log' short format. This should be a list (TEMPLATE REGEXP KEYWORDS), where TEMPLATE is the \"--template\" argument string to pass to Mercurial, @@ -264,7 +266,7 @@ If LIMIT is non-nil, show no more than this many entries." (nconc (when start-revision (list (format "-r%s:0" start-revision))) (when limit (list "-l" (format "%s" limit))) - (when shortlog (list "--template" (car vc-hg-root-log-format))) + (when shortlog (list "--graph" "--template" (car vc-hg-root-log-format))) vc-hg-log-switches))))) (defvar log-view-message-re) -- 1.7.9.5