[darcs-users] it would be useful for patch-tag to turn off hard linking for darcs storage. can anyone suggest how to do that?

Trent W. Buck trentbuck at gmail.com
Sat Dec 19 05:14:35 UTC 2009


Thomas Hartman <thomashartman1 at googlemail.com> writes:

> it would be useful for patch-tag to turn off hard linking for darcs
> storage (in pristine.hashed, patches, and so on). can anyone suggest
> the most straightforward way to do that?

Why would it be useful?

A straightforward way would be to place each repository on its own
filesystem, to use a filesystem that doesn't support hard links
(e.g. vfat), or to have a cron job that periodically breaks hard links,
e.g. (untested)

    find _darcs -type f -exec sed -i {} +

(perl -i and GNU sed -i should do a temporary file dance, which will
indirectly create a new inode and thus break the hard link.)



More information about the darcs-users mailing list