I am still playing around with ideas for how best to manage working with contrib code in Moodle and setting up servers to make the most effective use of Git. One issue I ran into was working with my local version of Moodle 2.0.
I started with my cloned 2.0 Moodle install. I created a branch to work on the birthday block - for that I cloned my Github moodle-block_birthday repository into the /blocks/birthday folder.
I then wanted to stop working on the birthday blcok and attend to a request to review someone else's code (in this case the course_menu block). Within Moodle I deleted the birthday block. I did a checkout master on my local copy of moodle and created a new branch for testing course_menu.
I added the new code and wanted to go through and install it. Now the blocks/birthday directory still exists but it was empty (which is what I wanted as I like to isolate the pieces when testing). When I logged in the upgrade screen came up wanting to install the birthday block first and then course_menu. To work around this I simply hid the birthday directory by renaming it to .birthday.
The experience made me wonder whether we should use the existence of the directory as an indicator that there is code to install or whether it makes sense to check for version.php or some other file instead. If we did that, then I would not be prompted to install something that really does not exist.
I'm also wondering if I were to want to manage customizations for some production sites if I should create a separate repository for each one or if I should be able to manage those with branches. The current thing preventing me from using branches for each production site is that one site may have the birthday block installed and the other may not. I'd like to be able to simply switch branches, update the config.php and begin testing the custom code for that site. As it is now, it seems I would either need to have a separate repository for each production site or I would have to hide all of the unused plugins for that particular site. I could easily enough create some scripts to do this but not having to would be all the better.
I'm open to suggestions or other ideas about how I might better manage such scenarios. I appreciate your thoughts, wisdom, and insights. Peace - Anthony