darcs

Issue 348 ssh-related commands leave a darcs-ssh directory behind.

Title ssh-related commands leave a darcs-ssh directory behind.
Priority bug Status resolved
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, edwint, jaredj, kowey, markstos, thorkilnaur, tommy
Assigned To
Topics ProbablyEasy, SSH

Created on 2006-11-15.09:43:59 by edwint, last changed 2009-08-27.13:59:13 by admin.

Messages
msg1224 (view) Author: edwint Date: 2006-11-15.09:43:52
When doing any command that uses ssh, I get a directory called "darcs-ssh" left
behind after it finishes (with Windows set up as it is for me, darcs uses the
current directory for temporary files).  I'd be inclined to blame
External.controlMasterPath for this (called by External.getSSH), since it
creates this directory with no provision to tidy it up afterwards.  I don't
understand the CM stuff well enough to attempt to fix it, though. (In the
meantime, creating C:\tmp\ makes darcs put tempfiles there, so it's out of the way)
msg1226 (view) Author: kowey Date: 2006-11-15.11:46:14
Worth fixing.

On Wed, Nov 15, 2006 at 09:43:59 +0000, Edwin wrote:
> When doing any command that uses ssh, I get a directory called "darcs-ssh" left
> behind after it finishes (with Windows set up as it is for me, darcs uses the
> current directory for temporary files).  I'd be inclined to blame
> External.controlMasterPath for this (called by External.getSSH), since it
> creates this directory with no provision to tidy it up afterwards.

External.exitSSHControlMaster should probably do it.

In more troubling news, control-C'ing some ssh stuff leaves the CM
socket around.  I'll file another bug.
msg1236 (view) Author: tommy Date: 2006-11-16.20:12:38
From an email to darcs-users:

| The problem is that when doing a get, push or pull via SSH,
| directories named darcs-ssh are created. I saw them inside the
| working copy, in the directory immediately above the root of the
| working copy and in _darcs/pristine.

From a darcs source comment:

| The location of that directory is determined by the contents of
| _darcs/prefs/tmpdir, if it exists, otherwise by DARCS_TMPDIR,
| and if that doesn't exist then TMPDIR, and if that doesn't
| exist, then /tmp. Finally, if none of those exist (as may be the
| case under windows) it creates the temporary directory in the
| current directory. So you'd better not call it while in
| _darcs/current...

I seems controlMasterPath (which calls tempdir_loc, for which the quoted comment
applies) _is_ called while in _darcs/pristine, and also in other places, at random.
msg1237 (view) Author: droundy Date: 2006-11-16.20:30:35
On Thu, Nov 16, 2006 at 08:12:49PM +0000, Tommy Pettersson wrote:
> >From a darcs source comment:
> 
> | The location of that directory is determined by the contents of
> | _darcs/prefs/tmpdir, if it exists, otherwise by DARCS_TMPDIR,
> | and if that doesn't exist then TMPDIR, and if that doesn't
> | exist, then /tmp. Finally, if none of those exist (as may be the
> | case under windows) it creates the temporary directory in the
> | current directory. So you'd better not call it while in
> | _darcs/current...
> 
> I seems controlMasterPath (which calls tempdir_loc, for which the quoted comment
> applies) _is_ called while in _darcs/pristine, and also in other places, at random.

Oi.  That's bad.  At a minimum, we should verify that _darcs is not in the
path of the current working directory.  That shouldn't be hard.
-- 
David Roundy
Deptartment of Physics
Oregon State University
msg2883 (view) Author: markstos Date: 2008-01-30.02:16:13
Would this bug be fixed by the recent patch named:

"avoid creating darcs-ssh if we aren't using ControlMaster." ?
msg2897 (view) Author: droundy Date: 2008-01-30.14:53:32
Yes.
History
Date User Action Args
2006-11-15 09:43:59edwintcreate
2006-11-15 11:46:19koweysetstatus: unread -> unknown
nosy: droundy, tommy, kowey, edwint
messages: + msg1226
2006-11-15 11:46:32koweysetstatus: unknown -> unread
nosy: droundy, tommy, kowey, edwint
topic: + ProbablyEasy
2006-11-16 20:12:49tommysetstatus: unread -> unknown
nosy: droundy, tommy, kowey, edwint
messages: + msg1236
2006-11-16 20:30:42droundysetnosy: droundy, tommy, kowey, edwint
messages: + msg1237
2007-08-14 21:03:09koweylinkissue518 superseder
2008-01-30 02:16:15markstossettopic: + SSH
nosy: + markstos, beschmi, jaredj
messages: + msg2883
2008-01-30 14:53:33droundysetstatus: unknown -> resolved-in-unstable
nosy: droundy, tommy, beschmi, kowey, markstos, edwint, jaredj
messages: + msg2897
2008-05-14 18:28:30koweysetstatus: resolved-in-unstable -> resolved
nosy: + dagit
2009-08-06 17:44:06adminsetnosy: + jast, Serware, dmitry.kurochkin, darcs-devel, zooko, mornfall, simon, thorkilnaur, - droundy, edwint, jaredj
2009-08-06 20:52:53adminsetnosy: - beschmi
2009-08-10 21:58:53adminsetnosy: + edwint, jaredj, - darcs-devel, zooko, jast, Serware, mornfall
2009-08-10 23:58:08adminsetnosy: - dagit
2009-08-25 17:57:04adminsetnosy: + darcs-devel, - simon
2009-08-27 13:59:13adminsetnosy: tommy, kowey, markstos, darcs-devel, edwint, thorkilnaur, jaredj, dmitry.kurochkin