首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何查找SVN中删除/移动文件的所有提交(修订号)

如何查找SVN中删除/移动文件的所有提交(修订号)
EN

Stack Overflow用户
提问于 2013-11-19 13:26:04
回答 1查看 191关注 0票数 1

我需要找到从SVN中删除的所有文件。然后检查文件经过后是否需要恢复。如果是,那就恢复。我该怎么做呢。我知道我可以恢复一个已删除的文件,但这需要修改编号。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-11-19 13:33:05

您可以使用svn log --search (从SVN1.8开始可用)查找删除特定文件的修订,然后恢复它。

下面的命令将找到删除MyProject/MyForm.cs文件的修订。

代码语言:javascript
运行
复制
svn log -v --search "MyProject/MyForm.cs" --search-and "D" http://svn.example.com/svn/MyRepository

--search中,我看不到对新的SVNBook参数的描述,因此包括用于参考的命令行帮助(查看svn help log获取更多信息):

代码语言:javascript
运行
复制
 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
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20072761

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档