[darcs-users] symbolic links
Albert Reiner
areiner at tph.tuwien.ac.at
Mon Dec 17 19:18:01 UTC 2007
On Sun, Dec 16, 2007 at 04:30:43PM -0500, David Roundy wrote:
> I'm not clear what you would like darcs to do with symbolic links. Do you
> want darcs to delete the symbolic links when file contents change? That's
> the only sane behavior I can imagine, but it hardly seems useful. Perhaps
> you could give us a hint what you want to do with symbolic links, and why
> you think they'd be better than just copying the file contents.
No, deleting the file contents is definitely not what I want. And I
would hardly call it sane, either, especially if this happens
silently.
What I want is for darcs to ignore that those are symbolic links, and
to treat the file contents as if they were hard links or copies, at
least as an optional behavior. This also seems to be the behavior of
least surprise, and it is the way things used to be.
And the reason I think that is preferable to copying the files is that
I expect a RCS to accomodate my work habits as much as possible
(especially if it did work in the past), and that I am not really keen
on adapting my habits to the quirks of the RCS. In other words: I do
not want to re-write my Makefiles and other scripts just for the sake
of an RCS, but in some cases I want the files pulled into my working
directory by those scripts etc. to reside in the repository anyway.
Copying might be a work-around, but I am not sure I want to go through
all the trouble of changing the scripts etc.; sticking some option
into my preferences file is about the most I am willing to do.
Downgrading to an earlier version of darcs is an option, too.
> > At any rate, automatically flagging items for removal from the
> > repository seems an extremely unfortunate design decision, especially
> > if the behavior I want and is likely to be expected by many users was
> > present in earlier versions.
>
> Perhaps you could point to a bug report describing the behavior you
> describe? Or file such a bug report? I really have no idea under what
> circumstance this is happening to you, running what darcs commands, or how
> to reproduce it.
My original description was not accurate: my impression arose because
(1) things worked in the past, and (2) the files are replaced by the
symlinks whenever the scripts in the working directory are run so that
I am never consciously setting up links. The net effect is that
symlinks are flagged for removal if only I run the scripts in the
working tree.
At any rate, the following does exhibit the unfortunate behavior:
$ mkdir foo
$ cd foo
$ touch a
$ darcs init
$ darcs add a
$ darcs rec -a -m 'add a'
Finished recording patch 'add a'
$ rm a
$ touch b
$ ln -s b a
$ darcs w
{
rmfile ./a
}
The expected (and for my applications correct) answer in the last step
would be
$ darcs w
No changes!
as the contents of a have not changed at all.
Best regards,
Albert.
More information about the darcs-users
mailing list