14.3 Patchy

Introduction

Patchy is a set of Python scripts to automate two administrative tasks:

Installing patchy

To install patchy, you should do the following:

  1. Create a new user on your box to run patchy; this is a security step for your own protection. It is recommended that this should not be an administrator. New users are created from System; Administration; Users and Groups.
  2. Get the patchy scripts from
    https://github.com/gperciva/lilypond-extra/
    

    Patchy is in the ‘patches/’ directory.

  3. Put the scripts in a sensible place on your system
  4. Create a new git repository with
    git clone git://git.sv.gnu.org/lilypond.git
    

    This will create a directory called lilypond with the repo in it. Make sure it’s where you want it and name it lilypond-git (assuming you want to follow the standard naming conventions).

  5. Create an environment variable called LILYPOND_GIT and make it equal to the location of your new git repo. You can do this by editing ‘$HOME/.profile’ and adding the line:
    export LILYPOND_GIT=~/lilypond-git
    

    then logging out and in.

  6. Run patchy once to set up config files. Cancel this build (ctrl-c).
  7. Edit ‘$HOME/.lilypond-patchy-config’ to provide working directories for your build directory, your results directory, compiler options and notification method. If you don’t want to use email notification, then delete everything after smtp_command:.
  8. Ensure that your new user has git push access. Follow the instructions in the CG at Commit access. Do not set password protection for the key - if you do you will not be able to run patchy unattended.

lilypond-patchy-staging.py

lilypond-patchy-staging.py is run with

python lilypond-patchy-staging.py

Not much appears to happen except you can see a lot of CPU gets used if you open System Monitor. There’s not much point running lilypond-patchy-staging.py unless there is something in staging to be merged to master, however, if there’s nothing in staging then the script won’t waste resources by compiling anything.

The script fetches the current patches in staging and runs make, make test and make doc to ensure that all of these complete error-free. If you have set patchy up to use email, it emails its results to you. If you haven’t, then you can view them in a logfile. It also merges staging into master.

test-patches.py

test-patches prepares a regtest comparison for a human to quickly glance at, to determine if the patch is ready for a review. After looking at the comparison (or the lack of a comparison in the case of problems), run accept-patch.py or reject-patch.py.

Once a patch has gotten a "LGTM" from Patchy, it should be reviewed by relevant developers, and if it passes this, it can be considered for countdown (see Commits and patches) and pushing to staging (see Pushing to staging).


LilyPond — Contributor’s Guide

inserted by FC2 system