为什么这是 Subversive 的 SVN 冲突?

发布于 2024-10-02 02:21:29 字数 1483 浏览 1 评论 0原文

我正在编写一个必须在 Linux 和 Windows 上运行的桌面应用程序,因为在 Windows 上我需要使用 JNI 来实现功能。但这不是问题。 我在 Windows 和 Linux 上安装了 Eclipse IDE,并使用 Subversive 提交到我的存储库。 在 Windows 提交之后,我开始在 Linux 上实现 Linux 实现,但我发现自己遇到了冲突:

.classpath [Working]

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" path="src"/>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
    <classpathentry kind="lib" path="lib/sqlitejdbc-v056.jar"/>
    <classpathentry kind="output" path="bin"/>
</classpath>

.classpath[Repository]

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" path="src"/>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
    <classpathentry kind="lib" path="lib/sqlitejdbc-v056.jar">
        <attributes>
            <attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="QuickBackup/bin"/>
        </attributes>
    </classpathentry>
    <classpathentry kind="output" path="bin"/>
</classpath>

如您所见冲突发生在 ...部分,该部分用于告诉 jvm 我的 dll 模块与 jni 一起使用的位置。为什么? Subversive 不是只更新工作版本吗?

I'm writing a desktop app that must work on both Linux and Windows because on Windows I need to use JNI to implement a functionality. But that's not the problem.
I have a Windows and a Linux installation of the Eclipse IDE and I use Subversive to commit to my repository.
After a Windows commit I started working on Linux to implement the linux implementation but I find myself with a conflict:

.classpath [Working]

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" path="src"/>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
    <classpathentry kind="lib" path="lib/sqlitejdbc-v056.jar"/>
    <classpathentry kind="output" path="bin"/>
</classpath>

.classpath[Repository]

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" path="src"/>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
    <classpathentry kind="lib" path="lib/sqlitejdbc-v056.jar">
        <attributes>
            <attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="QuickBackup/bin"/>
        </attributes>
    </classpathentry>
    <classpathentry kind="output" path="bin"/>
</classpath>

As you can see the conflict is in the <attribute>...</attribute> part which is used to tell the jvm where is my dll module to use with jni. Why? Coundn't Subversive just update the working version?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

月牙弯弯 2024-10-09 02:21:30

有时版本控制系统就是无法弄清楚如何处理更改。出于多种原因,我可能会这样做。但是确定如何合并像这样的存储库中的更改并不是一件简单的事情。

Sometimes version control systems just can't figure out what to do with changes. It could me for any number of reasons. But determining how to merge changes in a repository like this is very much not a trivial thing to do.

情绪少女 2024-10-09 02:21:29

你有两个不同性质的问题。首先,如果您从版本 156 的工作副本修改文件,但同时其他人的工作副本中的文件已提交到版本 157,则会出现 svn 冲突。当您更新文件时,可能会出现两种情况:

  • 合并 (G):意味着您和您的同事正在处理该文件,但在不同的位置,因此“diff”实用程序认为可以合并它。
  • 冲突 (C):“diff”实用程序确定您和同事的更改不兼容,因此您需要解决(仅)您的工作副本上的差异

第二个问题是 ini(或 conf)文件不兼容与部署无关。我的意思是,这个文件在部署代码的每台机器上应该是不同的。在这种情况下(我认为这就是您的情况),您需要在其上放置 svn:ignore 属性,并记住创建此文件并将其详细信息放在每个部署中。

http://svnbook.red -bean.com/en/1.1/ch07s02.html#svn-ch-7-sect-2.3.3

You have 2 problems with different nature. First, svn conflict arises if you modify file from working copy with rev 156, but in the meantime this file from someone else's working copy was committed to rev 157. When you update your file, two scenarios can occur:

  • merged (G): means that you and your colleague were working on the file but on different places, so the 'diff' utility thinks it is OK to merge it.
  • conflict (C): the 'diff' utility determined that both yours and your colleague's changes were incompatible, so you'll need to resolve the differences on (only) yours working copy

The second problem is ini (or conf) files that are not deployment-agnostic. What I mean is, this file should be different on each machine where the code is deployed. In this case (and I think this is your case) you'll need to put svn:ignore property on it, and remember to create this file and put its specifics on every deployment.

http://svnbook.red-bean.com/en/1.1/ch07s02.html#svn-ch-7-sect-2.3.3

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文