Index: openacs-4/packages/acs-core-docs/www/contributing-code.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/Attic/contributing-code.html,v diff -u -r1.2.2.6 -r1.2.2.7 --- openacs-4/packages/acs-core-docs/www/contributing-code.html 9 Jan 2006 01:28:53 -0000 1.2.2.6 +++ openacs-4/packages/acs-core-docs/www/contributing-code.html 9 Apr 2006 22:26:13 -0000 1.2.2.7 @@ -1,9 +1,10 @@ -
There are three main ways to contribute code to OpenACS:
To contribute a small fix, if you do not have a developer account, submit a patch.
If you are making many changes, or would like to become a direct contributor, send mail to the Core Team asking for commit rights. You can then commit code directly to the repository:
Use one of the checkout methods described above to get files to your system. This takes the place of steps 1 and 2 in the section called “Installation Option 2: Install from tarball”. Continue setting up the site as described there.
Fix bugs and add features.
- Commit that file (or files):
cvs commit -m "what I did and why" filename
+
There are three main ways to contribute code to OpenACS:
To contribute a small fix, if you do not have a developer account, submit a patch.
If you are making many changes, or would like to become a direct contributor, send mail to the Core Team asking for commit rights. You can then commit code directly to the repository:
Use one of the checkout methods described above to get files to your system. This takes the place of steps 1 and 2 in Section�, “Installation Option 2: Install from tarball”. Continue setting up the site as described there.
Fix bugs and add features.
+ Commit that file (or files):
cvs commit -m "what I did and why" filename
Because this occurs in your personal checkout and not an anonymous one, this commit automagically moves back upstream to the Mother Ship repository at cvs.openacs.org. The names of the changed files, and your comments, are sent to a mailing list for OpenACS developers. A Core Team developer may review or roll back your changes if necessary. @@ -14,18 +15,18 @@
Add a new package. Contact the Core Team to get approval and to get a module alias created.
Check out acs-core on the HEAD branch. (Weird things happen if you add files to a branch but not to HEAD):
cd /tmp
cvs -d:ext:cvs.openacs.org:/cvsroot checkout acs-core
Copy your package directory from your working directory to this directory. Make sure not to copy any CVS directories.
cp -r /var/lib/aolserver/service0/packages/newpackage /tmp/openacs-4/packages
Import the package into the cvs.openacs.org cvs repository:
cd /tmp/openacs-4/packages/newpackage
-cvs import -m "Initial import of newpackage" openacs-4/packages/newpackage myname newpackage-0-1d
Add the new package to the modules file. (An administrator has to do this step.) On any machine, in a temporary directory:
cvs -d :ext:cvs.openacs.org:/cvsroot co CVSROOT
+cvs import -m "Initial import of newpackage" openacs-4/packages/newpackage myname newpackage-0-1d
Add the new package to the modules file. (An administrator has to do this step.) On any machine, in a temporary directory:
cvs -d :ext:cvs.openacs.org:/cvsroot co CVSROOT
cd CVSROOT
-emacs modules
Add a line of the form:
photo-album-portlet openacs-4/packages/photo-album-portlet
Commit the change:
cvs commit -m "added alias for package newpackage" modules
This should print something like:
cvs�commit:�Examining�.
+emacs modules
Add a line of the form:
photo-album-portlet openacs-4/packages/photo-album-portlet
Commit the change:
cvs commit -m "added alias for package newpackage" modules
This should print something like:
cvs�commit:�Examining�.
****�Access�allowed:�Personal�Karma�exceeds�Environmental�Karma.
Checking�in�modules;
/cvsroot/CVSROOT/modules,v��<--��modules
new�revision:�1.94;�previous�revision:�1.93
done
cvs�commit:�Rebuilding�administrative�file�database
Although you should add your package on HEAD, you should do package development on the latest release branch that your code is compatible with. So, after completing the import, you may want to branch your package:
cd /var/lib/aolserver/service0/packages/newpackage -cvs tag -b oacs-5-1
See the section called “How to package and release an OpenACS Package”
Some packages are already in cvs at openacs-4/contrib/packages
. Starting with OpenACS 5.1, we have a Maturity mechanism in the APM which makes the contrib
directory un-necessary. If you are working on a contrib
package, you should move it to /packages
. This must be done by an OpenACS administrator. On cvs.openacs.org:
cp -r /cvsroot/openacs-4/contrib/packages/package0 /cvsroot/openacs-4/packages
Update the modules file as described above.
Remove the directory from cvs in the old location using cvs rm
. One approach for file in `find | grep -v CVS`; do rm $file; cvs remove $file; done
See Section�, “How to package and release an OpenACS Package”
Some packages are already in cvs at openacs-4/contrib/packages. Starting with OpenACS 5.1, we have a Maturity mechanism in the APM which makes the contrib directory un-necessary. If you are working on a contrib package, you should move it to /packages. This must be done by an OpenACS administrator. On cvs.openacs.org:
cp -r /cvsroot/openacs-4/contrib/packages/package0 /cvsroot/openacs-4/packages
Update the modules file as described above.
Remove the directory from cvs in the old location using cvs rm. One approach for file in `find | grep -v CVS`; do rm $file; cvs remove $file; done
CVS commit procedures are governed by TIP (Technical Improvement Proposal) #61: Guidelines for CVS committers @@ -50,9 +51,9 @@ each dot release.
New packages should be created in the
-
+
/packages
-
+
directory
and the maturity flag in the .info file should be zero. This is a change from
previous policy, where new packages went to /contrib/packages)
@@ -82,11 +83,11 @@
versions.
CVS commit messages and code comments should refer to - bug, tip, or patch number if appropriate, in the format "resolves - bug 11", "resolves bugs 11, resolves bug 22". "implements tip 42", - "implements tip 42, implements tip 50", "applies patch 456 by User - Name", "applies patch 456 by User Name, applies patch 523 by - ...". + bug, tip, or patch number if appropriate, in the format "resolves + bug 11", "resolves bugs 11, resolves bug 22". "implements tip 42", + "implements tip 42, implements tip 50", "applies patch 456 by User + Name", "applies patch 456 by User Name, applies patch 523 by + ...".
When to TIP
@@ -122,7 +123,7 @@ Tags
When a package is released in final form, the developer - shall tag it "packagename-x-y-z-final" and "openacs-x-y-compat". x-y + shall tag it "packagename-x-y-z-final" and "openacs-x-y-compat". x-y should correspond to the current branch. If the package is compatible with several different core versions, several compat tags should be applied. @@ -135,9 +136,9 @@ flag which defaults to no-effect wouldn't require a TIP. Added a new mandatory flag to an existing function would require a TIP. -
Informal guidelines which may be obsolete in places and should be reviewed:
Before committing to cvs you must submit a bug report and @@ -214,12 +215,12 @@
Always accompany a commit with a brief but informative comment. If your commit is related to bug number N and/or patch - number P, indicate this in the commit comment by including "bug N" - and/or "patch P". This allows us to link bugs and patches in the + number P, indicate this in the commit comment by including "bug N" + and/or "patch P". This allows us to link bugs and patches in the Bug Tracker with changes to the source code. For example suppose you are committing a patch that closes a missing HTML tag, then an - appropriate comment could be "Fixing bug 321 by applying patch 134. - Added missing h3 HTML close tag". + appropriate comment could be "Fixing bug 321 by applying patch 134. + Added missing h3 HTML close tag".
Commit one cohesive bug fix or feature change at a time. Don't put a bunch of unrelated changes into one commit.