unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#3214: 23.0.92; VC dir mode fails after commit when files are deleted
@ 2009-05-04 22:38 Bob Rogers
  2010-01-20  3:58 ` bug#3214: vc-dir problem when committing removed file to bzr Glenn Morris
  2023-10-15 10:34 ` bug#3214: 23.0.92; VC dir mode fails after commit when files are deleted Mauro Aranda
  0 siblings, 2 replies; 8+ messages in thread
From: Bob Rogers @ 2009-05-04 22:38 UTC (permalink / raw)
  To: emacs-pretest-bug

   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






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#3214: vc-dir problem when committing removed file to bzr
  2009-05-04 22:38 bug#3214: 23.0.92; VC dir mode fails after commit when files are deleted Bob Rogers
@ 2010-01-20  3:58 ` 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
  1 sibling, 1 reply; 8+ messages in thread
From: Glenn Morris @ 2010-01-20  3:58 UTC (permalink / raw)
  To: 3214


Just had what seems to be a same problem as this (bug#3214) with the
trunk from 2010-01-10.

In the emacs admin/ directory, I did (from the command-line):

bzr remove revdiff

Then I edited the ChangeLog file, then did M-x vc-dir on the admin
directory.

In the resulting buffer, the ChangeLog was marked as modified, and
revdiff as removed.

I marked both files, hit `v', entered a log message, and tried to
commit. The vc-dir process finished with an error:

  Running bzr status ChangeLog in foreground...
  Running bzr status ChangeLog...OK = 0
  Running bzr status revdiff in foreground...
  vc-do-command: Running bzr status revdiff...FAILED (status 3)
  Matches vc-do-command: Running bzr status revdiff...FAILED (... [-1-]

I'm left with a vc-dir buffer which looks like:

*   up-to-date           ChangeLog
*   removed              revdiff

However, the commit to the repository did complete OK.







^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#3214: vc-dir problem when committing removed file to bzr
  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
  0 siblings, 0 replies; 8+ messages in thread
From: Dan Nicolaescu @ 2010-01-20  7:16 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 3214

Glenn Morris <rgm@gnu.org> writes:

  > Just had what seems to be a same problem as this (bug#3214) with the
  > trunk from 2010-01-10.
  > 
  > In the emacs admin/ directory, I did (from the command-line):
  > 
  > bzr remove revdiff
  > 
  > Then I edited the ChangeLog file, then did M-x vc-dir on the admin
  > directory.
  > 
  > In the resulting buffer, the ChangeLog was marked as modified, and
  > revdiff as removed.
  > 
  > I marked both files, hit `v', entered a log message, and tried to
  > commit. The vc-dir process finished with an error:
  > 
  >   Running bzr status ChangeLog in foreground...
  >   Running bzr status ChangeLog...OK = 0
  >   Running bzr status revdiff in foreground...
  >   vc-do-command: Running bzr status revdiff...FAILED (status 3)
  >   Matches vc-do-command: Running bzr status revdiff...FAILED (... [-1-]


We get to vc-do-command like this:
 vc-bzr-state -> vc-bzr-status -> vc-bzr-command -> vc-do-command

vc-bzr-command is passed a 0 for OKSTATUS.
but 
bzr status revdiff 
returns 3, that is why the message above is printed.
Changing that 0 to 3 helps, but then vc-bzr-state prints 
"bzr: ERROR: Path(s) do not exist: revdiff".

Maybe we can make vc-bzr-status ignore that message.

I'd like to get a second opinion before making the 2 changes above (0->3
and ignore the error message).

  > I'm left with a vc-dir buffer which looks like:
  > 
  > *   up-to-date           ChangeLog
  > *   removed              revdiff
  > 
  > However, the commit to the repository did complete OK.

The calls above occur after the checkin has been completed.






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#3214: 23.0.92; VC dir mode fails after commit when files are deleted
  2009-05-04 22:38 bug#3214: 23.0.92; VC dir mode fails after commit when files are deleted Bob Rogers
  2010-01-20  3:58 ` bug#3214: vc-dir problem when committing removed file to bzr Glenn Morris
@ 2023-10-15 10:34 ` Mauro Aranda
  2023-10-21  1:29   ` Bob Rogers
  1 sibling, 1 reply; 8+ messages in thread
From: Mauro Aranda @ 2023-10-15 10:34 UTC (permalink / raw)
  To: rogers; +Cc: rgm, 3214, dann

Bob Rogers <rogers-emacs@rgrjr.dyndns.org> writes:

 >    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.
 >

I tried to reproduce this bug, but couldn't.  I tried with svn and with
git, and didn't get an error.

I also tried the recipe in Emacs 27.1 (the oldest one I have available
here), and still wasn't able to reproduce it.

Are you still seeing this?






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#3214: 23.0.92; VC dir mode fails after commit when files are deleted
  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
  0 siblings, 1 reply; 8+ messages in thread
From: Bob Rogers @ 2023-10-21  1:29 UTC (permalink / raw)
  To: Mauro Aranda; +Cc: rgm, 3214, dann

   From: Mauro Aranda <maurooaranda@gmail.com>
   Date: Sun, 15 Oct 2023 07:34:09 -0300

   I tried to reproduce this bug, but couldn't.  I tried with svn and with
   git, and didn't get an error.

   I also tried the recipe in Emacs 27.1 (the oldest one I have available
   here), and still wasn't able to reproduce it.

   Are you still seeing this?

No, at least not in current master with git.  Feel free to close it.
(I'd totally forgotten about this.)

					-- Bob





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#3214: 23.0.92; VC dir mode fails after commit when files are deleted
  2023-10-21  1:29   ` Bob Rogers
@ 2023-10-21 10:21     ` Mauro Aranda
  2023-10-21 10:36       ` Stefan Kangas
  0 siblings, 1 reply; 8+ messages in thread
From: Mauro Aranda @ 2023-10-21 10:21 UTC (permalink / raw)
  To: Bob Rogers; +Cc: rgm, 3214

On 20/10/23 22:29, Bob Rogers wrote:
 >    From: Mauro Aranda <maurooaranda@gmail.com>
 >    Date: Sun, 15 Oct 2023 07:34:09 -0300
 >
 >    I tried to reproduce this bug, but couldn't.  I tried with svn and 
with
 >    git, and didn't get an error.
 >
 >    I also tried the recipe in Emacs 27.1 (the oldest one I have available
 >    here), and still wasn't able to reproduce it.
 >
 >    Are you still seeing this?
 >
 > No, at least not in current master with git.  Feel free to close it.
 > (I'd totally forgotten about this.)
 >
 >                     -- Bob

Thanks for checking.  I'm inclined to leave it open a while longer and
see if anyone interested can reproduce it, maybe with some other
backend.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#3214: 23.0.92; VC dir mode fails after commit when files are deleted
  2023-10-21 10:21     ` Mauro Aranda
@ 2023-10-21 10:36       ` Stefan Kangas
  2023-10-21 11:24         ` Mauro Aranda
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Kangas @ 2023-10-21 10:36 UTC (permalink / raw)
  To: Mauro Aranda, Bob Rogers; +Cc: rgm, 3214

tags 3214 + fixed
thanks

Mauro Aranda <maurooaranda@gmail.com> writes:

> Thanks for checking.  I'm inclined to leave it open a while longer and
> see if anyone interested can reproduce it, maybe with some other
> backend.

I think we can probably close it, given that it's been open for 14 years
already.  If anyone wants to test with other backends, they will have 30
days to reply back before a closed bug is archived.

BTW, thanks everyone for triaging and paying attention to these very old
bug reports.  That is much appreciated.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#3214: 23.0.92; VC dir mode fails after commit when files are deleted
  2023-10-21 10:36       ` Stefan Kangas
@ 2023-10-21 11:24         ` Mauro Aranda
  0 siblings, 0 replies; 8+ messages in thread
From: Mauro Aranda @ 2023-10-21 11:24 UTC (permalink / raw)
  To: Stefan Kangas, Bob Rogers; +Cc: rgm, 3214

close 3214
quit


On 21/10/23 07:36, Stefan Kangas wrote:
 > tags 3214 + fixed
 > thanks
 >
 > Mauro Aranda <maurooaranda@gmail.com> writes:
 >
 >> Thanks for checking.  I'm inclined to leave it open a while longer and
 >> see if anyone interested can reproduce it, maybe with some other
 >> backend.
 >
 > I think we can probably close it, given that it's been open for 14 years
 > already.  If anyone wants to test with other backends, they will have 30
 > days to reply back before a closed bug is archived.
 >

No objections from me.  Everyone, feel free to reopen if you find a way
to reproduce it.






^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-10-21 11:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-04 22:38 bug#3214: 23.0.92; VC dir mode fails after commit when files are deleted Bob Rogers
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

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).