是否保留我自己的版本化应用程序

发布于 2024-08-28 13:49:30 字数 378 浏览 5 评论 0原文

我在这里需要一些意见。

我正在开发一个 Django 项目,使用 buildout 来获取依赖项等...... 我使用 Mercurial 作为 DVCS。

现在...我需要自定义依赖项之一,因此我可以执行以下操作之一: (* 这些更改可能对其他人没有用。)

1- 在(github、bitbucket 等)中对项目进行分叉,维护我的版本,并使用(mercurial 或 git)配方获取依赖项。
2-克隆项目,将其放入 PYTHONPATH,删除 DVCS 目录并将其添加到我的项目版本中。因此,每次更改都将是私人的。在这里我需要删除他们的 DVCS 之类的所有信息。

其他你能想到的都有。

我错过了什么吗?我也太没素质了吧?

谢谢!

I need some opinions here.

I'm working on a Django project using buildout to get the dependencies, etc...
I use mercurial as DVCS.

Now... I need to customize one of the dependencies, so I can do one of the following:
(* The changes may not be useful for everyone else.)

1- Do a fork of the project in (github, bitbucket, etc...) maintain my version, and get the dependency with (mercurial or git) recipe.
2- Clone the project, put it in the PYTHONPATH, erase DVCS dirs and add it to my projects version. So every change will be private. Here I need to erase all the info from their DVCS or something.

Any other you can think of.

I'm missing something? I'm too off?

Thanks!

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

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

发布评论

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

评论(3

无畏 2024-09-04 13:49:30

Esteban,采取这些步骤:我会用 Mercurial 语言来说话,但这也可以在 git 中完成。

  1. 克隆他们的项目
  2. 使您的项目克隆成为您项目中的 subrepo

这为您提供了最好的所有的世界。您可以在您的项目和他们的项目中编辑代码,而无需注意哪个是哪个,并且当您提交对代码的更改时,将连同指向您的项目克隆中的新变更集的指针一起进入您的存储库。然后,当您想要更新其项目的克隆时,您可以就地进行操作并简单地合并。

因此,这几乎就是您在“1”中所说的内容,但无需公开进行分叉或托管该存储库。只需将其克隆编辑为项目的子存储库,并且永远不要推送(无论如何,这都不起作用,因为您没有对其存储库的写访问权限)。

您的选项二的主要缺点是,当他们修改和改进您所依赖的项目时,您将很难将他们的改进引入并将其与您的项目合并。

Esteban, take these steps: I'll talk in mercurial-speak, but this is all do able in git too.

  1. clone their project
  2. make your clone of their project a subrepo in your project

That gives you the best of all worlds. You can edit code in your project and their project without paying attention to which is which, and when you commit the changes to your code go into your repo along with a pointer to a new changeset in your clone of their project. Then when you want to update your clone of their project you can do so in place and merge simply.

So this is pretty much what you said in '1' but there's no need to do a fork or host that repo publically. Just edit their clone as a subrepo of your project and never push (which wouldn't work anyway since you don't have write access to their repo).

Your option two's primary drawback is that as they modify and improve their project on which you depend you'll have a hardtime pulling their improvements in and merging them with yours.

层林尽染 2024-09-04 13:49:30

如果您使用 DVCS,那么您的所有提交都将保留为更改集,并且人们可以选择是否应用您的更改集。因此,只要您评论该更改,人们就可以根据自己的需要选择应用或不应用更改。更重要的是,如果他们不想要这种改变,但想要你的其他改变,他们可以挑选。因此,事实是 DVCS 会为您解决问题(前提是从您那里拉取的人员正确使用 DVCS)。

就我个人而言,我建议分叉,但正如我所说,这并不重要。

Well if you're using DVCS then all your commits are kept as change sets, and people can choose to apply your change set or not. So as long as you comment that change, people can choose apply the change or not as they see fit. What's more if they don't want that change, but want your other changes, they can pick and choose. So the truth is the DVCS takes care of the problem for you (provided the people pulling from you are using the DVCS properly).

Personally, I recommend forking, but like I said, it doesn't really matter.

各自安好 2024-09-04 13:49:30

你问这个问题的方式相当令人困惑,我不知道你是否真正理解DVCS的意义。

DVCS 的全部意义在于允许您拥有自己的私有存储库。除非您愿意,否则您不需要在 github 或 bitbucket 或任何这些地方发布您的存储库,但我当然不会删除 DVCS 信息。

如果上游项目除了您自己的私人更改之外还进行了您确实想要的更改,那么您将很难合并它们,除非您保留 DVCS 信息。

使用 Mercurial,您可以使用 Mercurial 子存​​储库功能将项目包含在您的项目中。

You ask this question in a rather confusing way, and I don't know if you really understand the point of a DVCS.

The whole point of a DVCS is to allow you to have your own private repository. You do not need to publish your repository on github or bitbucket or any of those places unless you want to, but I certainly would not erase the DVCS information.

If the upstream project makes changes you do want in addition to your own private changes, you will have a devil of a time merging them unless you keep the DVCS information around.

Using Mercurial, you can include a project in yours by using the Mercurial subrepo feature.

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