[Top][All Lists]

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

Re: repository files

From: Ruud Dozijn
Subject: Re: repository files
Date: Tue, 16 Dec 2003 12:50:33 +0100

Ruud Dozijn <address@hidden> writes:

> I am looking for an easy way to determine the file names in the repository:
> - I check out a project
> - I cd to the project directory (containing the CVS subdirectory)
> - is there a cvs subcommand that returns the names of the files in the
> current directory that also exist in the repository?

You probably want the 'cvs status -l' or 'cvs log -l -R' command.

If you just wanted a list of files, the following commands may be useful
to you:

   cvs -q -n status -l | grep File: | sed 's/File: \(.*\)Status:.*/\1/'
cvs -q -n log -l -N -h | grep '^Working file: ' | sed 's/Working file: //'

otherwise, you may get more information than you really wanted.

It is allmost what I meant. The cvs log version is no good because it give the names of the repository files. In the cvs status command, the subdirectory names are not included.

What I want to do is write a script that processes all the files that are in the repository. So I need the file names of those files relatively to the current directory. I want to get a list like


using cvs -Q -n status -R, further processing would be needed if it reports a file FILE that exists in several subdirectories.

I'm not sure this is possible using the cvs subcommands. I thought maybe it is easier to use the output of the status subcommand, take the 'Repository revision' line and remove from the file name the ,v and the part of the filename that is in CVS/Repository and CVS/Root.
What do you think?


Protect your PC - get VirusScan Online

reply via email to

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