[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: how do i get the number of files in the repository ?

From: B. Smith-Mannschott <benpsm_at_gmail.com>
Date: 2007-07-02 12:03:11 CEST

On 7/2/07, Udo Schmiedeskamp <dexxus@gmail.com> wrote:
> Hello everybody,
>
> this seems to be a no-brainer, but i have not found an answer.
> not in the list and not via google.
>
> in my working directory i have files from different repositories. E.g.
> program files/ graphics / etc.
> i want to know (no, actually my boss does) how many files are in the program
> files repository ?
> can this be done with tortoisesvn or with the commandline tools ?

What do you mean by "how many files"?
Just 'documents', or 'directories' too?
Just in HEAD (the most recent revision of the repository) or do you
want to count files that are in the repository history but currently
deleted?

Assuming HEAD, under linux, at the command line, I'd do this:

# for the number of directories (which svn ls lists with a terminating /

$ svn ls -R svn://SERVER/REPOSITORY | egrep '/$' | wc -l
234

# for the number of things that are not directories (files)

$ svn ls -R svn://SERVER/REPOSITORY | egrep -v '/$' | wc -l
2345

Windows: I don't know how I would accomplish this under windows (apart
from installing cygwin) and I can figure out *no* way of getting
TortoiseSVN to divulge this kind of information.

// ben

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: users-help@tortoisesvn.tigris.org
Received on Mon Jul 2 12:03:13 2007

This is an archived mail posted to the TortoiseSVN Users mailing list.