[OPEN-ILS-DEV] Submitting a patch (was: Conversion conundrums)

Dan Scott denials at gmail.com
Thu Jun 7 22:02:43 EDT 2007


On 07/06/07, Don Hamilton <dhamilton at wlu.ca> wrote:
>
>
> Thanks again, Dan.
>
> Here's my last missive for today, I promise, cuz then I have to do *real*
> work...
>
> Attached is a slightly modified pg_loader.pl. At Mike's suggestion, I
> surround the generated sql with BEGIN/COMMIT, so when you screw up a data
> load, you don't have to refresh the database and start again.
>
> What is the proper way to submit this back to the project?
> Are my simple changes appropriate?

Hi Don:

Mike's suggestion to wrap the INSERT statements in a transaction make
perfect sense. I took a brief look at your changes, and my only
suggestion  to improve readability of the source would be to move the
BEGIN into its own $output->print() section, and add a comment about
how the transaction means that if the data load gets screwed up, you
can fix up the data and try again without having to completely refresh
the database.

In general, the process for submitting a patch to Evergreen (or most
other projects) can be summarized as:

1) make the change locally and test it out
2) cd into the root directory of your CVS checkout ('cd ILS')
3) ensure that your CVS checkout is up to date ('cvs up')
4) create a "patch" by capturing the differences between your version
of the file(s) and the CVS version: ('cvs diff -c
ILS/Open-ILS/src/extras/import > ~/pg_loader_transaction.patch')
5) test your patch on a clean CVS checkout ('cd ILS.clean; patch -p0 <
~/pg_loader_transaction.patch')
6) follow "How to help" directions to submit the patch
(http://open-ils.org/documentation/contributing.html). The final
section includes instructions for submitting a patch; for Evergreen
this includes setting the subject to "PATCH: <describe purpose of
patch>" and including a Developer's Certificate of Origin (DCO) for
any significant code contributions (although it doesn't hurt for small
contributions either!)

The first couple of times through, the process can seem pretty lengthy
-- but it becomes second nature after a while. And there are plenty of
people to help you out with the process. It's great to see more
patches rolling in -- thanks Don!

-- 
Dan Scott
Laurentian University


More information about the Open-ils-dev mailing list