views:

124

answers:

6

Another "this ought to be easy but I don't know how to do it" question ...

We have an SVN repository with many many branches. Is there any way to ask a question like "What are all the commits I did in the last week against all branches?" or "What are all the revisions that include changes to file X across all branches?"

I can do a log on a particular branch and search it to get answers to questions like this for one branch, but how do I ask questions like this where the answer may span multiple branches?

+3  A: 

Branches aren't special to Subversion, they're just directories. So asking "what did I commit last week" is no different on a single directory, an entire branch, or an entire repository. Remember you can do this on the entire repository without checking it out by passing the repository URL to svn log.

Asking which revisions changed a single file across branches is harder, because as far as Subversion is concerned, those are multiple different files. You'll have to svn log the file in each branch, or svn log the entire repository and filter.

derobert
A: 

One way to browse a Subversion repository is to use git svn to import your whole repository, branches and all, into a Git repository. Then you can use tools such as gitk to view the repository. Since a Git repository is completely local, tools such as gitk have easy access to the entire repository, and they're fast, really fast.

Greg Hewgill
+1  A: 

The show log dialog box in TortoiseSVN has a statistics button that groups commits by author. That would answer your first question if you happen to be using TortoiseSVN that is.

Brian Gideon
+1  A: 

You have to use 3-rd party tools (like fisheye) or an API (like SVNKit). See relevant discussion here and here.

FoxyBOA
A: 

Oooh, let's be programmers here... download the library SharpSVN and roll your own.

JBrooks
+2  A: 

Example of what @derobert says, assuming today is sept 9 and your trunk/branches/tags are in http://host/svn/project1:

svn log -r {2009-09-02T07:00}:HEAD http://host/svn/project1