unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Santiago <santiagopim@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 17515-done@debbugs.gnu.org
Subject: bug#17515: Correction: using log-switch causes normal non shortlog use fail format
Date: Sat, 07 Jun 2014 22:24:36 +0200	[thread overview]
Message-ID: <cikn6tjeh91tlj50b5ecw1cw.1402172518595@email.android.com> (raw)
In-Reply-To: <jwvsinit4ux.fsf-monnier+emacsbugs@gnu.org>

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

Hello,

Many many thanks for all the corrections. I am sorry for alignment problems, I fear that the gmail web client is not preferred email client to send patches. I will review the next 'shipment'.

Best regards,

Santiago

--
Smartphoning

---- Stefan Monnier wrote ----

>OK, I see your papers are in.  Now that I'm looking at your patch,
>I have one more comment.  The previous version of your patch said:
>
>   Using --graph needs Mercurial 3.0+ or the graphlog extension.
>
>Yet my Debian install is still at 2.9.2, so using --graph by default
>seems risky.  Is there a way to test whether "hg" supports "--graph"?
>
>Oh, and your patch was mangled.  Try to use a MUA that doesn't wrap
>lines for you.
>
>I installed the tweaked patch below, which avoids going over
>80-columns, updates the :version info, and introduces a config var to
>enable the --graph (this var should be set automatically depending on
>whether --graph is supported, but for now it just defaults to nil).
>
>
>        Stefan
>
>
>=== modified file 'lisp/ChangeLog'
>--- lisp/ChangeLog	2014-06-06 14:37:05 +0000
>+++ lisp/ChangeLog	2014-06-06 16:11:32 +0000
>@@ -1,3 +1,10 @@
>+2014-06-06  Santiago Payà i Miralta  <santiagopim@gmail.com>
>+
>+	* vc/vc-hg.el (vc-hg-log-graph): New var.
>+	(vc-hg-print-log): Use it.
>+	(vc-hg-root-log-format): Include branch name and bookmarks; ignore
>+	graph output (bug#17515).
>+
> 2014-06-06  Stefan Monnier  <monnier@iro.umontreal.ca>
> 
> 	* mouse.el (mouse-posn-property): Ignore buffer position info when the
>@@ -631,7 +638,7 @@
> 	* emacs-lisp/nadvice.el (advice--interactive-form): Don't get fooled
> 	into autoloading just because of a silly indirection.
> 
>-2014-05-12  Santiago Payà i Miralta  <santiagopim@gmail.com>  (tiny change)
>+2014-05-12  Santiago Payà i Miralta  <santiagopim@gmail.com>
> 
> 	* vc/vc-hg.el (vc-hg-unregister): New function.  (Bug#17454)
> 
>
>=== modified file 'lisp/vc/vc-hg.el'
>--- lisp/vc/vc-hg.el	2014-05-11 02:01:08 +0000
>+++ lisp/vc/vc-hg.el	2014-06-06 16:07:59 +0000
>@@ -146,12 +146,19 @@
>   :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\\}\\)"
>+  `(,(concat "{rev}:{ifeq(branch, 'default','', '{branch}')}"
>+             ":{bookmarks}:{tags}:{author|person}"
>+             " {date|shortdate} {desc|firstline}\\n")
>+    ,(concat "^\\(?:[+@o x|-]*\\)"      ;Graph data.
>+             "\\([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)))
>+     (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,
>@@ -160,7 +167,7 @@
> highlighting the Log View buffer."
>   :type '(list string string (repeat sexp))
>   :group 'vc-hg
>-  :version "24.1")
>+  :version "24.5")
> 
> \f>
> ;;; Properties of the backend
>@@ -247,6 +254,9 @@
> 
> (autoload 'vc-setup-buffer "vc-dispatcher")
> 
>+(defvar vc-hg-log-graph nil
>+  "If non-nil, use `--graph' in the short log output.")
>+
> (defun vc-hg-print-log (files buffer &optional shortlog start-revision limit)
>   "Print commit log associated with FILES into specified BUFFER.
> If SHORTLOG is non-nil, use a short format based on `vc-hg-root-log-format'.
>@@ -264,7 +274,9 @@
> 	     (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 `(,@(if vc-hg-log-graph '("--graph"))
>+                               "--template"
>+                               ,(car vc-hg-root-log-format)))
> 	      vc-hg-log-switches)))))
> 
> (defvar log-view-message-re)
>

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

  reply	other threads:[~2014-06-07 20:24 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 ` bug#17515: Correction: using log-switch causes normal non shortlog use fail format Santiago Payà i Miralta
2014-06-06 16:12   ` Stefan Monnier
2014-06-07 20:24     ` Santiago [this message]
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=cikn6tjeh91tlj50b5ecw1cw.1402172518595@email.android.com \
    --to=santiagopim@gmail.com \
    --cc=17515-done@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).