开发者

Add dependencies to repository or not?

I have an engine that has quite a few dependencies. To make it easier for myself and others in my group who want to checkout the engine via SVN, I have committed the dependencies in the same repository. Now I know almost all projects require you to download the dependencies, but again, to remove that hassle, I included them (I am aware of licensing issues, which is why I will remove them if I distribute it. Currently it is a private repository so that is a non-issue).

Now we are moving over to Mercurial and decided to start with a fresh repository instead of converting SVN to Mercurial. So this is the time to clean up the repository junk and also to find out whether this is not a good practice. I suspect it is not but I thought I'd make sure and to ask what I can do to make it better and at t开发者_高级运维he same time retain the hassle free checkouts (that is, checkout the engine and dependencies in one go rather than download all of them and trying to match the versions at the same time).

A few more details. I am using an environment variable for the main path to my engine. Before I began writing this question, I was going to separate out my engine and the dependencies and make two repositories. One will be the engine, the other the dependencies. Then the dependencies will also have an environment variable so that projects can use them easily. This will also allow me to distribute my project without the dependencies and allow people to get it themselves depending on the license of any given dependency.

I hope the question is clear enough. Any suggestions, input, especially if its something 'open source projects' do out there would be greatly appreciated.


You can use the Subrepo extension:

Mercurial Subrepos - How do you create them and how do they work?

This allows you to have references to your dependencies - as long as they have Hg or SVN repositories. You fix the revision number and manually update it once you switch to the new version.

Even if you don't use Subrepo, hassle-free checkout is absolutely essential, whether it's implemented via source control or a separate script that downloads needed versions.


It's probably OK to store the dependencies in the repository if your project is small. But if it is complex or if you simply want a better (sophisticated and more powerful) solution have a look at ivy dependency manager.


Projects like Handbrake use wget/curl to download and compile the dependencies (x264 and ffmpeg among others) in the Makefile.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜