From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: show merge info for git vc-log Date: Tue, 7 Jul 2009 11:33:14 -0700 (PDT) Message-ID: <200907071833.n67IXEEQ019584@godzilla.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1246991721 24189 80.91.229.12 (7 Jul 2009 18:35:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 Jul 2009 18:35:21 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 07 20:35:14 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MOFVW-0005xL-1O for ged-emacs-devel@m.gmane.org; Tue, 07 Jul 2009 20:35:10 +0200 Original-Received: from localhost ([127.0.0.1]:32989 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MOFVV-0004Jn-Gn for ged-emacs-devel@m.gmane.org; Tue, 07 Jul 2009 14:35:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MOFVQ-0004JW-HK for emacs-devel@gnu.org; Tue, 07 Jul 2009 14:35:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MOFVK-0004IV-29 for emacs-devel@gnu.org; Tue, 07 Jul 2009 14:35:03 -0400 Original-Received: from [199.232.76.173] (port=52591 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MOFVJ-0004IS-Qg for emacs-devel@gnu.org; Tue, 07 Jul 2009 14:34:57 -0400 Original-Received: from barrelv2.ics.uci.edu ([128.195.1.114]:64103) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1MOFVJ-00052d-Ag for emacs-devel@gnu.org; Tue, 07 Jul 2009 14:34:57 -0400 Original-Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by barrelv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id n67IXERn016994 for ; Tue, 7 Jul 2009 11:33:15 -0700 (PDT) Original-Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n67IXEEQ019584; Tue, 7 Jul 2009 11:33:14 -0700 (PDT) Original-Lines: 85 X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: n67IXERn016994 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:112143 Archived-At: git log can show a graph of the merges, it looks like this: * commit blah |\ Merge: blah blah | | Author: blah | | Date: blah | | | | Merge branch 'master' | | | * commit blah | |\ Merge: blah blah | | | Author: blah | | | Date: blah | | | | | | Merge branch foo. | | | | | * commit blah | | | Author: blah | | | Date: blah | | | | | | Fix some stuff. | | | | | * commit blah | | | Author: blah | | | Date: blah | | | | | | Fix more stuff. | | | | | | * | | commit blah |/ / Author: blah | | Date: blah | | | | blah Should we vc-log do this by default for git? Lightly tested patch: --- vc-git.el.~1.82.~ Fri Jun 26 18:46:22 2009 +++ vc-git.el Tue Jul 7 11:27:52 2009 @@ -459,4 +459,4 @@ (with-current-buffer buffer (vc-git-command buffer 'async files - "rev-list" "--pretty" "HEAD" "--"))))) + "rev-list" "--graph" "--pretty" "HEAD" "--"))))) @@ -472,17 +497,17 @@ (set (make-local-variable 'log-view-file-re) "\\`a\\`") (set (make-local-variable 'log-view-per-file-logs) nil) (set (make-local-variable 'log-view-message-re) - "^commit *\\([0-9a-z]+\\)") + "^[ */\\|]+commit *\\([0-9a-z]+\\)") (set (make-local-variable 'log-view-font-lock-keywords) (append `((,log-view-message-re (1 'change-log-acknowledgement))) ;; Handle the case: ;; user: foo@bar - '(("^Author:[ \t]+\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)" + '((" Author:[ \t]+\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)" (1 'change-log-email)) ;; Handle the case: ;; user: FirstName LastName - ("^Author:[ \t]+\\([^<(]+?\\)[ \t]*[(<]\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)[>)]" + (" Author:[ \t]+\\([^<(]+?\\)[ \t]*[(<]\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)[>)]" (1 'change-log-name) (2 'change-log-email)) ("^ +\\(?:\\(?:[Aa]cked\\|[Ss]igned-[Oo]ff\\)-[Bb]y:\\)[ \t]+\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)" @@ -490,11 +515,11 @@ ("^ +\\(?:\\(?:[Aa]cked\\|[Ss]igned-[Oo]ff\\)-[Bb]y:\\)[ \t]+\\([^<(]+?\\)[ \t]*[(<]\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)[>)]" (1 'change-log-name) (2 'change-log-email)) - ("^Merge: \\([0-9a-z]+\\) \\([0-9a-z]+\\)" + (" Merge: \\([0-9a-z]+\\) \\([0-9a-z]+\\)" (1 'change-log-acknowledgement) (2 'change-log-acknowledgement)) - ("^Date: \\(.+\\)" (1 'change-log-date)) - ("^summary:[ \t]+\\(.+\\)" (1 'log-view-message)))))) + (" Date: \\(.+\\)" (1 'change-log-date)) + (" summary:[ \t]+\\(.+\\)" (1 'log-view-message)))))) (defun vc-git-show-log-entry (revision) "Move to the log entry for REVISION.