Ada*_*ire 10
这应该适合你:
svn log -r 0:HEAD -v $REPOSITORY_PATH | grep "/foo.txt"
Run Code Online (Sandbox Code Playgroud)
这将为您提供文件的路径和日志中的状态.如果你有任何点击,你知道它在某些时候存在.如果没有结果,那么任何版本的存储库中的任何地方都没有任何匹配.您还将看到每个日志行的状态,例如:
A /some/path/foo.txt D /some/path/foo.txt
但我猜这些额外的信息对你来说不是问题.:)
使用Subversion 1.8+客户端,新的--search
和--search-and
选项可用于svn log
命令.这些选项不允许在存储库中执行全文搜索,仅查找以下数据:
svn:author
无版权财产),svn:date
无版权财产),svn:log
无版本属性),据我猜,您可以使用以下命令行搜索"foo.txt":
svn log -v --search "foo.txt"
.
以下是有关这些新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)