Created on 2007-09-18.21:04:15 by trentbuck, last changed 2009-08-27.14:12:56 by admin.
msg2133 (view) |
Author: twb |
Date: 2007-09-18.21:04:14 |
|
Observe that my test fails because the trackdown copy of the repo
doesn't use --set-scripts-executable.
$ darcs --version
1.0.9rc1 (release candidate 1)
$ grep executable ~/.darcs/defaults
ALL set-scripts-executable
$ darcs trackdown ./transmute
Tracking down command:
./transmute
/bin/sh: ./transmute: Permission denied
Trying without the patch:
Wed Sep 19 01:27:36 EST 2007 Trent W. Buck <twb@cyber.com.au>
* Mimic sh -x.
/bin/sh: ./transmute: Permission denied
Trying without the patch:
Mon Aug 20 06:54:36 EST 2007 Trent W. Buck <trentbuck@gmail.com>
* Care when a child fails.
/bin/sh: ./transmute: Permission denied
Trying without the patch:
Mon Aug 20 06:52:46 EST 2007 Trent W. Buck <trentbuck@gmail.com>
* Define FORK-AND-WAIT.
/bin/sh: ./transmute: Permission denied
Trying without the patch:
Mon Aug 20 06:49:48 EST 2007 Trent W. Buck <trentbuck@gmail.com>
* Define WHEN, UNLESS and ASSERT.
/bin/sh: ./transmute: Permission denied
Trying without the patch:
Mon Aug 20 05:53:04 EST 2007 Trent W. Buck <trentbuck@gmail.com>
* Implement command-line interface.
No argument parsing yet.
Noone passed the test!
|
msg2139 (view) |
Author: droundy |
Date: 2007-09-21.16:54:43 |
|
This should be a straightforward bug to fix. Thanks for the bug report!
David
|
msg4325 (view) |
Author: tux_rocker |
Date: 2008-04-24.18:18:13 |
|
It seems this bug is still there. I'm going in.
|
msg4326 (view) |
Author: kowey |
Date: 2008-04-24.18:26:11 |
|
Yay! Watch out, though. I suspect it's not just about enabling the
flag, but figuring out how to make it chmod scripts that it undeletes
when unpulling a patch.
Plus maybe getting things nice and factored.
|
msg4327 (view) |
Author: kowey |
Date: 2008-04-24.18:26:19 |
|
Yay! Watch out, though. I suspect it's not just about enabling the
flag, but figuring out how to make it chmod scripts that it undeletes
when unpulling a patch.
Plus maybe getting things nice and factored.
|
msg4329 (view) |
Author: tux_rocker |
Date: 2008-04-25.08:58:41 |
|
Hmmm, in src/Darcs/Repository/Pristine.lhs lines 136 and 137 we find:
-- We don't need flags for now, since we don't care about
-- SetScriptsExecutable for the pristine cache.
It seems however that the bug reporter does care, for the effect of the patch
that adds the test file is stored in the pristine cache.
|
msg4330 (view) |
Author: kowey |
Date: 2008-04-25.10:51:13 |
|
One thing I'm wondering about: rather than having a --set-scripts-executable
flag, how about distributing a little posthook program that walks a directory
tree and does the chmoding for you?
We could stick it in tools.darcs.net, I suppose.
|
msg4331 (view) |
Author: twb |
Date: 2008-04-25.11:03:50 |
|
On Fri, Apr 25, 2008 at 10:51:15AM -0000, Eric Kow wrote:
> One thing I'm wondering about: rather than having a
> --set-scripts-executable flag, how about distributing a little
> posthook program that walks a directory tree and does the chmoding
> for you?
Hell, the existing --set-scripts-executable switch as used by apply is
already a hack -- you might as well rip that out and replace it with
the aforementioned utility.
Incidentally, that was exactly the workaround I used when I reported
the bug; since I only had one executable and I knew its name, I just
passed 'chmod +x thingy' as the setup argument.
|
msg4333 (view) |
Author: kowey |
Date: 2008-04-25.11:05:38 |
|
> Hell, the existing --set-scripts-executable switch as used by apply is
> already a hack -- you might as well rip that out and replace it with
> the aforementioned utility.
Right, that's what I meant.
|
msg4394 (view) |
Author: tux_rocker |
Date: 2008-04-30.09:31:34 |
|
Because it's unclear what the semantics of --set-scripts-executable for record
can and should be (and whether --set-scripts-executable is a good idea at all),
and no one has told me, I'm unassigning this bug from me.
|
msg4395 (view) |
Author: kowey |
Date: 2008-04-30.09:37:55 |
|
Did you mean 'what the semantics of --set-scripts-executable for /trackdown/
can and should be'?
If so, perhaps we can discuss this. I get the impression that the expected
behaviour would be for all scripts in the temporary working dir created by
trackdown to be +x at all times. For instance, if the trackdown decides it
needs to unapply a patch, it should ensure that any scripts created in the
process are executable.
Or is that too vague?
|
msg4396 (view) |
Author: tux_rocker |
Date: 2008-04-30.10:06:01 |
|
> Did you mean 'what the semantics of --set-scripts-executable for
> /trackdown/
> can and should be'?
Possibly. But the way I made it work for unhashed repositories, I enabled
--set-scripts-executable for record. That way, scripts get stored
executably in the pristine and will end up as executables in the test
working directory. This is, I presume, why the test works if you get
--set-scripts-executable.
And of course, if you want the test to work for trackdown, you also want
it to work for record.
> If so, perhaps we can discuss this. I get the impression that the
> expected
> behaviour would be for all scripts in the temporary working dir created by
> trackdown to be +x at all times. For instance, if the trackdown decides
> it
> needs to unapply a patch, it should ensure that any scripts created in the
> process are executable.
The only case I can see, in which a file needs to be set executable during
the trackdown, is when a patch that removes a script is unapplied. In that
case, doesn't darcs eventually call the apply function for a hunk patch
that sets the file executable if it starts with '#!' and
--set-scripts-executable is given?
|
msg4397 (view) |
Author: kowey |
Date: 2008-04-30.10:11:28 |
|
> Possibly. But the way I made it work for unhashed repositories, I enabled
> --set-scripts-executable for record. That way, scripts get stored
> executably in the pristine and will end up as executables in the test
> working directory. This is, I presume, why the test works if you get
> --set-scripts-executable.
Ooh, I don't think it would be very nice to change /anything/ about
pristine. Having --set-scripts-executable affect the test-working
directory sounds like a good thing for record and amend-record... just
not through the pristine directory.
> And of course, if you want the test to work for trackdown, you also want
> it to work for record.
I see. Thanks for pointing that out.
> The only case I can see, in which a file needs to be set executable during
> the trackdown, is when a patch that removes a script is unapplied. In that
> case, doesn't darcs eventually call the apply function for a hunk patch
> that sets the file executable if it starts with '#!' and
> --set-scripts-executable is given?
Well... we could find out by looking in the source code. I remember
that Darcs.Patch.Apply does some detection on this. Another way to
find out is to write a test :-)
|
msg4401 (view) |
Author: tux_rocker |
Date: 2008-04-30.11:09:50 |
|
Op 30-apr-2008, om 12:11 heeft Eric Kow het volgende geschreven:
> Ooh, I don't think it would be very nice to change /anything/ about
> pristine. Having --set-scripts-executable affect the test-working
> directory sounds like a good thing for record and amend-record... just
> not through the pristine directory.
OK, but executable files end up in the pristine already, and I construed that as
a feature, not a bug.
|
msg5190 (view) |
Author: twb |
Date: 2008-07-05.12:23:12 |
|
| Mon Jun 2 21:21:55 EST 2008 David Roundy <droundy@darcs.net>
| * skip issue538.sh on windows, since I don't know how to run tests
| since ./test.sh isn't accepted on windows.
| hunk ./tests/issue538.sh 7
| +if echo $OS | grep -i windows; then
| + echo I do not know how to run a test program under windows
| + exit 0
| +fi
| +
Since you already seem to be using unix commands (grep), perhaps you
could use stat(1) or find(1), both of which can examine the
executability (i.e. mode, on Unix) of files, e.g.
$ touch x y
$ chmod +x x
$ stat -c %a\ %A\ %n x y
755 -rwxr-xr-x x
644 -rw-r--r-- y
$ find -executable -type f
./x
$
|
msg5192 (view) |
Author: twb |
Date: 2008-07-05.12:42:55 |
|
This doesn't appear to be fixed:
$ darcs trackdown --set-scripts-executable /bin/true
darcs failed: unrecognized option `--set-scripts-executable'
|
msg5194 (view) |
Author: twb |
Date: 2008-07-05.12:45:33 |
|
Regarding my previous message; that test obviously fails in 2.0.0,
because implementation took place AFTER 2.0.0 (but before the 2.0.2
release).
|
|
Date |
User |
Action |
Args |
2007-09-18 21:04:16 | trentbuck | create | |
2007-09-21 16:54:43 | droundy | set | topic:
+ ProbablyEasy status: unread -> unknown messages:
+ msg2139 |
2008-01-27 04:31:32 | markstos | set | topic:
+ Confirmed nosy:
+ jaredj |
2008-01-28 17:38:09 | markstos | link | issue626 superseder |
2008-02-16 16:29:25 | markstos | set | status: unknown -> has-patch nosy:
droundy, tommy, beschmi, kowey, trentbuck, jaredj |
2008-04-24 18:18:15 | tux_rocker | set | nosy:
+ tux_rocker messages:
+ msg4325 assignedto: tux_rocker |
2008-04-24 18:26:12 | kowey | set | nosy:
droundy, tommy, beschmi, kowey, trentbuck, jaredj, tux_rocker messages:
+ msg4326 |
2008-04-24 18:26:20 | kowey | set | nosy:
droundy, tommy, beschmi, kowey, trentbuck, jaredj, tux_rocker messages:
+ msg4327 |
2008-04-25 08:58:43 | tux_rocker | set | nosy:
droundy, tommy, beschmi, kowey, trentbuck, jaredj, tux_rocker messages:
+ msg4329 |
2008-04-25 10:51:14 | kowey | set | nosy:
droundy, tommy, beschmi, kowey, trentbuck, jaredj, tux_rocker messages:
+ msg4330 |
2008-04-25 11:03:53 | twb | set | nosy:
+ twb messages:
+ msg4331 |
2008-04-25 11:05:40 | kowey | set | nosy:
droundy, tommy, beschmi, kowey, trentbuck, twb, jaredj, tux_rocker messages:
+ msg4333 |
2008-04-30 09:31:35 | tux_rocker | set | nosy:
+ dagit messages:
+ msg4394 assignedto: tux_rocker -> (no value) |
2008-04-30 09:31:48 | tux_rocker | set | status: has-patch -> unknown nosy:
droundy, tommy, beschmi, kowey, dagit, trentbuck, twb, jaredj, tux_rocker |
2008-04-30 09:37:56 | kowey | set | nosy:
droundy, tommy, beschmi, kowey, dagit, trentbuck, twb, jaredj, tux_rocker messages:
+ msg4395 |
2008-04-30 10:06:03 | tux_rocker | set | nosy:
droundy, tommy, beschmi, kowey, dagit, trentbuck, twb, jaredj, tux_rocker messages:
+ msg4396 |
2008-04-30 10:11:29 | kowey | set | nosy:
droundy, tommy, beschmi, kowey, dagit, trentbuck, twb, jaredj, tux_rocker messages:
+ msg4397 |
2008-04-30 10:25:33 | tux_rocker | set | nosy:
droundy, tommy, beschmi, kowey, dagit, trentbuck, twb, jaredj, tux_rocker messages:
+ msg4399 |
2008-04-30 11:06:48 | tux_rocker | set | nosy:
droundy, tommy, beschmi, kowey, dagit, trentbuck, twb, jaredj, tux_rocker messages:
- msg4399 |
2008-04-30 11:09:54 | tux_rocker | set | nosy:
droundy, tommy, beschmi, kowey, dagit, trentbuck, twb, jaredj, tux_rocker messages:
+ msg4401 |
2008-05-01 18:48:52 | tux_rocker | set | status: unknown -> has-patch nosy:
droundy, tommy, beschmi, kowey, dagit, trentbuck, twb, jaredj, tux_rocker assignedto: tux_rocker |
2008-05-02 22:34:43 | tux_rocker | set | status: has-patch -> resolved nosy:
droundy, tommy, beschmi, kowey, dagit, trentbuck, twb, jaredj, tux_rocker |
2008-07-05 12:23:17 | twb | set | status: resolved -> unknown nosy:
droundy, tommy, beschmi, kowey, dagit, trentbuck, twb, jaredj, tux_rocker messages:
+ msg5190 title: RFE trackdown --set-scripts-executable -> ./foo.sh doesn't work on Windows |
2008-07-05 12:42:59 | twb | set | nosy:
droundy, tommy, beschmi, kowey, dagit, trentbuck, twb, jaredj, tux_rocker messages:
+ msg5192 title: ./foo.sh doesn't work on Windows -> not really resolved? |
2008-07-05 12:45:36 | twb | set | nosy:
droundy, tommy, beschmi, kowey, dagit, trentbuck, twb, jaredj, tux_rocker messages:
+ msg5194 title: not really resolved? -> oops, fixed in 2.0.2 but not in 2.0.0 |
2008-07-24 10:44:48 | kowey | set | status: unknown -> resolved nosy:
droundy, tommy, beschmi, kowey, dagit, trentbuck, twb, jaredj, tux_rocker |
2008-10-19 08:08:45 | twb | set | nosy:
+ dmitry.kurochkin, simon, thorkilnaur title: oops, fixed in 2.0.2 but not in 2.0.0 -> wish: trackdown --set-scripts-executable |
2009-08-06 17:48:10 | admin | set | nosy:
+ markstos, jast, Serware, darcs-devel, zooko, mornfall, - droundy, trentbuck, twb, jaredj, tux_rocker |
2009-08-06 20:43:57 | admin | set | nosy:
- beschmi |
2009-08-10 22:08:32 | admin | set | nosy:
+ tux_rocker, twb, trentbuck, jaredj, - markstos, darcs-devel, zooko, jast, Serware, mornfall |
2009-08-11 00:02:25 | admin | set | nosy:
- dagit |
2009-08-25 17:31:24 | admin | set | nosy:
+ darcs-devel, - simon |
2009-08-27 14:12:56 | admin | set | nosy:
tommy, kowey, darcs-devel, trentbuck, twb, thorkilnaur, jaredj, tux_rocker, dmitry.kurochkin |
|