跟踪依赖项修订

发布于 2024-10-09 08:27:52 字数 885 浏览 2 评论 0原文

我有一个项目,其中有多个依赖项,这些依赖项位于不同的存储库中。每次我对项目进行更改时,我都会确保写入所有依赖存储库的修订号,以便在我必须返回此修订版(我们称之为 5)时,我可以立即知道哪些修订版依赖存储库修订版 5 保证可以使用,将依赖项更新到指定修订版,编译并运行项目。例如,如果我有:

 Dep1 @ Revisions 10
 Dep2 @ Revisions 20 
 Dep3 @ Revisions 10 
 Proj @ Revisions 35

假设当 Proj 版本为 17 时,Dep1 版本为 5 >,Dep2 修订版为 13Dep3 修订版为 3。所以在我的 SVN 日志中,我记录了这样的内容:

!!适用于 Dep1 Rev 5、Dep2 Rev 13、Dep3 Rev 3

对我来说,这似乎很原始,但让我相信有更好的方法来做到这一点。现在,在我的其他问题之一中,推荐了 Ivy Dependency Manager。我还没有详细看过它(看起来很复杂,也是我必须学习的另一件事)。对我来说,SVN(和 Mercurial 等)的日志似乎可以分为 LogDependency(如果有),其中后者可以关闭(如果有)没有依赖关系(当然,除非我不知道有更简单/更好的解决方案)。这将允许更干净的日志,甚至可能在每次新提交时发出警告,以再次检查先前定义的依赖项并确保它们没有更改。

所以,我想知道每个人如何处理这种情况,以及您是否可以提供任何提示、技术、程序和建议。

谢谢。

I have a project with several dependencies that are in various repositories. Each time I commit changes to my project, I make sure I write the revision numbers of all the dependent repositories so that in the event I ever have to come back to this revision (let's call it 5), I can immediately know which revisions of the dependent repositories revision 5 is guaranteed to work with, update the dependencies to the specified revisions, compile and run the project. So for example if I have:

 Dep1 @ Revisions 10
 Dep2 @ Revisions 20 
 Dep3 @ Revisions 10 
 Proj @ Revisions 35

And let's say that when Proj was on revision 17, the Dep1 revision was 5, Dep2 revision was 13 and Dep3 revision was 3. So in my SVN logs, I recorded something like this:

!! Works with Dep1 Rev 5, Dep2 Rev 13, Dep3 Rev 3

To me this seems primitive and makes me believe that there is a better way to do it. Now in one of my other questions, Ivy Dependency Manager has been recommended. I have not looked at it in detail yet (seems complicated and yet another thing I must learn). To me it seems like the log of SVN (and Mercurial etc.) could have been split into Log and Dependencies (if any) where the latter could be switched off if there were no dependencies (unless of course I am unaware of an easier/better solution). This would allow for a cleaner log that maybe even warned at each new commit to check the previously defined dependencies again and make sure they have not changed.

So, I was wondering how everyone manages this situations and if you have any tips, techniques, programs, suggestions that you can offer.

Thank you.

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

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

发布评论

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

评论(2

巴黎夜雨 2024-10-16 08:27:52

将依赖存储库添加为子项目、子模块或外部存储库,具体取决于版本控制系统的调用方式。

这样,您可以在处理存储库时保持依赖关系同步,但是,它仍然是手动的。

更好的是编写测试,以便您可以自动确定依赖项是否满足所有要求。

Add the dependant repositories as a subproject, submodule, or external depending on whatever your version control system calls it.

That way, you can keep the dependencies in sync as you work on the repository, however, it is still manual.

Even better is to write tests, so that you can automatically determine that the dependency satisfies all the requirements.

辞别 2024-10-16 08:27:52

您如何编译依赖项以及它们与您的项目的连接程度如何?如果它们不是您项目的一部分,请将它们编译为 .dll(或 .jar 或其他文件)并将其提交到您的项目中。您可以在提交注释或自述文件(也提交到您的项目)中记下版本和任何注释。然后使用它,并定期更新依赖项 .dll。

How do you compile your dependencies and how connected are they to your project? If they're not part of your project, compile them to .dll (or .jar or whatever) and commit it to your project. You can note the version and any notes in commit comment or a readme file (also commited to your project). And then work with that, and periodically update the dependency .dll.

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