From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#5291: 23.1.91; "bzr status" FAILED Date: Sun, 03 Jan 2010 20:39:06 +0200 Message-ID: <834on3dodx.fsf@gnu.org> References: <83d41se72h.fsf@gnu.org> <201001022047.o02Kl0iT010221@godzilla.ics.uci.edu> <837hs0dw32.fsf@gnu.org> <201001022217.o02MHUE3013455@godzilla.ics.uci.edu> <83637jesmh.fsf@gnu.org> Reply-To: Eli Zaretskii , 5291@debbugs.gnu.org NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1262544561 16581 80.91.229.12 (3 Jan 2010 18:49:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 3 Jan 2010 18:49:21 +0000 (UTC) Cc: Dan Nicolaescu To: 5291@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jan 03 19:49:14 2010 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 1NRVVp-0000nX-Nw for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Jan 2010 19:49:14 +0100 Original-Received: from localhost ([127.0.0.1]:40267 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NRVVq-0005Zg-6H for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Jan 2010 13:49:14 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NRVVl-0005ZO-R7 for bug-gnu-emacs@gnu.org; Sun, 03 Jan 2010 13:49:09 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NRVVc-0005PA-0Z for bug-gnu-emacs@gnu.org; Sun, 03 Jan 2010 13:49:09 -0500 Original-Received: from [199.232.76.173] (port=37546 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NRVVb-0005Oq-Kd for bug-gnu-emacs@gnu.org; Sun, 03 Jan 2010 13:48:59 -0500 Original-Received: from [140.186.70.43] (port=41995 helo=debbugs.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NRVVa-00021k-4f for bug-gnu-emacs@gnu.org; Sun, 03 Jan 2010 13:48:59 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NRVTh-0000kP-KI; Sun, 03 Jan 2010 13:47:01 -0500 X-Loop: bug-gnu-emacs@gnu.org Mail-Followup-To: Eli Zaretskii , 5291@debbugs.gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Jan 2010 18:47:01 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5291 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 5291-submit@debbugs.gnu.org id=B5291.12625443882863 (code B ref 5291); Sun, 03 Jan 2010 18:47:01 +0000 Original-Received: (at 5291) by debbugs.gnu.org; 3 Jan 2010 18:46:28 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NRVTA-0000k8-AQ for submit@debbugs.gnu.org; Sun, 03 Jan 2010 13:46:28 -0500 Original-Received: from mtaout23.012.net.il ([80.179.55.175]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NRVT7-0000k1-Sp for 5291@debbugs.gnu.org; Sun, 03 Jan 2010 13:46:26 -0500 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0KVO00D00P5P2J00@a-mtaout23.012.net.il> for 5291@debbugs.gnu.org; Sun, 03 Jan 2010 20:41:07 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.127.222.44]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KVO00BTFP8IGO80@a-mtaout23.012.net.il>; Sun, 03 Jan 2010 20:41:07 +0200 (IST) In-reply-to: <83637jesmh.fsf@gnu.org> X-012-Sender: halo1@inter.net.il X-Spam-Score: -2.1 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list X-Spam-Score: -2.0 (--) Resent-Date: Sun, 03 Jan 2010 13:47:01 -0500 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org 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:33894 Archived-At: > Date: Sun, 03 Jan 2010 06:09:58 +0200 > From: Eli Zaretskii > Cc: 5291@debbugs.gnu.org > > > Date: Sat, 2 Jan 2010 14:17:30 -0800 (PST) > > From: Dan Nicolaescu > > Cc: 5291@debbugs.gnu.org > > > > What exactly creates the d:/gnu/bzr/emacs/trunk/bzr_log.ahvp69 file? > > "bzr commit" does. This file is where it puts the list of files to be > committed, then submits it to $EDITOR (in my case, emacsclient), and > expects me to insert the commit message there. After "bzr commit" is > done (i.e., the changes committed), this file is deleted by bzr. > > > Is your TEMP set to d:/gnu/bzr/emacs/trunk/ ? > > No. AFAIU, bzr creates these temporary files in the directory where > you run "bzr commit". I see these files created in the current > directory on GNU/Linux as well, although I will have to check if the > same problem happens there as well as on Windows. > > > I think that if you change: > > (vc-bzr-command "status" t 0 file) > > to: > > (vc-bzr-command "status" t 3 file) > > in vc-bzr-status > > it should work, but I am not 100% sure that's TRTD. > > OK, I will look into this when I have a chance. Thanks. I found the problem. It seems to be Windows-specific. (I cannot reproduce it on GNU/Linux, but I have a slightly different version of Bazaar there, so it could be bzr-version specific as well. Still, the nature of the problem (see below) makes it a safe bet that it exists only on Windows.) The detailed reason for the failure is found in the .bzr.log file: LockContention: Could not acquire lock "D:/gnu/bzr/emacs/test/.bzr/checkout/dirstate": (32, 'CreateFileW', 'The process cannot access the file because it is being used by another process.') What happens is evidently this: . I run "bzr ci", which locks dirstate and launches emacsclient to edit the commit message that it puts on a temporary file bzr_log.FOO in the directory where I run "bzr ci". . The file with the commit message pops up in Emacs, where I edit it. . When I'm done editing, I save the bzr_log.FOO file. . Emacs then run "bzr status bzr_log.FOO" as a side effect of C-x C-s, because the file is inside a versioned directory. This "bzr status" tries to lock dirstate again, which fails, because Windows fails the CreateFileW system call due to sharing issues. I could probably submit a bug for Bazaar, but they would probably say that Emacs is to blame as well as Bazaar: it is Emacs who invokes the second instance of bzr while the first is still running. It would be nice if I could tell Bazaar to put those bzr_log.FOO files under $TMPDIR, but there doesn't seem to be a way of doing that. Anyone? Any ideas for how best to resolve this? > Do you (or someone else) know where can I find the documentation of > status code returned by bzr? To answer my own question: exit status 3 means that there was some fatal exception or error in running the command. When that happens, bzr writes a full traceback to .bzr.log file, so one should look there for that info.