Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Searching svn commits

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?

like image 978
Jay Avatar asked Sep 08 '09 21:09

Jay


People also ask

How do I see all commits in svn?

See the log command in the SVN Book. Show activity on this post. If you're using TortoiseSVN (on windows), then you can use the "Show log" function to see a list of all commits. In this dialog you can also open some statistics/graphs such as "number of commits per week" (for each user).

How do I search in svn?

svn list --depth infinity <your-repo-here> to get a list of files in the repo, and then svn cat to get contents. You can add --xml key to list command to make parsing a bit simpler. Remember to use grep if you want to see 1 file, especially if you have thousands of files in the repository like the OP.

How do I find a file in svn repository?

Check out files from Subversion repositoryIn the Get from Version Control dialog, click Add Repository Location and specify the repository URL. Click Check Out. In the dialog that opens, specify the destination directory where the local copy of the repository files will be created, and click OK.


1 Answers

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.

like image 128
derobert Avatar answered Nov 01 '22 02:11

derobert