From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bob Rogers Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#3214: 23.0.92; VC dir mode fails after commit when files are deleted Date: Mon, 4 May 2009 18:38:45 -0400 (EDT) Message-ID: <20090504223845.381524862E@rgr.rgrjr.com> Reply-To: Bob Rogers , 3214@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1241477537 25653 80.91.229.12 (4 May 2009 22:52:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 May 2009 22:52:17 +0000 (UTC) To: emacs-pretest-bug@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 05 00:52:07 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 1M1714-0008DE-At for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 May 2009 00:52:07 +0200 Original-Received: from localhost ([127.0.0.1]:56929 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M1713-0005l6-OF for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 May 2009 18:52:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M170z-0005km-K4 for bug-gnu-emacs@gnu.org; Mon, 04 May 2009 18:52:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M170u-0005kT-6S for bug-gnu-emacs@gnu.org; Mon, 04 May 2009 18:52:00 -0400 Original-Received: from [199.232.76.173] (port=43816 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M170t-0005kQ-VO for bug-gnu-emacs@gnu.org; Mon, 04 May 2009 18:51:56 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:59195) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M170t-0007IC-9H for bug-gnu-emacs@gnu.org; Mon, 04 May 2009 18:51:55 -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 n44MpqEF004697; Mon, 4 May 2009 15:51:53 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n44Mj4U1001998; Mon, 4 May 2009 15:45:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Bob Rogers Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 04 May 2009 22:45:03 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 3214 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.1241476735568 (code B ref -1); Mon, 04 May 2009 22:45:03 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 4 May 2009 22:38:55 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n44McnBm000559 for ; Mon, 4 May 2009 15:38:50 -0700 Original-Received: from mx10.gnu.org ([199.232.76.166]:39150) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1M16oC-0000dH-UU for emacs-pretest-bug@gnu.org; Mon, 04 May 2009 18:38:49 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1M16oA-0005da-Pr for emacs-pretest-bug@gnu.org; Mon, 04 May 2009 18:38:48 -0400 Original-Received: from rgrjr.com ([216.146.47.5]:42648) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M16oA-0005dS-CW for emacs-pretest-bug@gnu.org; Mon, 04 May 2009 18:38:46 -0400 Original-Received: from rgrjr.dyndns.org (c-66-30-196-77.hsd1.ma.comcast.net [66.30.196.77]) by rgrjr.com (Postfix on CentOS) with ESMTP id F1EB9160157 for ; Mon, 4 May 2009 22:38:45 +0000 (UTC) Original-Received: (qmail 17461 invoked by uid 89); 4 May 2009 22:38:45 -0000 Original-Received: from unknown (HELO rgr.rgrjr.com) (192.168.57.1) by home with SMTP; 4 May 2009 22:38:45 -0000 Original-Received: by rgr.rgrjr.com (Postfix, from userid 500) id 381524862E; Mon, 4 May 2009 18:38:45 -0400 (EDT) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Mon, 04 May 2009 18:52:00 -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:27692 gmane.emacs.pretest.bugs:24379 Archived-At: To reproduce: 1. Find or create a working copy of a repository, and identify a file that you want to remove from the repo, call it "foo.text". (I used SVN, but the problem doesn't seem to be backend-dependent.) You will need to commit in order to trigger the bug, so be sure you really don't mind getting rid of it. 2. "emacs -Q" in the working copy. 3. "C-x C-f foo.text RET". The deleted file must be visited in order to trigger the bug. 4. Remove the file via the VC command-line tools, but don't commmit yet. (Don't use vc-delete-file, as that will also delete the buffer.) 5. "C-x v d" to get VC dir mode in the other window. It should tag foo.text as "removed". (FWIW, if you do "C-x v d" first, you will see bug #3213.) 6. Type "v" on the foo.text line, then "C-c C-c" in the log entry buffer to commit the change. You should then get a "File foo.text no longer exists!" error. A sample backtrace is shown below. The patch after the backtrace cures the symptom crudely, albeit by papering over it, and possibly hiding other bugs. It would be better if vc-finish-logentry could recognize which files are being deleted, and then have vc-resynch-buffer simply delete those buffers, but it is not clear to me how to do that in a backend-independent way. Admittedly, this is a comparatively minor nuisance; the VC change is comitted properly, and the partially-updated VC-dir buffer can be fixed by typing "g". (And I don't know whether this is a regression.) -- Bob Rogers http://www.rgrjr.com/ Backtrace: Debugger entered--Lisp error: (error "File /home/rogers/projects/test2/test/foo.text no longer exists!") signal(error ("File /home/rogers/projects/test2/test/foo.text no longer exists!")) error("File %s no longer exists!" "/home/rogers/projects/test2/test/foo.text") revert-buffer(t t t) vc-revert-buffer-internal(t t) vc-resynch-window("/home/rogers/projects/test2/test/foo.text" t t) vc-resynch-buffer("/home/rogers/projects/test2/test/foo.text" t t) #[(file) "=3fffc2 =3fffc3#=3fff87" [file vc-keep-workfiles vc-resynch-buffer t] 4]("/home/rogers/projects/test2/test/foo.text") mapc(#[(file) "=3fffc2 =3fffc3#=3fff87" [file vc-keep-workfiles vc-resynch-buffer t] 4] ("/home/rogers/projects/test2/test/foo.text")) vc-finish-logentry() call-interactively(vc-finish-logentry) log-edit-done() call-interactively(log-edit-done nil nil) ------------------------------------------------------------------------ Index: lisp/vc-dispatcher.el =================================================================== RCS file: /sources/emacs/emacs/lisp/vc-dispatcher.el,v retrieving revision 1.67 diff -c -r1.67 vc-dispatcher.el *** lisp/vc-dispatcher.el 5 Jan 2009 03:19:52 -0000 1.67 --- lisp/vc-dispatcher.el 4 May 2009 19:29:54 -0000 *************** *** 444,453 **** ;; and mark properly even in cases where vc-restore-buffer-context ;; would fail. However, save-excursion might also get it wrong -- ;; in this case, vc-restore-buffer-context gives it a second try. ! (save-excursion ! ;; t means don't call normal-mode; ! ;; that's to preserve various minor modes. ! (revert-buffer arg no-confirm t)) (vc-restore-buffer-context context))) (defun vc-resynch-window (file &optional keep noquery) --- 444,457 ---- ;; and mark properly even in cases where vc-restore-buffer-context ;; would fail. However, save-excursion might also get it wrong -- ;; in this case, vc-restore-buffer-context gives it a second try. ! (condition-case error ! (save-excursion ! ;; t means don't call normal-mode; ! ;; that's to preserve various minor modes. ! (revert-buffer arg no-confirm t)) ! (error ! (message "Got error %S" error) ! (sit-for 2))) (vc-restore-buffer-context context))) (defun vc-resynch-window (file &optional keep noquery) ------------------------------------------------------------------------ In GNU Emacs 23.0.92.1 (i686-pc-linux-gnu, GTK+ Version 2.12.9) of 2009-04-24 on rgr Windowing system distributor `The X.Org Foundation', version 11.0.10400090 Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default-enable-multibyte-characters: t Major mode: Debugger Minor modes in effect: diff-auto-refine-mode: t shell-dirtrack-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t