darcs

Issue 575 Permissions error on cygwin-on-vista.

Title Permissions error on cygwin-on-vista.
Priority bug Status given-up
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, eivuokko, granth, jaredj, kirby, kowey, nejucomo, rgm, thorkilnaur, tommy, wglozer
Assigned To kirby
Topics Windows

Created on 2008-01-03.19:37:04 by nejucomo, last changed 2017-07-30.23:36:28 by gh.

Messages
msg2309 (view) Author: nejucomo Date: 2008-01-03.19:37:02
On cygwin-on-vista, I untarred the darcsdir-cygwin package I
downloaded from zooko.com via darcs.net.

Then I went into my project, ran "darcs init", then I ran this:

$ for f in `find . -type f | grep -vEe '\.svn|_darcs|\.cvsignore'`; do
echo "=== $f ==="; darcs add "$f"; done

Aside from many lines beginning and ending with "===" there is only
one other line, in the middle of all the output:

realdarcs.exe: _darcs/patches/pending.new: renameFile: permission
denied (Permission denied)

When I view _darcs/patches in windows explorer, I see only
_darcs/patches/pending, and not "pending.new", so I couldn't see what
its permissions were.

Both regular files and directories created within _darcs have cygwin
mode 755, while my umask is 0022.  Why do the files have execute
permission?  If I run "touch foo", the newly created file does not
have execute permission, leading me to believe this is darcs-specific
behavior.

Finally, is there a better way to add a new project in a repository,
other than the bash for-loop approach above?
msg2311 (view) Author: droundy Date: 2008-01-04.18:51:29
On Thu, Jan 03, 2008 at 07:37:04PM -0000, nathan wilcox wrote:
> On cygwin-on-vista, I untarred the darcsdir-cygwin package I
> downloaded from zooko.com via darcs.net.
> 
> Then I went into my project, ran "darcs init", then I ran this:
> 
> $ for f in `find . -type f | grep -vEe '\.svn|_darcs|\.cvsignore'`; do
> echo "=== $f ==="; darcs add "$f"; done
> 
> Aside from many lines beginning and ending with "===" there is only
> one other line, in the middle of all the output:
> 
> realdarcs.exe: _darcs/patches/pending.new: renameFile: permission
> denied (Permission denied)
> 
> When I view _darcs/patches in windows explorer, I see only
> _darcs/patches/pending, and not "pending.new", so I couldn't see what
> its permissions were.

Hmmm.  This sounds like a possible windows filesystem semantics issue.
Unfortunately, we don't have any core darcs developers running windows
(unless Eric has a copy available?), and I doubt we've got any running
cygwin.  This makes it a bit hard to track down bugs like this.  :(

If we can find who compiled this binary, I'd be interested in the contents
of src/Workaround.lhs, in particular the contents of renameFile.

> Both regular files and directories created within _darcs have cygwin
> mode 755, while my umask is 0022.  Why do the files have execute
> permission?  If I run "touch foo", the newly created file does not
> have execute permission, leading me to believe this is darcs-specific
> behavior.

I have no idea how cygwin does permissions.  Since darcs itself isn't a
cygwin binary (unless someone's figured out how to compile for cygwin,
which might have happened, but I doubt, as ghc doesn't support cygwin), you
could try running it outside cygwin and see what happens.
-- 
David Roundy
Department of Physics
Oregon State University
msg2315 (view) Author: kowey Date: 2008-01-04.23:21:31
On Fri, Jan 04, 2008 at 23:13:32 +0000, Eric Y. Kow wrote:
> > Hmmm.  This sounds like a possible windows filesystem semantics issue.
> > Unfortunately, we don't have any core darcs developers running windows
> > (unless Eric has a copy available?), and I doubt we've got any running
> > cygwin.  This makes it a bit hard to track down bugs like this.  :(
> 
> I do have that copy, perhaps our official darcs Windows license and can
> ship it to any developers, or maybe just pass the key.

Argh... that's XP that I have, not Vista.
msg6327 (view) Author: kowey Date: 2008-10-16.12:53:42
I had asked Grant Husbands if he had any advice to give on Windows related
issues.  Here are his comments on this bug:

Maybe Darcs opens a file and tries to rename it while it's still               
                                                   
open? I think Windows doesn't allow that.
msg8240 (view) Author: kowey Date: 2009-08-18.11:55:10
Hi Nathan,

First to answer your question:
> Finally, is there a better way to add a new project in a repository,
> other than the bash for-loop approach above?

I think you're looking for darcs add -r, but watch out for this performance FAQ:
http://wiki.darcs.net/Troubleshooting#darcs%20record-runs-out-of-memory

Meanwhile, if you can confirm that you can still repeat this on Windows (and let
us know your darcs version), that would be great.  There's a chance you may need
to try a few times, maybe using a shell script to loop this N times.

Otherwise: it's possible that a more recent darcs fixes this issue.  I think we
need to defer this until we get a darcs 2.3 binary for Windows out the door
History
Date User Action Args
2008-01-03 19:37:04nejucomocreate
2008-01-04 18:51:31droundysetstatus: unread -> unknown
nosy: kowey, beschmi, droundy, nejucomo, tommy
messages: + msg2311
2008-01-04 23:21:32koweysetnosy: kowey, beschmi, droundy, tommy, nejucomo
messages: + msg2315
2008-02-10 02:40:14markstossetstatus: unknown -> deferred
nosy: + wglozer, eivuokko, rgm, jaredj
topic: + Windows
2008-10-16 12:53:44koweysetstatus: deferred -> unknown
nosy: + dmitry.kurochkin, granthusbands, dagit, thorkilnaur, simon
messages: + msg6327
2009-08-06 17:42:54adminsetnosy: + markstos, jast, Serware, darcs-devel, zooko, mornfall, - droundy, wglozer, eivuokko, granthusbands, nejucomo, rgm, jaredj
2009-08-06 20:39:53adminsetnosy: - beschmi
2009-08-10 22:10:15adminsetnosy: + wglozer, granthusbands, eivuokko, rgm, nejucomo, jaredj, - markstos, darcs-devel, zooko, jast, Serware, mornfall
2009-08-11 00:04:13adminsetnosy: - dagit
2009-08-18 11:55:13koweysetstatus: unknown -> deferred
nosy: + kirby
messages: + msg8240
2009-08-25 17:31:14adminsetnosy: + darcs-devel, - simon
2009-08-27 01:34:43koweysetstatus: deferred -> waiting-for
nosy: tommy, kowey, wglozer, darcs-devel, eivuokko, granthusbands, nejucomo, rgm, thorkilnaur, jaredj, dmitry.kurochkin, kirby
assignedto: kirby
2009-08-27 14:33:56adminsetnosy: tommy, kowey, wglozer, darcs-devel, eivuokko, granthusbands, nejucomo, rgm, thorkilnaur, jaredj, dmitry.kurochkin, kirby
2009-10-23 22:42:07adminsetnosy: + robmoss, - rgm
2009-10-24 00:07:59adminsetnosy: + rgm, - robmoss
2009-10-24 00:33:56adminsetnosy: + granth, - granthusbands
2017-07-30 23:36:28ghsetstatus: waiting-for -> given-up