+Both scripts will perform their build operations in;
+@example
+build_dir = /tmp/lilypond-autobuild/
+@end example
+
+@end itemize
+
+Each completed patch test will also generate its own directory in
+@file{/tmp/...} labelled with the tracker issue number prefixed by
+@code{show-}.
+@example
+\tmp\show-3446
+@end example
+
+Both the scripts create clones of @code{staging} and @code{master}
+branches (prefixed with @code{test-}) with a third branch, called
+@code{test-master-lock} used as a check to protect against two or more
+instances of Patchy being run locally at the same time.
+
+
+@node Running the scripts
+@subsection Running the scripts
+
+@unnumberedsubsec Testing & pushing new commits
+
+@code{lilypond-patchy-staging.py} is run @emph{without} any arguments.
+It then checks to see if @code{remote/origin/staging} is
+@qq{further ahead} than @code{remote/origin/master}.
+
+@noindent
+If there are no new differences between the two branches since the last
+run check, the script will report something like this:
+
+@smallexample
+(UTC) Begin LilyPond compile, previous commit at 4726764cb591f622e7893407db0e7d42bcde90d9
+Success: No new commits in staging
+@end smallexample
+
+@noindent
+If there are any differences between the two branches since the last
+run check, (or if the script cannot for any reason, locate the last
+instance of a commit that it checked) it will report something like
+this:
+
+@smallexample
+(UTC) Begin LilyPond compile, previous commit at 4726764cb591f622e7893407db0e7d42bcde90d9
+Merged staging, now at: 79e98a773b6570cfa28a15775a9dea3d3e54d6b5
+ Success: ./autogen.sh --noconfigure
+ Success: /tmp/lilypond-autobuild/configure --disable-optimising
+...
+@end smallexample
+
+and proceed with running @code{make}, @code{make test} and a
+@code{make doc}. Unlike @code{test-patches.py} if all the tests pass,
+the script then pushes the changes to @code{remote/origin/master}.
+
+@smallexample
+...
+Success: nice make clean
+Success: nice make -j7 CPU_COUNT=7
+Success: nice make test -j7 CPU_COUNT=7
+Success: nice make doc -j7 CPU_COUNT=7
+To ssh://joe@@git.sv.gnu.org/srv/git/lilypond.git
+ 79e98a7..4726764 test-staging -> master
+ Success: pushed to master
+@end smallexample
+
+@warning{In the case where any of the @code{lilypond-patchy-staging.py}
+tests fail, do not try to push your own fixes but report the failures to
+the Developers List <lilypond-devel@@gnu.org> for advice.}
+
+
+@unnumberedsubsec Testing new patches
+
+When run without any argument, @code{test-patches.py} will check
+@uref{http://code.google.com/p/lilypond/issues/list} for all tracker
+issues that are marked with the label @code{Patch-new}. It then scrapes
+the issue, looking for the last Rietveld URL entered. It then downloads
+the patch file and applies it to @code{test-master}.
+
+Here is an example where two tracker issues labeled as @code{Patch-new}
+were detected:
+
+@smallexample
+...
+issues [4007, 4008]
+Trying issue 4007
+Found url: http://codereview.appspot.com/112210043
+Found patch: 4007,/home/joe/lilypond-git/issue112210043_1.diff,
+Trying issue 4008
+Found url: http://codereview.appspot.com/115770043
+Found patch: 4008,/home/joe/lilypond-git/issue115770043_1.diff,
+Fetching, cloning, compiling master.
+...
+@end smallexample
+
+If run no tracker items with the @var{Patch-New} label are found it will
+report:
+
+@example
+issues []
+@end example
+
+The script can also be run using the tracker issue number(s) as an
+argument regardless if the @var{Patch-New} label has been assigned;
+
+@example
+test-patches.py 4006
+@end example
+
+or
+
+@example
+test-patches.py 4006 3992 4020
+@end example
+
+The script then checks to see if any previously
+@code{make test-baseline}s have been generated and if the commit ID of
+@code{remote/origin/master} is different from that previously completed
+test.
+
+@noindent
+If no previous @code{make test-baseline} test is discovered or if the
+commit ID of @code{remote/origin/master} has changed, then a new
+@code{make test-baseline} will run first automatically before the patch
+is tested:
+
+This shows when the commit ID has changed:
+
+@smallexample
+...
+(UTC) Begin LilyPond compile, previous commit at 3f92dcb2c81dcd2755542b57a0a5f2039f29a211
+Merged master, now at: 4726764cb591f622e7893407db0e7d42bcde90d9
+ Success: ./autogen.sh --noconfigure
+ Success: /tmp/lilypond-autobuild/configure --disable-optimising
+ Success: nice make clean
+ Success: nice make -j3 CPU_COUNT=3
+ Success: nice make test-baseline -j3 CPU_COUNT=3
+ Success: nice make doc -j3 CPU_COUNT=3
+ Success: nice make doc-clean
+...
+@end smallexample
+
+@noindent
+If a previous regression test @emph{is} discovered @emph{and} if the
+commit ID of @code{remote/origin/master} has not changed, then the patch
+will be tested against the previous @code{make test-baseline} without
+the need to re-generate a new one:
+
+@smallexample
+...
+issues [4009]
+Trying issue 4009
+Found url: http://codereview.appspot.com/110540043
+Found patch: 4009,/home/joe/lilypond-extra/patches/issue110540043_1.diff,
+Fetching, cloning, compiling master.
+(UTC) Begin LilyPond compile, previous commit at 4726764cb591f622e7893407db0e7d42bcde90d9
+ Success: No new commits in master
+Using test baseline from previous build.
+...
+@end smallexample
+
+The patch is then applied and a @code{make} and @code{make check} are
+run. A full @code{make doc} is also run if the
+@file{.lilypond-patchy-config} file has been edited accordingly;
+
+@smallexample
+...
+Issue 4009:
+Issue 4009: Testing patch issue110540043_1.diff
+ Success: git apply --index /home/joe/lilypond-git/issue112210043_1.diff
+ Success: ./autogen.sh --noconfigure
+ Success: /tmp/lilypond-autobuild/configure --disable-optimising
+ Success: nice make clean
+ Success: nice make -j3 CPU_COUNT=3
+ Success: nice make check -j3 CPU_COUNT=3
+ Success: nice make doc -j3 CPU_COUNT=3
+...
+@end smallexample
+
+Once all the tests have run (successfully or not), the script will clean
+up from the previous patch and, if required, start testing the next
+issue;
+
+@smallexample
+...
+Issue 4007: Cleaning up
+ Success: nice make test-clean
+ Success: nice make doc-clean
+ Success: nice make clean
+ Success: git reset --hard
+Issue 4007: Done.
+Issue 4008:
+Issue 4008: Testing patch issue115770043_1_diff
+ Success: git apply --index /home/joe/lilypond-git/issue115770043_1.diff
+ Success: ./autogen.sh --noconfigure
+...
+@end smallexample
+
+and so on.
+
+@unnumberedsubsubsec Checking the regression test results
+
+Assuming the patch passed all the @code{make} tests, the regression
+differences will be located in the @file{/test-results/} directory
+within the build location for the patch issue number;
+
+@example
+/tmp/show-4007/test-results/
+@end example
+
+Open @file{index.html} in a browser of your choice to view any
+differences.
+
+@noindent
+Alternatively if the Firefox browser is installed, then the regression
+test results can be opened by calling the appropriate
+@file{show-regtests-} file located in the auto-compile log location;
+
+@example
+sh ~/lilypond-auto-compile-results/show-regtests-4007
+@end example
+
+See @ref{Regression tests}.
+
+@unnumberedsubsec Reporting test results
+
+Once a patch has been tested and the regression tests have been
+manually checked, the tracker can be updated manually by editing the
+tracker issue directly in the web browser or by using two additional
+python scripts that are included as part of the Patchy suite.
+
+@unnumberedsubsubsec For patches that have passed
+
+Use the @code{accept-patch.py} script and run it with the Google issue
+tracker number (not the Rietveld issue number) as an argument;
+
+@example
+accept-patch.py 4007
+@end example
+
+This will automatically update the tracker issue with the phrase
+@qq{Patchy the autobot says: passes tests.}.
+
+@noindent
+It is also possible to add additional information to the default
+message by adding a second argument within double-quote marks.
+
+@example
+accept-patch.py 4007 "This also includes a full documentation build."
+@end example
+
+The tracker issue's label is then changed automatically to
+@qq{Patch-review}.
+
+@unnumberedsubsubsec Patches that have failed
+
+Use the @code{reject-patch.py} script and run it with the Google issue
+tracker number (not the Rietveld issue number) as an argument but you
+@emph{must} also include a second argument, in double-quotes, stating
+the reason the patch has been rejected;
+
+@example
+reject-patch.py 4007 "Fails the 'make check' test."
+@end example
+
+Once the @code{reject-patch.py} script has been run, the tracker issue's
+label is changed automatically to @qq{Patch-Needs_work}.
+
+
+@node Automating Patchy
+@subsection Automating Patchy
+
+To run as a cron job make sure you have;
+
+@example
+[notification]
+notify_non_action = no
+@end example
+
+in @file{$HOME/.lilypond-patchy-config} to avoid any unintentional email
+flooding:
+
+Assuming that Patchy run a user @qq{patchy}, create a file called
+@file{$HOME/lilypond-patchy.cron}, adapting it as necessary (the
+@code{/2} means @qq{run this every 2 hours}):
+
+@smallexample
+02 0-23/2 * * * /home/patchy/lilypond-extra/patches/lilypond-patchy-staging.py
+@end smallexample
+
+@warning{@code{cron} will not inherit environment variables so you must
+re-define any variables inside @file{$HOME/lilypond-patchy.cron}. For
+instance, @var{LILYPOND_GIT} may need to be defined if
+@var{git_repository_dir} is not correctly set in
+@file{$HOME/.lilypond-patchy-config}.}
+
+Finally, apply the cron job (you may need superuser privileges for
+this):
+
+@example
+crontab -u patchy /home/patchy/lilypond-patchy.cron
+@end example
+
+
+@node Troubleshooting Patchy
+@subsection Troubleshooting Patchy
+
+The following is a list of the most common messages that the scripts
+may report with explanations.
+
+@itemize