Re: svn list support for listing directory entries only
From: Ryan Schmidt <subversion-2014_at_ryandesign.com>
Date: Sat, 3 May 2014 21:16:39 -0500
On May 3, 2014, at 20:13, Dan Ellis wrote:
> The svn command line list command currently accepts --depth arguments of files, infinity, and immediates (and empty, but that is really a no-op). I'm in need of being able to list directory entries only in a repository, but I'm not sure there is any good way to accomplish that as-is. I've search the lists and can only find articles about how folks have grep'ed the output or hacked list.c to only return directory entries (which is really just an inelegant grep anyways since the server still will be sending the data).
Directories are printed with a trailing slash, so if you just want directories, you could grep for that:
$ svn ls http://svn.apache.org/repos/asf/subversion/trunk/
Alternately you could use the --xml argument to svn, then parse the xml it gives you.
You already mentioned the grep solution in your message, so I’m guessing that’s not satisfactory for some reason. If that’s true, then maybe you could explain in more detail what you need exactly, if it’s not the above.
|
This is an archived mail posted to the Subversion Users mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.