SVN 覆盖文件时未检测到更改
我已经成功使用 SVN 几个星期了,但是最近我从我们的供应商那里收到了我正在处理的代码的更新版本。我用更新的文件覆盖了我的本地安装,并希望能够提交更新文件,然后其他人都会获得更新的版本。但是,当我覆盖本地文件时,SVN 没有检测到文件已更新。如果这很重要的话,我正在使用 Tortoise SVN。
更新:我没有复制更新代码的工作副本(源代码中没有 .svn 文件夹。)但是,我注意到文件上的最后修改日期比它们替换的日期要早 - 那会吗?阻止 SVN 检测到更改?此外,大多数文件都使用 ioncube 进行加密。
I've been working with SVN successfully for a few weeks however I recently received an updated version of the code I'm working on from our vendor. I overwrote my local installation with the updated files and was expecting to be able to commit the updates files and everyone else would then get the updated version. However, when I overwrite my local files, SVN does not detect that the files have been updated. I'm using Tortoise SVN if that matters.
Update: I'm not copying over a working copy of the updated code (there are no .svn folders in the source.) However, I have noticed that the last modified dates on the files are older than the ones they replaced - Would that prevent SVN from detecting a change? Also the majority of the files are encrypted using ioncube.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
本地 svn 数据位于工作副本的每个目录中(每个目录下的 .svn 目录中)。因此,如果您已将新代码中的目录复制到代码目录(包括子目录)上,则可能也复制了它们的 .svn 目录。这意味着 svn 无法知道它已更改。
如果您想对目录中的代码进行递归替换,则应确保粘贴到现有代码上的代码本身不是工作副本,或者它已从 .svn 目录中删除。要获取存储库的非 wc 副本,您可以使用 svn 导出。
最新版本的 subversion 通过仅将元数据存储在 wc 根目录中而不是所有子目录中来解决此问题。
The local svn data is inside every directory of you working copy (in the .svn directory under every directory). So if you have copied a directory from the new code over a directory of your code, including subdirectories, you may have copied their .svn directories as well. That means svn can't know that it is changed.
If you want to do a recursive replace of code in a directory, you should make sure that the code you paste onto your existing code isnt itself a working copy, or that it has been stripped from .svn directories. To get a non-wc copy of a repository you can use svn export.
The latest version of subversion solves this problem by storing metadata only in the wc root, rather than in all subdirectories.
确保您没有覆盖 .svn 文件夹。
如果您删除此文件夹或将其替换为其他文件夹,您将遇到一些同步错误和/或 svn 完整性问题。
您可以做的(以及我通常处理此类问题时所做的)是从项目文件系统中清除所有 .svn 文件夹并重新提交所有内容。
请查看这篇文章:http://thecrumb。 com/2008/09/25/removing-svn-files-with-tortoisesvn/
还有这个:http://www.anyexample.com/linux_bsd/bash/recursively_delete__svn_directories.xml
Make sure you're not overwriting the .svn folder as well.
If you delete this folder or replace it with other folder you will be having some synchronization errors and/or svn integrity issues.
What you can do (and what I normally do with problems like this one) is to clear all .svn folders from your project filesystem and re-commit everything.
Please take a look at this article: http://thecrumb.com/2008/09/25/removing-svn-files-with-tortoisesvn/
And this one: http://www.anyexample.com/linux_bsd/bash/recursively_delete__svn_directories.xml
像大多数其他人一样,我怀疑文件没有更改。但是,如果确实有,Subversion 是否检测更改(如果您触摸文件以更新上次修改日期?
Like most other people, I would suspect that the files haven't changed. However, if they really have, does Subversion detect changes if you touch the file to update the last modified date?
这些步骤帮助我做出了承诺。为了解决这个问题,他们也可能会帮助你。
C:\Users\ömer\Desktop\SpringWebTest
C:\Users\ömer\workspaceLuna\SpringWebTest
These steps helped me to commit. To outgo that issue, they may help you too.
C:\Users\ömer\Desktop\SpringWebTest
C:\Users\ömer\workspaceLuna\SpringWebTest