info-cvs
[Top][All Lists]
Advanced

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

Re: cvs count lines in a file?


From: Kaz Kylheku
Subject: Re: cvs count lines in a file?
Date: Wed, 29 Aug 2001 23:13:41 GMT
User-agent: slrn/0.9.6.3 (Linux)

In article <address@hidden>, Jennifer Hamilton wrote:
>Does cvs keep track of how many lines are in a file or better yet, in an
>entire project? 

Not explicitly, no.

>If so, is there some cvs command to output that number?

No, but there is a combination of cvs command plus UNIX utility:

        cvs checkout -p [ params ... ] | wc -l

checkout -p checks out the files to standard output, concatenating
their contents.

Another filter could be used, of course, if you want something other
than a naive line count.

But since the files are concatenated, that filter may have a hard
time separating various content types. And what about binary files?

You can pass an exhaustive list of files to cvs checkout.

But then it's easier to just check out a working copy to your
local filesystem, and then use some line counting tool that can select
specific files, or is smart enough to at least figure out which
ones contain text.


reply via email to

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