GNU bug report logs - #3214
23.0.92; VC dir mode fails after commit when files are deleted

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Bob Rogers <rogers-emacs@HIDDEN>; dated Mon, 4 May 2009 22:45:03 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 3214 <at> debbugs.gnu.org:


Received: (at 3214) by debbugs.gnu.org; 20 Jan 2010 07:16:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 20 02:16:19 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NXUna-0002mr-Tm
	for submit <at> debbugs.gnu.org; Wed, 20 Jan 2010 02:16:19 -0500
Received: from paul-mcgann-v0.ics.uci.edu ([128.195.1.147])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <dann@HIDDEN>) id 1NXUnZ-0002mk-Ee
	for 3214 <at> debbugs.gnu.org; Wed, 20 Jan 2010 02:16:18 -0500
Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101])
	by paul-mcgann-v0.ics.uci.edu (8.13.8/8.13.8) with ESMTP id
	o0K7G8AC012913
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Tue, 19 Jan 2010 23:16:08 -0800
Received: (from dann@localhost)
	by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id o0K7G8aC013349;
	Tue, 19 Jan 2010 23:16:08 -0800 (PST)
Date: Tue, 19 Jan 2010 23:16:08 -0800 (PST)
Message-Id: <201001200716.o0K7G8aC013349@HIDDEN>
From: Dan Nicolaescu <dann@HIDDEN>
To: Glenn Morris <rgm@HIDDEN>
Subject: Re: bug#3214: vc-dir problem when committing removed file to bzr
References: <20090504223845.381524862E@HIDDEN>
	<fr1vhll94x.fsf@HIDDEN>
X-Debbugs-No-Ack: yes
In-Reply-To: <fr1vhll94x.fsf@HIDDEN> (Glenn Morris's message of
	"Tue, 19 Jan 2010 22:58:54 -0500")
Lines: 48
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-ICS-MailScanner-Information: Please send mail to helpdesk@HIDDEN or
	more information
X-ICS-MailScanner-ID: o0K7G8AC012913
X-ICS-MailScanner: Found to be clean
X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (not cached,
	score=-1.363, required 5, autolearn=disabled, ALL_TRUSTED -1.44,
	TW_BZ 0.08)
X-ICS-MailScanner-From: dann@HIDDEN
X-Spam-Status: No
X-Spam-Score: -2.6 (--)
X-Debbugs-Envelope-To: 3214
Cc: 3214 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.6 (--)

Glenn Morris <rgm@HIDDEN> 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.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#3214; Package emacs. Full text available.

Message received at 3214 <at> debbugs.gnu.org:


Received: (at 3214) by debbugs.gnu.org; 20 Jan 2010 03:59:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 19 22:59:00 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NXRic-0000du-V2
	for submit <at> debbugs.gnu.org; Tue, 19 Jan 2010 22:58:59 -0500
Received: from fencepost.gnu.org ([140.186.70.10])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <rgm@HIDDEN>) id 1NXRic-0000dp-2A
	for 3214 <at> debbugs.gnu.org; Tue, 19 Jan 2010 22:58:58 -0500
Received: from rgm by fencepost.gnu.org with local (Exim 4.69)
	(envelope-from <rgm@HIDDEN>)
	id 1NXRiY-0005CK-F2; Tue, 19 Jan 2010 22:58:54 -0500
From: Glenn Morris <rgm@HIDDEN>
To: 3214 <at> debbugs.gnu.org
Subject: vc-dir problem when committing removed file to bzr
X-Spook: lynch S Key pre-emptive Uzi warfare diwn Centro Cohiba
X-Ran: .~t`DN5PL)I5KA-{zsiRiVln=p#[zP.AGxj?LSzR:!JjWLfn$@4CSy8gonD_taxk9ji/%l
X-Hue: cyan
X-Debbugs-No-Ack: yes
X-Attribution: GM
Date: Tue, 19 Jan 2010 22:58:54 -0500
Message-ID: <fr1vhll94x.fsf@HIDDEN>
User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Score: -6.0 (------)
X-Debbugs-Envelope-To: 3214
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.0 (------)


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.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#3214; Package emacs. Full text available.

Message received at submit@HIDDEN:


Received: (at submit) by emacsbugs.donarmstrong.com; 4 May 2009 22:38:55 +0000
From rogers-emacs@HIDDEN Mon May  4 15:38:55 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA,MURPHY_DRUGS_REL8
	autolearn=no version=3.2.5-bugs.debian.org_2005_01_02
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 <submit@HIDDEN>; Mon, 4 May 2009 15:38:50 -0700
Received: from mx10.gnu.org ([199.232.76.166]:39150)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <rogers-emacs@HIDDEN>)
	id 1M16oC-0000dH-UU
	for emacs-pretest-bug@HIDDEN; Mon, 04 May 2009 18:38:49 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <rogers-emacs@HIDDEN>)
	id 1M16oA-0005da-Pr
	for emacs-pretest-bug@HIDDEN; Mon, 04 May 2009 18:38:48 -0400
Received: from rgrjr.com ([216.146.47.5]:42648)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <rogers-emacs@HIDDEN>)
	id 1M16oA-0005dS-CW
	for emacs-pretest-bug@HIDDEN; Mon, 04 May 2009 18:38:46 -0400
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 <emacs-pretest-bug@HIDDEN>; Mon,  4 May 2009 22:38:45 +0000 (UTC)
Received: (qmail 17461 invoked by uid 89); 4 May 2009 22:38:45 -0000
Received: from unknown (HELO rgr.rgrjr.com) (192.168.57.1)
  by home with SMTP; 4 May 2009 22:38:45 -0000
Received: by rgr.rgrjr.com (Postfix, from userid 500)
	id 381524862E; Mon,  4 May 2009 18:38:45 -0400 (EDT)
From: Bob Rogers <rogers-emacs@HIDDEN>
To: emacs-pretest-bug@HIDDEN
Subject: 23.0.92; VC dir mode fails after commit when files are deleted
Message-Id: <20090504223845.381524862E@HIDDEN>
Date: Mon,  4 May 2009 18:38:45 -0400 (EDT)
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3)

   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




Acknowledgement sent to Bob Rogers <rogers-emacs@HIDDEN>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Report forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#3214; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.