I have a client that is asking me to give them a listing of every file and folder in the source code (and then a brief explanation of the source tree). Is there an easy way to create some sort of decently formatted list like this from a subversion repository?
Assuming it's available via HTTP - why not just give them a read-only login, and point them at the web address?
try: svn list -R
with the root of the branch you're trying to list.
Do a checkout, then drop into a command prompt, cd
to the right directory, and type something like
dir /a:d /s /b > listing.txt
(Assuming that you're on Windows, of course.)
svn list -R svn://svnlocation
This should list all the files and folders, could outout this to a text file
You'll want the list command. Assuming you're using the command line client
svn list -R http://example.com/path/to/repos
This will give you a full recursive list of everything that's in the repository. Redirect it to a text file
svn list -R http://example.com/path/to/repos > file.txt
and then format to your heart's content.
More generally, you can use the tree utility (in *Nix systems) to print out such a list for any directory structure. It is installed by default in many distros. If it isn't in yours, you might check the standard repositories for it. For example, in Ubuntu, with the default repositories, "sudo apt-get install tree" should do the trick. Alternatively, there's a shell script using sed that implements it here. Once you have tree, just cd to the directory you'd like to print the listing for and type "tree" (redirect it to a file if you like).
This does require that you have a checkout of the repository, but you'll probably already have one in most cases. Note that this will also include the .svn directories, which is kind of a pain, but you can always pipe the output through a "grep -v .svn" that will strip out these lines, possibly with some additional magic to take out anything "underneath" such a .svn-containing line in the hierarchy (using sed or a procedural shell-script loop or similar).