SVN仓库search

有没有什么好的软件可以让我search我的SVN代码片段? 我find了'FishEye',但费用是1200,远远超出我的预算。

如果您只search文件名,请使用:

 svn list -R file:///subversion/repository | grep filename 

视窗:

 svn list -R file:///subversion/repository | findstr filename 

否则签出并做文件系统search:

 egrep -r _code_ . 

有sourceforge.net/projects/svn-search 。

还有一个Windows应用程序直接来自SVN home,名为SvnQuery,位于http://svnquery.tigris.org

从Subversion 1.8开始,你可以使用svn log命令的--search选项 。 请注意,该命令不在存储库内执行全文search,它仅考虑以下数据:

  • 修订版的作者( svn:author未版本化的属性),
  • date( svn:date未版本化的属性),
  • 日志消息文本( svn:log未版本的属性),
  • 已更改的path列表(即受特定修订影响的path)。

以下是有关这些新search选项的帮助页面:

  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. 
  1. 创build该存储库的git-svn镜像。
  2. 在git中search添加或删除的string: git log -S'my line of code'gitk的相同

优点是可以在本地执行许多search,而无需加载服务器和networking连接。

本示例将存储库的完整内容pipe理为文件,然后您可以在编辑器中快速search文件名:

 svn list -R svn://svn > filelist.txt 

如果存储库相对静态,并且您想要执行快速search,而无需从SVN服务器重复加载所有内容,则这非常有用。

我喜欢TRAC – 这个插件可能会有助于您的任务: http : //trac-hacks.org/wiki/RepoSearchPlugin

只是一个注意, FishEye (和许多其他Atlassian产品)有一个10美元的初学者版本,在FishEye的情况下给你5个知识库和访问多达10个提交者。 在这种情况下,这笔钱用于慈善事业。

http://www.atlassian.com/starter

如果您正在search单个文件或小型存储库的历史logging,那么会显得很慢(而且执行得很粗糙),但是svn日志和svn cat的结合起来还是不错的:

 svn log filetosearch | grep '^r' | cut -f1 -d' ' | xargs -i bash -c "echo '{}'; svn cat filetosearch -'{}'" 

将输出文件更改的每个修订号和文件。 你总是可以将每个修订logging到不同的文件中,然后grep修改。

PS。 大量upvotes任何人告诉我如何正确地做到这一点!

如果你真的绝望,做一个回购转储(看“svnadmin转储”),然后grep通过它。 这不是很好,但你可以看看search结果find指示文件和修订的元数据,然后检查一下,以获得更好的外观。

不是一个好的解决scheme,但是它是免费的:) SVN不提供search过去签名(甚至是过去的日志文件,AFAIK)的function。

很多SVN回购是“简单”的HTTP站点,所以你可以考虑看一些现成的“networking爬行”search应用程序,你可以指向SVN根,它会给你基本的function。 更新它可能是一个小把戏,也许一些SVN检查hackery可以痒痒的索引放弃或重新索引变化,你走了。

只是大声思考。

theres krugle和koders但都是昂贵的。 两个都有Eclipse的插件。

我开始使用这个工具

http://www.supose.org/wiki/supose

它工作正常,只是缺乏一个可视化的用户界面,但速度快,有些维护

//编辑:工具已经在另一个答案中提到,所以给予Kuryaki所有学分。

刚刚发现SupoSE是一个基于java的命令行工具,它扫描一个存储库以创build一个索引,然后能够回答某些种类的查询。 我们仍然在评估该工具,但看起来很有希望。 值得一提的是,它包含了所有版本的完整索引,包括源代码文件和常见的办公格式。