| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274 |
- <HTML
- ><HEAD
- ><TITLE
- >Submitting Patches</TITLE
- ><META
- NAME="GENERATOR"
- CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
- "><LINK
- REL="HOME"
- TITLE="PEAR Manual"
- HREF="index.html"><LINK
- REL="UP"
- TITLE="Contributing"
- HREF="contributing.html"><LINK
- REL="PREVIOUS"
- TITLE="Writing New Packages"
- HREF="contributing.newpackage.html"><LINK
- REL="NEXT"
- TITLE="Reporting Bugs"
- HREF="contributing.bugs.html"><META
- HTTP-EQUIV="Content-type"
- CONTENT="text/html; charset=ISO-8859-1"></HEAD
- ><BODY
- CLASS="sect1"
- BGCOLOR="#FFFFFF"
- TEXT="#000000"
- LINK="#0000FF"
- VLINK="#840084"
- ALINK="#0000FF"
- ><DIV
- CLASS="NAVHEADER"
- ><TABLE
- SUMMARY="Header navigation table"
- WIDTH="100%"
- BORDER="0"
- CELLPADDING="0"
- CELLSPACING="0"
- ><TR
- ><TH
- COLSPAN="3"
- ALIGN="center"
- >PEAR Manual</TH
- ></TR
- ><TR
- ><TD
- WIDTH="10%"
- ALIGN="left"
- VALIGN="bottom"
- ><A
- HREF="contributing.newpackage.html"
- ACCESSKEY="P"
- >Prev</A
- ></TD
- ><TD
- WIDTH="80%"
- ALIGN="center"
- VALIGN="bottom"
- >Chapter 5. Contributing</TD
- ><TD
- WIDTH="10%"
- ALIGN="right"
- VALIGN="bottom"
- ><A
- HREF="contributing.bugs.html"
- ACCESSKEY="N"
- >Next</A
- ></TD
- ></TR
- ></TABLE
- ><HR
- ALIGN="LEFT"
- WIDTH="100%"></DIV
- ><DIV
- CLASS="sect1"
- ><H1
- CLASS="sect1"
- ><A
- NAME="contributing.patches">Submitting Patches</H1
- ><P
- > If you have modified a package to expand its functionality or to fix a
- bug, you should contribute your changes back to the community (some
- licenses force you to do so, and it is generally considered immoral not to).
- </P
- ><P
- > Before creating the patch, you must first obtain the latest sources of the
- package you wish to patch from CVS by running the commands (the package
- in this example is Foo_Bar):
- <TABLE
- WIDTH="100%"
- CELLSPACING="0"
- CELLPADDING="0"
- BORDER="0"
- BGCOLOR="#EEEEEE"
- ><TR
- ><TD
- ><PRE
- CLASS="screen"
- ><TT
- CLASS="userinput"
- ><B
- > cvs -d:pserver:cvsread@cvs.php.net:/repository login
- </B
- ></TT
- >
- password is <TT
- CLASS="userinput"
- ><B
- >phpfi</B
- ></TT
- >
- <TT
- CLASS="userinput"
- ><B
- > cvs -d:pserver:cvsread@cvs.php.net:/repository co pear/Foo_Bar
- </B
- ></TT
- ></PRE
- ></TD
- ></TR
- ></TABLE
- >
- Now that you have the latest sources, you can edit the relevant file(s).
- Make sure that your patch is fully compatible with the PEAR <A
- HREF="standards.html"
- >coding
- standards.</A
- >.
- </P
- ><P
- > After you have finished adding/changing the code, TEST it: We will not
- accept code that hasn't been carefully tested.
- When you are absolutely sure the new code doesn't introduce bugs, create a
- unified diff by running:
- <TABLE
- WIDTH="100%"
- CELLSPACING="0"
- CELLPADDING="0"
- BORDER="0"
- BGCOLOR="#EEEEEE"
- ><TR
- ><TD
- ><PRE
- CLASS="screen"
- ><TT
- CLASS="userinput"
- ><B
- >cd pear/Foo_Bar</B
- ></TT
- >
- <TT
- CLASS="userinput"
- ><B
- >cvs diff -u >Foo_Bar.diff</B
- ></TT
- ></PRE
- ></TD
- ></TR
- ></TABLE
- >
- The resulting .diff file contains your patch. This diff makes it easy
- for us to see what has been changed.
- </P
- ><P
- > Next step is to submit the patch. Send a mail to pear-dev@lists.php.net and
- Cc the maintainer(s) of the package. The subject of the mail should be
- prefixed with '[Patch]' to make it clear you are submitting a patch. Also
- include a verbose explanation of what the patch does.
- Don't forget to attach the .diff file to the mail. The maintainers of
- the package are usually listed in the header of each source file. Apart
- from that their email adresses are available on the package information
- page on http://pear.php.net/.
- </P
- ><DIV
- CLASS="note"
- ><BLOCKQUOTE
- CLASS="note"
- ><P
- ><B
- >Note: </B
- >
- If you are using Outlook or Outlook Express, please change the file
- extension of the diff file to .txt, because Outlook's MIME-Type
- detection depends on the file extension and attachments with a
- MIME-Type not equal to <TT
- CLASS="literal"
- >text/plain</TT
- > will be rejected
- by our mailinglist software.
- </P
- ></BLOCKQUOTE
- ></DIV
- ><DIV
- CLASS="note"
- ><BLOCKQUOTE
- CLASS="note"
- ><P
- ><B
- >Note: </B
- >
- If your patch does break backwards compatibility, the chances are fairly
- good that the maintainers won't be happy about it. Thus you should always
- try to fix a bug in a way that does not seriously change the public API.
- But if there is absolutely no way to keep backwards compatibility and/or
- if your patch contains a groundbraking improvement, even API changes are
- fine.
- </P
- ></BLOCKQUOTE
- ></DIV
- ></DIV
- ><DIV
- CLASS="NAVFOOTER"
- ><HR
- ALIGN="LEFT"
- WIDTH="100%"><TABLE
- SUMMARY="Footer navigation table"
- WIDTH="100%"
- BORDER="0"
- CELLPADDING="0"
- CELLSPACING="0"
- ><TR
- ><TD
- WIDTH="33%"
- ALIGN="left"
- VALIGN="top"
- ><A
- HREF="contributing.newpackage.html"
- ACCESSKEY="P"
- >Prev</A
- ></TD
- ><TD
- WIDTH="34%"
- ALIGN="center"
- VALIGN="top"
- ><A
- HREF="index.html"
- ACCESSKEY="H"
- >Home</A
- ></TD
- ><TD
- WIDTH="33%"
- ALIGN="right"
- VALIGN="top"
- ><A
- HREF="contributing.bugs.html"
- ACCESSKEY="N"
- >Next</A
- ></TD
- ></TR
- ><TR
- ><TD
- WIDTH="33%"
- ALIGN="left"
- VALIGN="top"
- >Writing New Packages</TD
- ><TD
- WIDTH="34%"
- ALIGN="center"
- VALIGN="top"
- ><A
- HREF="contributing.html"
- ACCESSKEY="U"
- >Up</A
- ></TD
- ><TD
- WIDTH="33%"
- ALIGN="right"
- VALIGN="top"
- >Reporting Bugs</TD
- ></TR
- ></TABLE
- ></DIV
- ></BODY
- ></HTML
- >
|