From: Bob Rogers <rogers-emacs@rgrjr.dyndns.org>
To: emacs-pretest-bug@gnu.org
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) [thread overview]
Message-ID: <20090504223845.381524862E@rgr.rgrjr.com> (raw)
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\b =3fffc3#=3fff87" [file vc-keep-workfiles vc-resynch-buffer t] 4]("/home/rogers/projects/test2/test/foo.text")
mapc(#[(file) "=3fffc2\b =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
next reply other threads:[~2009-05-04 22:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-04 22:38 Bob Rogers [this message]
2010-01-20 3:58 ` bug#3214: vc-dir problem when committing removed file to bzr Glenn Morris
2010-01-20 7:16 ` Dan Nicolaescu
2023-10-15 10:34 ` bug#3214: 23.0.92; VC dir mode fails after commit when files are deleted Mauro Aranda
2023-10-21 1:29 ` Bob Rogers
2023-10-21 10:21 ` Mauro Aranda
2023-10-21 10:36 ` Stefan Kangas
2023-10-21 11:24 ` Mauro Aranda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090504223845.381524862E@rgr.rgrjr.com \
--to=rogers-emacs@rgrjr.dyndns.org \
--cc=3214@emacsbugs.donarmstrong.com \
--cc=emacs-pretest-bug@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).