You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Lee Ann Fisk <la...@sandia.gov> on 2007/01/05 20:10:30 UTC
svn list -R with directories only
Hello. I wanted to list all the directories in a
new svn repository I am working with. It has a huge
number of files. I could find no way to list the
directories only. I found a similar question on
users@ from several months ago that did not have
a reply. I searched your issues and did not find
it listed.
I was able to recompile svn 1.4.2 with a one line change
in subversion/libsvn_client/list.c in get_dir_contents() so
that "svn list -R URL" would omit non-directories. Looking
through this listing I am only now beginning to understand
the repository I am trying to work with. (By
the way - thank you having such well organized easy
to read code - that is what made it easy to change.)
It would be great to have a --directoriesOnly type
of option to "svn list".
Lee Ann Riesen
--
====================================================
Lee Ann Riesen, Sandia National Laboratories, NM, USA
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
RE: svn list -R with directories only
Posted by "Fisk, Lee Ann" <la...@sandia.gov>.
That's clever. It wasn't obvious to me that directory
names would always end in '/'. Thank you. Lee Ann
-----Original Message-----
From: Ed Price [mailto:ed.price@gmail.com]
Sent: Fri 1/5/2007 6:50 PM
To: Fisk, Lee Ann
Cc: dev@subversion.tigris.org
Subject: Re: svn list -R with directories only
I answered a similar question on svn-users recently.
svn ls -R $URL | grep '/$'
http://svn.haxx.se/users/archive-2006-10/0946.shtml
If you want to do it more *efficiently*, sorry, no idea :)
(But based on the description of your change, it sounds
like that wasn't actually the issue, as you changed
the client not the server, IIUC?)
-Ed
On 1/5/07, Lee Ann Fisk <la...@sandia.gov> wrote:
> Hello. I wanted to list all the directories in a
> new svn repository I am working with. It has a huge
> number of files. I could find no way to list the
> directories only. I found a similar question on
> users@ from several months ago that did not have
> a reply. I searched your issues and did not find
> it listed.
>
> I was able to recompile svn 1.4.2 with a one line change
> in subversion/libsvn_client/list.c in get_dir_contents() so
> that "svn list -R URL" would omit non-directories. Looking
> through this listing I am only now beginning to understand
> the repository I am trying to work with. (By
> the way - thank you having such well organized easy
> to read code - that is what made it easy to change.)
>
> It would be great to have a --directoriesOnly type
> of option to "svn list".
>
> Lee Ann Riesen
>
>
> --
> ====================================================
> Lee Ann Riesen, Sandia National Laboratories, NM, USA
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>
>
Re: svn list -R with directories only
Posted by Ed Price <ed...@gmail.com>.
I answered a similar question on svn-users recently.
svn ls -R $URL | grep '/$'
http://svn.haxx.se/users/archive-2006-10/0946.shtml
If you want to do it more *efficiently*, sorry, no idea :)
(But based on the description of your change, it sounds
like that wasn't actually the issue, as you changed
the client not the server, IIUC?)
-Ed
On 1/5/07, Lee Ann Fisk <la...@sandia.gov> wrote:
> Hello. I wanted to list all the directories in a
> new svn repository I am working with. It has a huge
> number of files. I could find no way to list the
> directories only. I found a similar question on
> users@ from several months ago that did not have
> a reply. I searched your issues and did not find
> it listed.
>
> I was able to recompile svn 1.4.2 with a one line change
> in subversion/libsvn_client/list.c in get_dir_contents() so
> that "svn list -R URL" would omit non-directories. Looking
> through this listing I am only now beginning to understand
> the repository I am trying to work with. (By
> the way - thank you having such well organized easy
> to read code - that is what made it easy to change.)
>
> It would be great to have a --directoriesOnly type
> of option to "svn list".
>
> Lee Ann Riesen
>
>
> --
> ====================================================
> Lee Ann Riesen, Sandia National Laboratories, NM, USA
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
RE: svn list -R with directories only
Posted by "Fisk, Lee Ann" <la...@sandia.gov>.
It would be better to have the filtering on the
server side. My modified svn client is giving me
what I need, but it's slow.
"grep -v" is inconvenient for me. It takes me longer
to figure out what the regular expressions should be
than it does to look at your source code and change it.
That may not be true for other people.
I was also concerned I would make an error in using
grep -v and end up filtering out some of the
directories.
The "--type-only=dir" option that you mention would
be really nice to have.
Thank you for replying. Lee Ann
-----Original Message-----
From: Daniel Rall [mailto:dlr@collab.net]
Sent: Fri 1/5/2007 3:54 PM
To: Fisk, Lee Ann
Cc: dev@subversion.tigris.org
Subject: Re: svn list -R with directories only
On Fri, 05 Jan 2007, Lee Ann Fisk wrote:
...
> It would be great to have a --directoriesOnly type
> of option to "svn list".
Lee Ann, is 'grep -v' not workable (e.g. because of the large number
of files and directories at the path)?
If we were to create some type of filter option, something more
flexible like --type-only=dir would be more appropriate.
Re: svn list -R with directories only
Posted by Daniel Rall <dl...@collab.net>.
On Fri, 05 Jan 2007, Lee Ann Fisk wrote:
...
> It would be great to have a --directoriesOnly type
> of option to "svn list".
Lee Ann, is 'grep -v' not workable (e.g. because of the large number
of files and directories at the path)?
If we were to create some type of filter option, something more
flexible like --type-only=dir would be more appropriate.