[darcs-devel] Removing dirty flag from Slurpy?
Ian Lynagh
igloo at earth.li
Sun May 8 07:00:42 PDT 2005
On Sun, May 01, 2005 at 08:43:21AM -0400, David Roundy wrote:
>
> replacing
>
> s <- slurp "."
> slurp_write_dirty (apply patch s)
>
> with
>
> apply patch
slurp_write_dirty also takes the options, which tells us whether to make
things executable or not (I think that means things will currently be
inconsistent depending on which the codepath you hit uses, but I'm not
sure).
We could solve this by passing opts to apply, and on to the file writing
functions which could do this. However, as I think
--set-scripts-executable is an ugly hack that I'd like to see disappear,
I don't like the idea of the widespread changes this would need.
Instead I'd like to see 1.0.4 (I don't want to hold 1.0.3 up) having
support for executable file patches and then these changes can be in
1.0.5 (or perhaps we can make it possible for people to choose to use
executable patches in 1.0.4 if we get the repo feature stuff done for
then).
For now I would suggest just allowing:
FP fn (Permissions Executable All True)
FP fn (Permissions Executable All False)
I think this should be forwards compatible with whatever we end up doing
to support a broader set of permissions.
Actually, what would All mean on Windows? Would it allow people who
wouldn't otherwise be able to read it to run it? If so, Owner or User
might be better.
Ultimately I think we should head for
PermType = Executable | Readable | Writable
PermWho = Owner | ... | All
I'm not quite sure what the ... is, and whether it is hardcoded or
freeform. I tend towards freeform, with preferences being used to map
strings to effects; if a string isn't mapped then the patch has no
effect; if the mapping for a string is changed then we should react
accordingly (which could be fun).
Thanks
Ian
More information about the darcs-devel
mailing list