How to find out which CVS tags cover which files and paths?
Asked Answered
U

6

8

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.

Undersell answered 26/8, 2008 at 18:40 Comment(0)
A
7

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>
Adjutant answered 29/8, 2008 at 18:27 Comment(0)
C
11

To list tags on a file one can also do:

cvs status -v <file>
Crayton answered 23/6, 2009 at 21:10 Comment(0)
A
7

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>
Adjutant answered 29/8, 2008 at 18:27 Comment(0)
W
4

the method quoted above didn't work for me

cvs -q rdiff -s -D 2000-01-01 -r yourTagName

however after a lot of messing around I've realised that

cvs -q rdiff -s -D 2000-01-01 -r yourTagName ModuleName

works

Wilful answered 8/11, 2010 at 19:1 Comment(0)
M
3

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.

Magnanimous answered 6/11, 2008 at 9:53 Comment(4)
Could not get this to work. cvs returned: there is no version here; run 'cvs checkout' firstDecurrent
@Joseph: You need to specify a CVSROOT either via environment variable or using the -d argument. Otherwise CVS doesn't know which repository to query.Magnanimous
Thanks for the reply. I wasn't certain that I had added that, but I tried again with the -d and a path to a cvs repository and got the same message. I'm running version 1.1.22 of cvs. Interestingly, though, if I give a non-existent tag it does tell me that the tag doesn't exist.Decurrent
@Joseph: Hmm, it might be that the internal implementation of your CVS client does indeed require a working copy to use the -n-option. In that case, you can probably get away with a minimal checkout like cvs co -l . (i.e. a non-recursive checkout of the repository's root folder, which typically does not contain any files at all - this should create the necessary ./CVS folder with the required meta data)Magnanimous
H
1

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
Helluva answered 23/6, 2009 at 21:0 Comment(0)
B
0

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).

Bethelbethena answered 26/8, 2008 at 18:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.