Chris,

> Chris wrote:
> 
> I want to pull a particular subset of files found on the main trunk into a newly 
>created pen.
...
>What would be perfect is a kind of HEAD-like tag where I could mark only certain 
>files.
...
> For instance, I want to do something like this:
> 
>   Tag a subset of the files in the 'Web' repository as being 'CmdFiles'.
> 
>   cvs checkout -r CmdFiles -HEAD Web
> 
>   This command would then give me a pen with the HEAD versions (-HEAD) of these 
>specific files, and no sticky tags.

How about:

$ cvs co -r CmdFiles Web
$ cvs update -A Web

If I understand it correctly, this would check out any file that has the CmdFiles tag 
on any revision and then update everything in your workspace to the HEAD revision.

However, I may be misreading the way "update -A" works. So, failing that, here's 
another approach:

$ (cvs co -p CmdFiles Web 1>/dev/null 2>&1) | [some filter that will leave you with a 
list of file names] | while read FILE; do
> cvs co $FILE
> done

The "-p" switch causes the file contents to be output on STDOUT. By redirecting 1 to 
/dev/null, it never even reaches the disk. The output on STDERR is redirected to 
STDOUT from the subshell and is essentially the list of files that are associated with 
the CmdFiles tag, with some meta-data.

This type of thing is easily scripted and the maintenance is the minimal case: apply 
the CmdFiles tag to at least one revision of each of the files you want to include.


Yet another way of doing it would be to move the tag upon every commit:

$ cvs co -r CmdFiles Web
$ # Do edits
$ cvs ci -m "Your comment here." Web
$ cvs tag -d CmdFiles Web
$ cvs tag CmdFiles Web

This works because "cvs tag" only acts on the files in your workspace, even though the 
actual tags live in the repository. Obviously do not try this with "cvs rtag"!


Hope this helps,

Schmolle

_______________________________________________
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs

Reply via email to