On Mon, Nov 21, 2005 at 04:58:36PM -0600, Erik Schnetter wrote:
> On Nov 21, 2005, at 14:34:45, Juliusz Chroboczek wrote:
> 
> >>is there a way to tell `darcs optimize --relink' to use symbolic  
> >>links
> >>instead of hard links?
> >
> >No.  There's no way that could work.
> >
> >Under some circumstances, Darcs will change the contents of a file
> >without changing its name.  With hard links, the link will be broken
> >in this case, which is The Right Thing; with soft links, there's no
> >way to achieve this effect.
> 
> No, darcs will never change the contents of the file.  This is a very  
> important property of darcs, and it is what makes hard links safe.  A  
> patch, once recorded, is unchanging forever.

It's true that darcs doesn't modify the contents of the
patch files in _darcs/patches/, but it certainly sometimes
removes them and recreates them under the very same names but
with slightly different contents.  The hard link is broken
on removal of the file, so other repos keep their versions
unmodified, while the modified repo gets a new version of the
patch file.  If other repos had soft links to the file they
would also get the modified, and to them inconsistent, version.

> Soft links would also work fine.  There is only one potential problem  
> with that: if the original repo is deleted, then the soft links will  
> become invalid.  The patches are lost.  This does not happen with  
> hard links.  If you can live with that, then you could use soft links  
> instead.

Sorry, but no. Any command that can reorder the
repo's inventory can also replace the patch files in
_darcs/patches.  Optimize --reorder is an obvious such
command.  Unpull/Obliterate is another.  There are more,
and most importantly, it has not (yet) been promised that
any command will _not_ reorder the inventory.


-- 
Tommy Pettersson <[EMAIL PROTECTED]>

_______________________________________________
darcs-users mailing list
[email protected]
http://www.abridgegame.org/mailman/listinfo/darcs-users

Reply via email to