Joh*_*ohn 154 svn search code-search-engine
是否有任何好的软件可以让我通过我的SVN存储库搜索代码片段?我找到了'FishEye',但成本是1,200,远远超出我的预算.
phi*_*l_w 68
如果您只搜索文件名,请使用:
svn list -R file:///subversion/repository | grep filename
Run Code Online (Sandbox Code Playgroud)
视窗:
svn list -R file:///subversion/repository | findstr filename
Run Code Online (Sandbox Code Playgroud)
否则结帐并进行文件系统搜索:
egrep -r _code_ .
Run Code Online (Sandbox Code Playgroud)
Elm*_*ber 37
有sourceforge.net/projects/svn-search.
在http://svnquery.tigris.org上还有一个名为SvnQuery的SVN主页直接提供的Windows应用程序
bah*_*rep 11
从Subversion 1.8--search
svn log
开始,您可以使用带命令的选项.请注意,该命令不会在存储库中执行全文搜索,它仅考虑以下数据:
svn:author
无版权财产),svn:date
无版权财产),svn:log
无版本属性),以下是有关这些新搜索选项的帮助页面:
If the --search option is used, log messages are displayed only if the
provided search pattern matches any of the author, date, log message
text (unless --quiet is used), or, if the --verbose option is also
provided, a changed path.
The search pattern may include "glob syntax" wildcards:
? matches any single character
* matches a sequence of arbitrary characters
[abc] matches any of the characters listed inside the brackets
If multiple --search options are provided, a log message is shown if
it matches any of the provided search patterns. If the --search-and
option is used, that option's argument is combined with the pattern
from the previous --search or --search-and option, and a log message
is shown only if it matches the combined search pattern.
If --limit is used in combination with --search, --limit restricts the
number of log messages searched, rather than restricting the output
to a particular number of matching log messages.
Run Code Online (Sandbox Code Playgroud)
Ben*_*and 10
我们使用http://opensolaris.org/os/project/opengrok/
git-svn
该存储库的镜像.git log -S'my line of code'
或者相同的gitk
优点是您可以在本地执行许多搜索,而无需加载服务器和网络连接.
此示例将存储库的完整内容传递到文件,然后您可以在编辑器中快速搜索文件名:
svn list -R svn://svn > filelist.txt
Run Code Online (Sandbox Code Playgroud)
如果存储库是相对静态的并且您希望快速搜索而不必重复加载SVN服务器中的所有内容,则此选项非常有用.
许多 SVN 存储库都是“简单”的 HTTP 站点,因此您可能会考虑查看一些现成的“网络爬行”搜索应用程序,您可以指向 SVN 根目录,它将为您提供基本功能。更新它可能会有点技巧,也许一些 SVN 检查黑客可以让索引丢弃或重新索引更改。
只是大声思考。