Subversion 1.8+ 命令行客户端允许您在命令中使用新选项--search
和--search-and
选项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.
因此,在您的情况下,命令可能是:
svn log -v --search "validation changes" URL-TO-REPOSITORY | awk '{print $somevalue}'