all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Santiago Payà i Miralta" <santiagopim@gmail.com>
To: 17515@debbugs.gnu.org
Subject: bug#17515: Correction: using log-switch causes normal non shortlog use fail format
Date: Mon, 19 May 2014 01:23:00 +0200	[thread overview]
Message-ID: <CABmqNJUmFfwP9EpfLK+wX=jGx==r6sud7piMOnOU84frSjVX+g@mail.gmail.com> (raw)
In-Reply-To: <CABmqNJW-ELkJR+Q5cf2-t8hAJU6_Z2XuY-VO=WdQ3-4qtp9tdw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2777 bytes --]

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?= <santiagopim@gmail.com>
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

[-- Attachment #2: Type: text/html, Size: 9112 bytes --]

  reply	other threads:[~2014-05-18 23:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-16 22:09 bug#17515: * lisp/vc/vc-hg.el (vc-hg-root-log-format): New format supports graph, branches and bookmarks Santiago Payà i Miralta
2014-05-18 23:23 ` Santiago Payà i Miralta [this message]
2014-06-06 16:12   ` bug#17515: Correction: using log-switch causes normal non shortlog use fail format Stefan Monnier
2014-06-07 20:24     ` Santiago
2015-12-18  5:08       ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABmqNJUmFfwP9EpfLK+wX=jGx==r6sud7piMOnOU84frSjVX+g@mail.gmail.com' \
    --to=santiagopim@gmail.com \
    --cc=17515@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.