From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.bugs Subject: bug#2652: 23.0.91; wacky behavior of "v" command in *vc-dir* buffer Date: Sat, 14 Mar 2009 09:03:02 -0700 (PDT) Message-ID: <200903141603.n2EG327C002787@godzilla.ics.uci.edu> References: <87iqmemgyi.fsf@catnip.gol.com> <200903130038.n2D0cuTj018433@godzilla.ics.uci.edu> <200903130134.n2D1YCFF018782@godzilla.ics.uci.edu> <200903130727.n2D7RHBI020896@godzilla.ics.uci.edu> <200903131622.n2DGMAZG024224@godzilla.ics.uci.edu> Reply-To: Dan Nicolaescu , 2652@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1237047842 8819 80.91.229.12 (14 Mar 2009 16:24:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 14 Mar 2009 16:24:02 +0000 (UTC) Cc: Miles Bader To: 2652@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 14 17:25:19 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LiWfm-0007GY-6B for geb-bug-gnu-emacs@m.gmane.org; Sat, 14 Mar 2009 17:25:18 +0100 Original-Received: from localhost ([127.0.0.1]:38145 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LiWeP-0003qb-TE for geb-bug-gnu-emacs@m.gmane.org; Sat, 14 Mar 2009 12:23:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LiWeM-0003qW-E2 for bug-gnu-emacs@gnu.org; Sat, 14 Mar 2009 12:23:50 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LiWeH-0003q2-3R for bug-gnu-emacs@gnu.org; Sat, 14 Mar 2009 12:23:49 -0400 Original-Received: from [199.232.76.173] (port=56102 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LiWeG-0003pz-Vs for bug-gnu-emacs@gnu.org; Sat, 14 Mar 2009 12:23:45 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:47156) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LiWeG-0004XQ-Fj for bug-gnu-emacs@gnu.org; Sat, 14 Mar 2009 12:23:44 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2EGNgCU031054; Sat, 14 Mar 2009 09:23:42 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n2EGA5d9027218; Sat, 14 Mar 2009 09:10:05 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Dan Nicolaescu Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 14 Mar 2009 16:10:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 2652 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 2652-submit@emacsbugs.donarmstrong.com id=B2652.123704660524915 (code B ref 2652); Sat, 14 Mar 2009 16:10:04 +0000 Original-Received: (at 2652) by emacsbugs.donarmstrong.com; 14 Mar 2009 16:03:25 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from sallyv2.ics.uci.edu (sallyv2.ics.uci.edu [128.195.1.120]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n2EG3MG8024900 for <2652@emacsbugs.donarmstrong.com>; Sat, 14 Mar 2009 09:03:23 -0700 Original-Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by sallyv2.ics.uci.edu (8.13.7+Sun/8.13.7) with ESMTP id n2EG33BO012976; Sat, 14 Mar 2009 09:03:03 -0700 (PDT) Original-Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n2EG327C002787; Sat, 14 Mar 2009 09:03:02 -0700 (PDT) In-Reply-To: <200903131622.n2DGMAZG024224@godzilla.ics.uci.edu> (Dan Nicolaescu's message of "Fri, 13 Mar 2009 09:22:10 -0700 (PDT)") Original-Lines: 86 X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: n2EG33BO012976 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: GNU/Linux 2.6 (newer, 3) Resent-Date: Sat, 14 Mar 2009 12:23:49 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:26318 Archived-At: Dan Nicolaescu writes: > Miles Bader writes: >=20 > > On Fri, Mar 13, 2009 at 4:27 PM, Dan Nicolaescu = wrote: > > > Thanks. > > > The immediate cause of the problem is that > > > (vc-git-registered "/tmp/zonk/") > > > returns nil. > > > > > > vc-git-registered is called because vc-finish-log-entry does a > > > `vc-call'. =C2=A0`vc-call' tries to find the corresponding VC bac= kend. > > > > > > Now, the VC backend should be know known at point when the log en= try is > > > started, so there should be no need for the vc-call, vc-call-back= end > > > could be used... >=20 > You can try this patch that passes down the VC backend.=20=20 > Not tested beyond M-x byte-compile-file. I have now tested this, and it seems to work fine. But I don't really want to check it in at this point without an explicit request from Stefan. > --- vc.el.~1.711.~ Thu Jan 8 14:24:05 2009 > +++ vc.el Fri Mar 13 09:14:58 2009 > @@ -1085,13 +1085,13 @@ > (if (not ready-for-commit) > (message "No files remain to be committed") > (if (not verbose) > - (vc-checkin ready-for-commit) > + (vc-checkin ready-for-commit backend) > (progn > (setq revision (read-string "New revision or backend: ")) > (let ((vsym (intern (upcase revision)))) > (if (member vsym vc-handled-backends) > (dolist (file files) (vc-transfer-file file vsym)) > - (vc-checkin ready-for-commit revision)))))))) > + (vc-checkin ready-for-commit backend revision)))))))) > ;; locked by somebody else (locking VCSes only) > ((stringp state) > ;; In the old days, we computed the revision once and used it on > @@ -1327,7 +1327,7 @@ > ".\n") > (message "Please explain why you stole the lock. Type C-c C-c whe= n done."))) >=20=20 > -(defun vc-checkin (files &optional rev comment initial-contents) > +(defun vc-checkin (files backend &optional rev comment initial-content= s) > "Check in FILES. > The optional argument REV may be a string specifying the new revision > level (if nil increment the current level). COMMENT is a comment > @@ -1341,6 +1341,7 @@ > Runs the normal hooks `vc-before-checkin-hook' and `vc-checkin-hook'." > (when vc-before-checkin-hook > (run-hooks 'vc-before-checkin-hook)) > + (lexical-let ((backend backend)) > (vc-start-logentry > files rev comment initial-contents > "Enter a change comment." > @@ -1356,13 +1357,13 @@ > ;; We used to change buffers to get local value of vc-checkin-sw= itches, > ;; but 'the' local buffer is not a well-defined concept for file= sets. > (progn > - (vc-call checkin files rev comment) > + (vc-call-backend backend 'checkin files rev comment) > (mapc 'vc-delete-automatic-version-backups files)) > `((vc-state . up-to-date) > (vc-checkout-time . ,(nth 5 (file-attributes file))) > (vc-working-revision . nil))) > (message "Checking in %s...done" (vc-delistify files))) > - 'vc-checkin-hook)) > + 'vc-checkin-hook))) >=20=20 > ;;; Additional entry points for examining version histories >=20=20 > @@ -2096,7 +2097,7 @@ > (when (or move edited) > (vc-file-setprop file 'vc-state 'edited) > (vc-mode-line file) > - (vc-checkin file nil comment (stringp comment))))) > + (vc-checkin file new-backend nil comment (stringp comment))))) >=20=20 > (defun vc-rename-master (oldmaster newfile templates) > "Rename OLDMASTER to be the master file for NEWFILE based on TEMPLAT= ES."