[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

the final story on CVS and symlinks

From: Robert P. J. Day
Subject: the final story on CVS and symlinks
Date: Tue, 24 Feb 2004 06:47:21 -0500 (EST)

  i thought i'd summarize my quest for CVS symlinks, for those who plan
on going through the same thing, and i'll ask a few questions along the

  first, AIUI ("as i understand it", it this an established acronym?),
current CVS just doesn't handle the storage of symlinks, and there are
no plans to extend it in that directory.  some respondents suggested
moving to meta-CVS but, really, i'm not about to change entire packages
just for symlinks. :-)

  so, the obvious solution is to store just the real files and recreate
the symlinks on checkout based on a config file.  this is apparently
the precise function of:

this is a perl script which works recursively from your current
directory and rebuilds symlinks based on a directory's ".symlinks"
file, which contains lines of the form:

realfile        desiredlinkname
realfile        desiredlinkname

and so on.  each directory is meant to contain its own .symlinks, of 
course.  and note that, at least with this script, if you want multiple 
links to the same file, you have to list each link name on a separate 
line; the script could easily be modified to list multiple link names on a 
single line, which might be nice.

there is one bit of weirdness with that script.  it was clearly designed 
for web pages, since it insists on recreating index.html files, even when
there's no call for it.  note the lines:

    # If $index_name is not listed in .symlinks and was not found in
    # the directory, force creation.
    if(!exists($desired{"$index_name"}) && !$found_index) {
        my($base) = basename($dir);
        $desired{$index_name} = "$base.$ext_name";

that code insists on creating the files index.html -> ..html.  i may not
be calling the script properly, but this seemed just borked to me, so i 
deleted those lines and everything works just peachy.

  thoughts?  so, still being new to the intricacies of CVS, how does one
have these links created automatically upon checkout?  or is it really 
worth the trouble?  it's not a big deal to do it manually, and that's how
i'm doing it now.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]