tags:

views:

185

answers:

1

Hello all,

I'm wondering if there is an easy way to create a script that gets the revision number out off svn, if we provide a piece of the message associated to it.

example: I know that the message contains "added method A", that message was written once I committed the changes. Now if I don't remember the revision number associated to it, and I want to programmatically (script/batch) get the associated revision number, without manually ready through the log)

+1  A: 

TortoiseSVN has a search box. Open the log for the directory of the Repository you are interested in. If you're not sure what directory it was, pull up the log for the Repository root.

How to do pull up the log:

  • Open the TortoiseSVN repo browser (right-click, TortoiseSVN->Repo-Browser) and enter your repository URL.

  • Right-click on the repository root and click "Show log"

For performance reasons, TortoiseSVN will only show the log for the last 100 revisions at first. If you think the change is older than that, you can click the "Show Range" button, and tell it to show the log for a specific revision range. You can just say from revision 0 to HEAD (the latest), which will fetch all of the revisions in the repo.

At the top of the log window is the search bar. Type in the text you are looking for, and you should find it.

msemack
ok,I already knew that, but that's through GUI, Is there something command line driven?
Yohann T.
"svn log" will show you the log in a text format. You could dump that to a file and search it (Notepad, Ctrl-F).If you have a copy of grep, you can filter the svn output for a particular string, and then use the -B option to show you the header for that revision.Something like this: svn log URL_TO_REPO | grep -B 3 STRING_YOU_WANT(grep --help tells you a lot.)
msemack