darcs

Issue 315 issue with editor files and locking

Title issue with editor files and locking
Priority bug Status resolved
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, fx, kowey, thorkilnaur, tommy
Assigned To
Topics

Created on 2006-10-17.15:58:47 by fx, last changed 2009-08-27.13:49:12 by admin.

Messages
msg1117 (view) Author: fx Date: 2006-10-17.15:58:37
I've just run into the following problem while sending a patch.  (It
would also occur when recording a patch.)

darcs fired up an Emacs session (via emacsclient, my EDITOR) to edit
the description.  That hung.  (Typing ^C at darcs sent the patch
without the explanation I'd have added, which is probably a bug.)

The reason is that the temporary editor file is created in the
repository, and my Emacs has darcs VC support, so that when it finds a
file it checks if it's registered with darcs.  It does that by running
`darcs query manifest' (rather than grovelling files in _darcs).  That
invocation of darcs hangs on the lock in the repository.

I've hacked a special case into the Emacs support, which should fix it
(as long as temporary file names match "^.darcs"), but this seems
unfortunate, and I could imagine it happening with other systems.

I wonder (a) whether `darcs query' (and other read-only commands)
really needs the lock, and (b) why the temporary editor files are
created in the repository.  I'd expect them to be created in TMPDIR
(or whatever's appropriate on the system).
msg1120 (view) Author: droundy Date: 2006-10-17.17:23:57
On Tue, Oct 17, 2006 at 03:58:47PM +0000, Dave Love wrote:
> I wonder (a) whether `darcs query' (and other read-only commands)
> really needs the lock, and (b) why the temporary editor files are
> created in the repository.  I'd expect them to be created in TMPDIR
> (or whatever's appropriate on the system).

(a) No, darcs query shouldn't take the lock.

(b) They're mostly created in the repo just so I won't have to figure out
how to create secure temp files in /tmp (which sounds like a very tricky
business--in fact, it didn't seem to be possible, in general, from what I
read).

David
msg1765 (view) Author: tommy Date: 2007-06-29.19:40:57
fixed in 1.0.9
History
Date User Action Args
2006-10-17 15:58:47fxcreate
2006-10-17 17:24:45droundysetstatus: unread -> unknown
nosy: droundy, tommy, kowey, fx
messages: + msg1120
2006-11-11 13:24:34tommysetstatus: unknown -> resolved-in-stable
nosy: droundy, tommy, kowey, fx
2007-06-29 19:40:58tommysetstatus: resolved-in-stable -> resolved
nosy: + beschmi
messages: + msg1765
2009-08-06 17:42:37adminsetnosy: + markstos, jast, Serware, dmitry.kurochkin, darcs-devel, zooko, dagit, mornfall, simon, thorkilnaur, - droundy, fx
2009-08-06 20:39:30adminsetnosy: - beschmi
2009-08-10 21:57:34adminsetnosy: + fx, - markstos, darcs-devel, zooko, jast, dagit, Serware, mornfall
2009-08-25 17:55:57adminsetnosy: + darcs-devel, - simon
2009-08-27 13:49:12adminsetnosy: tommy, kowey, fx, darcs-devel, thorkilnaur, dmitry.kurochkin