views:

25

answers:

1

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, customising 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.

+1  A: 

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.

richardolsson
You can also set the `svn:externals` with the `-r` option to a specific version of the library/framework to avoid problems with changing external dependencies.
Juri Glass
@Juri, good point! Although the difference from exporting that revision and checking it in regularly (as my first suggestion above) would be slim in practice, Juri's suggestion is definitely more "beautiful" in theory. :)
richardolsson
I wil probably be using SVN but what if i was using Mercurial? Probably similar? the .hgignore seems to me much simpler than excluding in svn. I don't think i have come across the :externals option in Mercurial tho.
PurplePilot