在SVN信息库中搜索文件名 [英] Search in SVN repository for a file name

查看:1024
本文介绍了在SVN信息库中搜索文件名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个用于代码存储的大容量存储库,其中包含成千上万个文件夹和子文件夹,我想在此存储库下使用文件名或某些单词进行搜索.

We have a bulk repository for code contain thousands of folder and sub folder, i want to search under this repositor with file name or with some word.

Root folder
    a\
    b\
    c\
    d\
    e\
    f\ab\
    f\ab\cd.txt

我想搜索cd.txt,但不知道它在SVN存储库中的位置,为此,我想在SVN的根文件夹中执行搜索,在该文件夹中我将放置文件名cd.txt并运行命令,将检入每个文件夹并显示文件详细信息结果....

I want to search for cd.txt but dont know where it is in SVN Repository, for that i want to perform a search on the root folder of SVN where i will put the file name cd.txt and run the command, will check in each folder and will display the file details result....

希望的要求很明确.你能帮我这个忙吗?

Hope requirement is clear. Can you please help me on this.

推荐答案

如果该文件在您的工作副本中,则使用的是svn 1.5:

If the file is in your working copy, then if you are using svn 1.5:

svn list --depth infinity | grep <filename>

或更早版本的svn:

find . -name <filename> -not -path '*.svn*'

如果您需要查找历史记录中的文件(已删除或移动):

If you need to find the file in history (deleted or moved):

svn log -v | less

并使用以下命令进行搜索:

and search for it with:

\<filename><return>

这篇关于在SVN信息库中搜索文件名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆