0

If another developer adds a new directory to the CVS repository, I'd like my next update to bring this new directory into my working copy. Running cvs update doesn't do this. Running cvs update -d does, but it takes a helluva long time; it prints the pathname of every file in the repository and spends a little time thinking about each one. Running cvs update -d <dirname> in the new directory's parent does the job, but I have to know about the new directory first, and I have to do this for every new directory.

Is there an efficient way to get a complete update, including any newly-added directories, from a CVS server?

bythescruff
  • 1,869
  • 2
  • 17
  • 33

1 Answers1

0

Use a shell script which generates a custom $CVSIGNORE list for this type of update, then runs cvsupdate -d to do this:

CVS has a list of files (or sh(1) file name patterns) that it should ignore while running update, import and release. This list is constructed in the following way.

    The list is initialized to include certain file name patterns: names associated with CVS administration, or with other common source control systems; common names for patch files, object files, archive files, and editor backup files; and other names that are usually artifacts of assorted utilities. Currently, the default list of ignored file name patterns is:


        RCS     SCCS    CVS     CVS.adm
        RCSLOG  cvslog.*
        tags    TAGS
        .make.state     .nse_depinfo
        *~      #*      .#*     ,*      _$*     *$
        *.old   *.bak   *.BAK   *.orig  *.rej   .del-*
        *.a     *.olb   *.o     *.obj   *.so    *.exe
        *.Z     *.elc   *.ln
        core

    The per-repository list in ‘$CVSROOT/CVSROOT/cvsignore’ is appended to the list, if that file exists.
    The per-user list in ‘.cvsignore’ in your home directory is appended to the list, if it exists.
    Any entries in the environment variable $CVSIGNORE is appended to the list.
    Any ‘-I’ options given to CVS is appended.
    As CVS traverses through your directories, the contents of any ‘.cvsignore’ will be appended to the list. The patterns found in ‘.cvsignore’ are only valid for the directory that contains them, not for any sub-directories. 

In any of the 5 places listed above, a single exclamation mark (‘!’) clears the ignore list. This can be used if you want to store any file which normally is ignored by CVS. 

References

Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265