Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Nutch Wiki" for change 
notification.

The "HowToContribute" page has been changed by SebastianNagel:
https://wiki.apache.org/nutch/HowToContribute?action=diff&rev1=12&rev2=13

Comment:
add section about testing/reviewing/applying patches

  Finally, patches can either be attached to a message sent to 
[[http://nutch.apache.org/mailing_lists.html|nutch-dev]] mailing list or
  to a bug report in [[http://issues.apache.org/jira/browse/Nutch|Jira]] (''my 
prefered way in order to easily keep trace of contributions. But it is a very 
personal point of view'').
  
+ === Testing and reviewing patches ===
+ 
+ Patches need careful testing and review to avoid regressions. Reviewing 
patches is mainly the task of committers. But you are welcome to help, esp. if 
you run into the same problem and found an issue in 
[[http://issues.apache.org/jira/browse/Nutch|Jira]], yet unresolved but with a 
patch attached.
+ Review and testing needs time and should include the following steps:
+  1. try to '''reproduce''' the problem. If you're not able to reproduce a 
problem, it's impossible to test whether a patch really resolves it.
+  1. try to get a clear understanding of the problem
+  1. have a look at the patch file: Ideally, you'll get and understanding 
about the solution proposed by the patch (no problem if not)
+  1. apply the patch, see below [[#Applying_patches]]
+  1. build Nutch and test whether the problem disappeared
+  1. does the patch break other things (add regressions)?
+   - run the unit tests
+   - test situations which you feel they may be affected by the patch
+  1. report your finding in 
[[http://issues.apache.org/jira/browse/Nutch|Jira]] or on 
[[http://nutch.apache.org/mailing_lists.html|nutch-dev]]. It's always better to 
have one review more, than to introduce a regression because of insufficient 
testing.
+ 
+ === Applying patches ===
+ 
+ A properly generated patch can be automatically applied to the source tree. 
The `patch` utility is one tool to apply patches. Change into the Nutch root 
folder and run:
+ {{{
+ > patch -p0 <path_to.patch
+ }}}
+ Do not ignore the output of `patch`, it may indicate errors. Applying a patch 
may (partially) fail, if the source code has changed meanwhile.
+ A good starting point to learn more about patches it the Wikipedia article 
[[http://en.wikipedia.org/wiki/Patch_%28Unix%29|Patch]].
+ 

Reply via email to