SVN 覆盖文件时未检测到更改

发布于 2024-12-04 06:57:58 字数 272 浏览 1 评论 0原文

我已经成功使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

酒中人 2024-12-11 06:57:58

本地 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.

做个少女永远怀春 2024-12-11 06:57:58

确保您没有覆盖 .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

无妨# 2024-12-11 06:57:58

我注意到文件的最后修改日期比它们替换的日期早

像大多数其他人一样,我怀疑文件没有更改。但是,如果确实有,Subversion 是否检测更改(如果您触摸文件以更新上次修改日期?

I have noticed that the last modified dates on the files are older than the ones they replaced

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?

孤独患者 2024-12-11 06:57:58

这些步骤帮助我做出了承诺。为了解决这个问题,他们也可能会帮助你。

  • 在桌面上的空文件夹中查看您的 svn 存储库文件夹。
    C:\Users\ömer\Desktop\SpringWebTest
  • 打开您签出的文件夹,然后选择并复制 .svn 文件夹并将其粘贴到项目工作区中。
    C:\Users\ömer\workspaceLuna\SpringWebTest
  • 现在应该检测到更改,最后将更改提交到 svn 存储库。

These steps helped me to commit. To outgo that issue, they may help you too.

  • Check Out your svn repository folder in an empty folder on desktop.
    C:\Users\ömer\Desktop\SpringWebTest
  • open the folder that you checked out, then select and copy the .svn folder and paste it in your project workspace.
    C:\Users\ömer\workspaceLuna\SpringWebTest
  • now changes should be detected, finally commit the changes to svn repository.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文