Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2005

    Unanswered: Add directory(s) in CVS

    Hi All,

    I hope someone out there has answer to that: is the scenario:

    I checkout this structure from CVS :
    root/project/dir1/dir2 to My_CVS_Dir. I've another folder My_Dir and there is dir3 which I copy to My_CVS_Dir and get that structure in My_CVS_Dir, root/project/dir1/dir2/dir3.

    I do an CVS update and update generate this list:

    ? root/project/dir1/dir2/dir3
    U root/project/dir1/dir2/file1
    U root/project/dir1/dir2/file2
    U root/project/dir1/dir2/file3

    ? in line one means something is new for CVS (because of dir3)
    U in line 2-4 means files are unchanged.

    I'm going to have this kind of list with many ? because there are many new directories to add under dir2. And in general there can be many subdirectories like dir4/dir5/dir6 to add under dir2.

    My question is to how to write this in Bash...If there is just one dir3 to add then it is simple I just use thes commands: mkdir dir2 and CVS add dir3. But if there are many directories under dir3 so how do I check that...

    May be my question is not clear...please feel free to ask more informatio.


  2. #2
    Join Date
    Jun 2003
    Toronto, Canada
    Provided Answers: 1
    In other words, you would like to repeat "cvs add" for all subdirectories in dir2. If that's the case, the following should do the trick:

    find dir2 -type d -exec cvs add '{}' \;

  3. #3
    Join Date
    Feb 2005
    Hi n_i,

    Thanks a lot for your help.
    Take care! :-)


  4. #4
    Join Date
    Feb 2005

    More questions to n_i...Adding Dir(s) to CVS

    Hi again!

    I'm wondring when I use:

    find dir2 -type d -exec CVS add '{}' \;

    ...and there is dir3 under dir2. dir3 has fil1....file10. As we know when we do a "CVS add"to a directory we don't need "CVS commit". I add dir2 and dir3 w.h.o the above command. The dir(s) are commited to CVS. What about file1....file10? I guess they need a separate commit?

    (Since it is a add/commit to CVS, I don't want to mess things ....)

    Thanks a lot for your help again

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts