Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I search within svn logs

I want to be able to search within the commit logs of svn. I know you can do that on tortoise, but couldn't find a way using the command line.

We are moving to a two-tiered repository approach, so that the stable branch will only get stories fully completed and tested. To achieve that, we would need a way to search within the commit messages for the story code (eg:#s1322) and get a list of the revisions to be used in a subsequent merge command.

Ex: searchsvnapp http://[repo location root] #s1322

result: 4233,4249,4313

like image 566
Emerson Avatar asked Jun 17 '10 13:06

Emerson


People also ask

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.


2 Answers

For Subversion 1.8 The Natural Way (tm) is to use new options --search + --search-and for filtering logs

svn log --search #s1322 URL

And, BTW, each story can be separated into own branch - in this case detection of revision-range is not needed at all and you just merge branch

like image 161
Lazy Badger Avatar answered Oct 21 '22 20:10

Lazy Badger


Wouldn't this work?

svn log | grep "something"
like image 32
the_void Avatar answered Oct 21 '22 19:10

the_void