Community & Support

What should be Branching & committing policies for a contributed module

I have read significant documentation on drupal.org regarding using the CVS as a contributor. However, I still have some apprehensions.

What has been suggested is to create a new Branch for each major Drupal core version (6.x, 7.x), and then fork off sub-branches from these for each major module version corresponding to Drupal core (e.g. branches for 6.x-1.x, 6.x-2.x etc.).

This was exactly what I was following for one of my contributed modules. I had a 6.x-1.x branch originally, and I created a 6.x-2.x branch some time earlier for major enhancement to the module.

Now for the 6.x-2.x branch, I created a stable version 6.x-2.1, and a dev version 6.x-2.0-dev. However, I always committed all my updated code to the HEAD branch.

This lead to the dev version not getting regenerated on nightly builds. I was advised to instead commit to the 6.x-2.x branch.

Now if I do this, all code that I am creating would NOT get updated to the HEAD branch. If tomorrow, I create a new 6.x-3.x branch, I will need to fork it out from the 2.x branch, because the HEAD does not have the updated code. Exactly the same problem if I need to create a 7.x-1.0 branch.

However, the docs also suggest that I should always fork-off major branches from the HEAD branch. So, I am really confused here.

What should I be doing, commit to 6.x-2.x currently, or to HEAD? From where should I fork-off 6.x-3.x or 7.x-1.0? How should I ensure that dev versions for a branch always get upated on nightly builds?

If I am advised to commit to 6.x-2.x (the current version), how should I move my current commits that are all to HEAD to the 2.x branch? Also, in this case, should I commit all changes to the current version to HEAD also, to ensure HEAD always remains consistent with the current officially supported version?

I know these are a lot of queries, but a solution to these would perhaps make things more simpler as a contributor.

Comments

It would be great to have

It would be great to have some useful feedback here. Anyone???

--
I always think tomorrow will have more time than today.
And every today seems to pass-by faster than yesterday.
http://www.rahulsingla.com

nobody click here