On Tue, Nov 07, 2006 at 07:30:22PM +0100, Wolfgang Jeltsch wrote: > Am Dienstag, 7. November 2006 19:04 schrieb Tommy Pettersson: > > On Tue, Nov 07, 2006 at 10:14:41AM -0500, Jorey Bump wrote: > > > Is it safe to delete the corresponding (and huge) patch file, now? > > > > Yes. It is mainly left for debugging / crash recovery purposes, > > but if it is a hard link and you later pull the same patch again > > it can also be "reused" instead of being replaced with a > > space-consuming copy. > > What do you mean with “if it is a hard link”? To my knowledge, every file on > a Unix-like file system has a hard link pointing to it, and creating hard > links explicitly just results in a file having more than one hard link > pointing to it. > > In addition, I thought that darcs' hard link feature is just about sharing > patch files between repositories, not reusing previously unused patch files. > > > There are plans to make Pull create hard links all by itself, > > Is this about pull creating hard links to the patch files in the repository > pulled from? I thought that darcs already does so.
Links are only created by Get and Optimize --relink (and maybe Put, I don't know). All other commands that adds or modifies patches uses a writePatch function. This function _replaces_ files, which destroys any link sharing (which is its intended purpose). But it first checks if the file contents is already correct, because sometimes "modified" patches haven't really changed, so it doesn't destroy links unnecessarily. As a side effect, a lingering patch file with the correct contents (which happens if you Unpull and then Pull a patch) is "kept", and its linkage is preserved. -- Tommy Pettersson <[EMAIL PROTECTED]> _______________________________________________ darcs-users mailing list [email protected] http://www.abridgegame.org/mailman/listinfo/darcs-users
