You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Niel De Clerk <ND...@Angloplat.com> on 2010/01/19 06:02:07 UTC

svn status: filter on file extension

Good Day

I'd like to know if there is a way to make a SVN STATUS command
recursive while filtering the files using a wildcard?

I need this purely for performance reasons.  I'm guessing that the
amount of data that the repository need to pass back (via a rather slow
network) will be less, and also that I'll save time when processing the
results since I don't have to filter out lots of unneeded information.

Some more detail:
I have a SVN working copy containing several levels of subdirectories.
In these subdirectories there are various different file types that are
all under version control.

I often use the following statement to obtain the current status of the
working copy:
svn status --verbose --show-updates

This works fine and returns the status of each and every file and
directory contained in the working copy.
However, I'm often only interested in the files with a specific
extension (*.kb).  So I've tried to use

svn status --verbose --show-updates *.kb

But this only returns the .kb files found in the current directory (i.e.
non-recursive)

Your assistance will be greatly appreciated.

Regards
Niel

RE: svn status: filter on file extension

Posted by Niel De Clerk <ND...@Angloplat.com>.
Hi
Thanks for the reply.

BTW, a good alternative to grep in Windows is findstr

The following works well (to only list *.kb files)

Svn status --verbose --show-updates |findstr /E .kb

Cheers
Niel

-----Original Message-----
From: C. Michael Pilato [mailto:cmpilato@collab.net] 
Sent: 19 January 2010 16:55
To: Niel De Clerk
Cc: users@subversion.apache.org
Subject: Re: svn status: filter on file extension

Niel De Clerk wrote:
> Good Day
> 
> I'd like to know if there is a way to make a SVN STATUS command 
> recursive while filtering the files using a wildcard?
> 
> I need this purely for performance reasons.  I'm guessing that the 
> amount of data that the repository need to pass back (via a rather 
> slow
> network) will be less, and also that I'll save time when processing 
> the results since I don't have to filter out lots of unneeded
information.

Actually, the amount of data currently passed over the network for 'svn
status -u' is proportional to the amount of *change* in the tree since
the working copy was last updated, not to the size of the tree itself,
and is optimized for directory comparisons as opposed to comparisons of
individual file revisions.h

> However, I'm often only interested in the files with a specific 
> extension (*.kb).  So I've tried to use
> 
> svn status --verbose --show-updates *.kb
> 
> But this only returns the .kb files found in the current directory
(i.e.
> non-recursive)
> 
> Your assistance will be greatly appreciated.

Yeah, this is pretty much where 'grep' comes into the picture.  :-)

--
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand


Re: svn status: filter on file extension

Posted by "C. Michael Pilato" <cm...@collab.net>.
Niel De Clerk wrote:
> Good Day
> 
> I'd like to know if there is a way to make a SVN STATUS command
> recursive while filtering the files using a wildcard?
> 
> I need this purely for performance reasons.  I'm guessing that the
> amount of data that the repository need to pass back (via a rather slow
> network) will be less, and also that I'll save time when processing the
> results since I don't have to filter out lots of unneeded information.

Actually, the amount of data currently passed over the network for 'svn
status -u' is proportional to the amount of *change* in the tree since the
working copy was last updated, not to the size of the tree itself, and is
optimized for directory comparisons as opposed to comparisons of individual
file revisions.h

> However, I'm often only interested in the files with a specific
> extension (*.kb).  So I've tried to use
> 
> svn status --verbose --show-updates *.kb
> 
> But this only returns the .kb files found in the current directory (i.e.
> non-recursive)
> 
> Your assistance will be greatly appreciated.

Yeah, this is pretty much where 'grep' comes into the picture.  :-)

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand