[Top][All Lists]

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

Re: Adding Files to a New Directory to the Repository

From: Mark D. Baushke
Subject: Re: Adding Files to a New Directory to the Repository
Date: Fri, 03 Mar 2006 18:26:45 -0800

Hash: SHA1

John Smith <address@hidden> writes:

> Let's say currently in my repository, I have D1, D2, and D3.  In my
> working directory, I have checked out D1 as a module.  I now want to:
> 1) add file F1 to a new directory D4 into the repository

If D4 is to be a new top-level module, then you would need to
checkout the top first and create it. Otherwise, just creating
D4 in the place where you have checked out your repository module
should do the job for you...

  cvs checkout -l -d top .
  cd top
  mkdir D4
  cvs add D4
  cd D4
  echo 'here is the contents of the file.' > F1
  cvs add F1
  cvs commit

> 2a) get a list of names of directories in the CVS repository

Well, first you would need to get the list of
files and then extract the directory names from
that list. CVS does not actually control

If you have cvs 1.12.x, then

  cvs rls -R . | grep ':$'


  cvs rlog -R . | grep '^cvs rlog:' | awk '{print $NF}'

should do the job for you.

> 2b) get a list of names of file names F1, F2, ... Fn of a directory D2
> in the CVS repository

   cvs -Q rls -R D2
   cvs -Q rlog -R D2 | sed 's/,v$//' 

> 3) check out a single file, not a module?

cvs checkout D2/F2

> I have tried:
>  cvs -H checkout
> Usage:
>   cvs checkout [-ANPRcflnps] [-r rev] [-D date] [-d dir]
>     [-j rev1] [-j rev2] [-k kopt] modules...
>         -A      Reset any sticky tags/date/kopts.
>         -N      Don't shorten module paths if -d specified.
>         -P      Prune empty directories.
>         -R      Process directories recursively.
>         -c      "cat" the module database.
>         -f      Force a head revision match if tag/date not found.
>         -l      Local directory only, not recursive
>         -n      Do not run module program (if any).
>         -p      Check out files to standard output (avoids stickiness).
>         -s      Like -c, but include module status.
>         -r rev  Check out revision or tag. (implies -P) (is sticky)
>         -D date Check out revisions as of date. (implies -P) (is
> sticky)
>         -d dir  Check out into dir instead of module name.
>         -k kopt Use RCS kopt -k option on checkout. (is sticky)
>         -j rev  Merge in changes made between current revision and rev.
> but any help to #1 - #3 will be appreciated.

What seems to be the problem with the help text?

        -- Mark
Version: GnuPG v1.2.3 (FreeBSD)


reply via email to

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