tags:

views:

2941

answers:

5

There is a legacy CVS repository, which contains a large number of directories, sub-directories, and paths. There is also a large number of branches and tags that do not necessarilly cover all paths & files - usually a subset. How can I find out, which branch / tag covers, which files and paths?

CVS log already provides the list of tags per file. The task requires me to transpose this into files per tag. I could not find such functionality in current WinCVS (CVSNT) implementation. Given ample empty cycles I can write a Perl script that would do that, the algorithm is not complex, but it needs to be done.

I would imagine there are some people who needed such information and solved this problem. Thus, I think should be a readily available (open source / free) tool for this.

A: 

I don't know of any tool that can help you, but if you are writing your own, I can save you from one headace: Directories in CVS cannot be tagget. Only the files within them have tags (and that is what determines what is checked out when you check out a directory on a specific tag).

Johannes Hoff
+1  A: 

To determine what tags apply to a particular file use:

cvs log <filename>

This will output all the versions of the file and what tags have been applied to the version.

To determine what files are included in a single tag, the only thing I can think of is to check out using the tag and see what files come back. The command for that is any of:

cvs update -r <tagname>
cvs co <modulename> -r <tagname>
cvs export <modulename> -r <tagname>
John Meagher
A: 

You don't have to do an actual checkout. You can use the -n option to only simulate this:

cvs -n co -rTagName ModuleName

This will give you the names of all the files tagged TagName in module ModuleName.

Oliver Giesen
A: 

The following command gives a list of files that are in that tag "yourTagName". The files are all marked as new, the revision info in "yourTagName".

This command does a diff between 2000-01-01 and your tag, feel free to use another date that is earlier.

cvs -q rdiff -s -D 2000-01-01 -r yourTagName
+1  A: 

To list tags on a file one can also do:

cvs status -v <file>
Joakim Elofsson