Sunday, February 24, 2013

how to list all "projects" in a CVS repository

We achieve that enquiry using the below recipe.

The (files and) directories below the project root are called projects.

Now here is the recipe:
# First check out (non-recursively, i.e. "locally" (= "-l"))
# the root "project" of the repository (i.e. ".")
# to some auxiliary location (e.g. Temp, CAVEAT: checkout's "-d" does not take absolute pathnames),
# so we have the necessary metadata in CVS/:
$ cd ~/cvswork
$ cvs -d ROOTDIR checkout -l -d Temp .


# Then simulate an "update with directories only" of that folder:
$ cd ~/cvswork/Temp
$ cvs -n update -d # create directories / dry run
You may want to get rid of that auxiliary location again; I personally keep ~/cvswork/Temp "permanently", so I can always run the above "cvs -n update -d" in there.

It is a simulated update of the repository root.

I got this recipe from here.

No comments: