Searching subversion history (full text)

前端 未结 16 1351
慢半拍i
慢半拍i 2020-11-29 16:29

Is there a way to perform a full text search of a subversion repository, including all the history?

For example, I\'ve written a feature that I used somewhere, but t

16条回答
  •  庸人自扰
    2020-11-29 17:16

    The best way that I've found to do this is with less:

    svn log --verbose | less

    Once less comes up with output, you can hit / to search, like VIM.

    Edit:

    According to the author, he wants to search more than just the messages and the file names. In which case you will be required to ghetto-hack it together with something like:

    svn diff -r0:HEAD | less
    

    You can also substitute grep or something else to do the searching for you. If you want to use this on a sub-directory of the repository, you will need to use svn log to discern the first revision in which that directory existed, and use that revision instead of 0.

提交回复
热议问题