From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#17515: Correction: using log-switch causes normal non shortlog use fail format Date: Fri, 06 Jun 2014 12:12:09 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1402071209 8832 80.91.229.3 (6 Jun 2014 16:13:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 6 Jun 2014 16:13:29 +0000 (UTC) Cc: 17515-done@debbugs.gnu.org To: Santiago =?UTF-8?Q?Pay=C3=A0?= i Miralta Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 06 18:13:19 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Wswla-00020E-Uf for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Jun 2014 18:13:19 +0200 Original-Received: from localhost ([::1]:48055 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wswla-0002qw-Hb for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Jun 2014 12:13:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49022) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WswlR-0002oj-UF for bug-gnu-emacs@gnu.org; Fri, 06 Jun 2014 12:13:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WswlL-0003rd-Gd for bug-gnu-emacs@gnu.org; Fri, 06 Jun 2014 12:13:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48598) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WswlL-0003rT-DK for bug-gnu-emacs@gnu.org; Fri, 06 Jun 2014 12:13:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WswlL-0000kJ-2s for bug-gnu-emacs@gnu.org; Fri, 06 Jun 2014 12:13:03 -0400 Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 Jun 2014 16:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 17515 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Mail-Followup-To: 17515@debbugs.gnu.org, monnier@iro.umontreal.ca, santiagopim@gmail.com Original-Received: via spool by 17515-done@debbugs.gnu.org id=D17515.14020711412787 (code D ref 17515); Fri, 06 Jun 2014 16:13:01 +0000 Original-Received: (at 17515-done) by debbugs.gnu.org; 6 Jun 2014 16:12:21 +0000 Original-Received: from localhost ([127.0.0.1]:39745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wswke-0000ir-NZ for submit@debbugs.gnu.org; Fri, 06 Jun 2014 12:12:21 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:20261) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wswka-0000iL-7r for 17515-done@debbugs.gnu.org; Fri, 06 Jun 2014 12:12:18 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUGAIDvNVPO+IOj/2dsb2JhbABZgwaDSsA9gRcXdIImAQEEViMQCzQSFA0LDSQTh2UDEcpdDYcvF4xegUUkMweEOASWYY5Yg2CBaoFxgVshgS0 X-IPAS-Result: ArUGAIDvNVPO+IOj/2dsb2JhbABZgwaDSsA9gRcXdIImAQEEViMQCzQSFA0LDSQTh2UDEcpdDYcvF4xegUUkMweEOASWYY5Yg2CBaoFxgVshgS0 X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="66040562" Original-Received: from 206-248-131-163.dsl.teksavvy.com (HELO pastel.home) ([206.248.131.163]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 06 Jun 2014 12:12:09 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id CF14C600D1; Fri, 6 Jun 2014 12:12:09 -0400 (EDT) In-Reply-To: ("Santiago =?UTF-8?Q?Pay=C3=A0?= i Miralta"'s message of "Mon, 19 May 2014 01:23:00 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:90138 Archived-At: 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 =3D=3D=3D 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=E0 i Miralta + + * 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 =20 * 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. =20 -2014-05-12 Santiago Pay=E0 i Miralta (tiny chan= ge) +2014-05-12 Santiago Pay=E0 i Miralta =20 * vc/vc-hg.el (vc-hg-unregister): New function. (Bug#17454) =20 =3D=3D=3D 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) =20 (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") =20 ;;; Properties of the backend @@ -247,6 +254,9 @@ =20 (autoload 'vc-setup-buffer "vc-dispatcher") =20 +(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 lim= it) "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))))) =20 (defvar log-view-message-re)