开发者

When using a package or framework is there a standard way to use version control?

开发者 https://www.devze.com 2022-12-25 15:55 出处:网络
i.e. Do you put the whole package under VCS or just the components you are programming? Packages by there nature will get upgraded and that code will need to be added into the VCS,plus there is a lot

i.e. Do you put the whole package under VCS or just the components you are programming? Packages by there nature will get upgraded and that code will need to be added into the VCS, plus there is a lot of code that is static.

Specifically I am going to be working on Joomla, adding and building modules, customi开发者_如何学运维sing modules and the look and feel. Initially this will be just me but will expand to possibly two more developers as the project ramps up. My reaction would be just to VCS the lot, it means that i know it is all there and deployment via CI is easier(?).

The alternative is to exclude the bulk of the code that is not being altered which could be error prone and laborious.

As there is not a specific answer for this and i am looking for either experience or best practice advice i have marked it community wiki.


I usually do one of two things (I use SVN):

  • Put a release version (no SCM meta-data) of the library/framework in a separate folder in my SVN repository. That way I know that the code is stable, and if something stops working, it's not because of changes to the framework, but instead my own fault (and can easily be fixed by me.)
  • Use svn:externals to automatically update from the official SVN of the library/framework. This is less safe, but is sometimes nice, especially when you are a contributor to the library/framework and can fix bugs that may occur yourself.

If you're using SVN, and want to use externals, do this:

svn propset svn:externals "foldername http://libdomain.com/svn/trunk" libs

...where libs is your library folder (onto which this SVN property will get set), and foldername is the name of the sub-folder in which this particular library should be placed.

0

精彩评论

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