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: Re: vc-git-show-log-entry Date: Mon, 20 Oct 2008 11:19:06 -0700 (PDT) Message-ID: <200810201819.m9KIJ6Wh024634@mothra.ics.uci.edu> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1224542022 9341 80.91.229.12 (20 Oct 2008 22:33:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Oct 2008 22:33:42 +0000 (UTC) Cc: emacs-devel@gnu.org To: Karl Chen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 21 00:34:42 2008 connect(): Connection refused 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 1Krzy3-0005XX-7i for ged-emacs-devel@m.gmane.org; Mon, 20 Oct 2008 20:59:03 +0200 Original-Received: from localhost ([127.0.0.1]:34275 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Krzwy-0007I4-09 for ged-emacs-devel@m.gmane.org; Mon, 20 Oct 2008 14:57:56 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Krzwt-0007Hn-GI for emacs-devel@gnu.org; Mon, 20 Oct 2008 14:57:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Krzwr-0007H0-LZ for emacs-devel@gnu.org; Mon, 20 Oct 2008 14:57:50 -0400 Original-Received: from [199.232.76.173] (port=39720 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Krzwr-0007Gs-ES for emacs-devel@gnu.org; Mon, 20 Oct 2008 14:57:49 -0400 Original-Received: from sallyv2.ics.uci.edu ([128.195.1.120]:53531) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1KrzLm-0003TX-Ti for emacs-devel@gnu.org; Mon, 20 Oct 2008 14:19:31 -0400 Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by sallyv2.ics.uci.edu (8.13.7+Sun/8.13.7) with ESMTP id m9KIJ68F011963; Mon, 20 Oct 2008 11:19:06 -0700 (PDT) Original-Received: (from dann@localhost) by mothra.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id m9KIJ6Wh024634; Mon, 20 Oct 2008 11:19:06 -0700 (PDT) In-Reply-To: (Karl Chen's message of "Mon, 20 Oct 2008 02:36:58 -0700") Original-Lines: 50 X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: m9KIJ68F011963 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@mothra.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:104698 Archived-At: Karl Chen writes: > Hi, > > In Emacs 22.2.1, visiting a git-versioned file, when I do > `vc-print-log', point always moves to the end of the buffer > instead of the beginning. This worked for me: > > (defun vc-git-rev-parse (commit) > "Translate COMMIT string into full SHA1 object name. > Returns nil if not possible." > (and commit > (with-temp-buffer > (and > (zerop > (call-process "git" nil '(t nil) nil "rev-parse" > "--verify" > commit)) > (goto-char (point-min)) > (= (forward-line 2) 1) > (bolp) > (buffer-substring-no-properties (point-min) (1- (point-max))))))) > > (defun vc-git-show-log-entry (rev) > (log-view-goto-rev (vc-git-rev-parse rev))) > > I looked at CVS HEAD and noticed a new vc-git-show-log-entry and > some recent modifications. I believe the vc-git.el:1.72 version > would do the right thing for my use case, but I suspect the r1.73 > change: > * vc-git.el (vc-git-show-log-entry): Include the revision in > the search string. > breaks it. It looks like that function was supposed to parse > things like "HEAD~5", "HEAD^^" into a search repeat count, but the > 1.73 change changed the intention of the search. > > Personally, I like the vc-git-rev-parse solution better. It > handles every method of specifying commits, the "git way". > > vc-git-rev-parse can be refactored with vc-git-symbolic-commit, on > which it's based. It's hard to say what problem you are trying to report. Can you please try again with a step by step description of what you are doing, what are the results you are getting and what are the expected results. Please start from emacs -Q Please use emacs from CVS HEAD. It's unlikely that another release will be made from the 22.x branch.