svn status 不显示已修改文件的列表
我使用以下命令签出了目录中的一些文件:
svn co <dir>
之后,我使用以下命令替换了该目录中所有 java 文件中的一些文本:
find . -type f -print0 | xargs -0 sed -i "s/old/new/g"
现在,我触发了此命令:
svn status
它不显示已更改文件的列表。 我可以在所有 java 文件中看到替换,但在 svn status 命令中看不到这些文件的列表。
请帮忙。甚至 svn commit 也不起作用。
I checkedout some files inside dir using:
svn co <dir>
After that I used following command to replace some text in all java files inside this dir:
find . -type f -print0 | xargs -0 sed -i "s/old/new/g"
Now, I fired this command:
svn status
It doesn't show the list of changed files.
I can see the replacement in all java files but couldn't see the list of those files in svn status command.
Please help . Even svn commit not working.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
据猜测,您的命令还将遍历 .svn 目录中隐藏的文件。可能会破坏很多东西。特别是如果您的存储库名称中包含“old”文本。 SVN不会喜欢这样的!
它肯定会做的是更改 .svn/text-base 中的“基本”文件。因此,就 SVN 而言,没有任何变化(它将当前目录与 .svn 中的文件副本进行比较,以查看发生了什么变化)。
或者,可能完全是别的东西。
At a guess, your command will have also went through the files hidden inside the .svn directories. Potentially corrupting lots of things. Especially if your repository name had the text "old" in it. SVN will not like this!
What it will have definitely done is changed the "base" files inside .svn/text-base. So that as far as SVN is concerned nothing has changed (it compares the current directory to copies of the files in .svn to see what has changed).
Or, could be something else entirely.
给定的 find 命令肯定是错误的,因为您没有阻止 find 进入 .svn 文件夹,这是错误的。
以下内容接近您的需要:
我建议通过 IDE(Eclipse 等)执行此类操作
The given find command is definitely wrong, cause you didn't prevent find from going into .svn folder which is wrong.
The following is comming close to what you need:
I would recommend to do this kind of things via IDE (Eclipse etc.)