2.3 git-cl

Git-cl is a ‘helper script’ that uploads patches to Google’s Rietveld Code Review Tool – used by the developers for patch review – and, at the same time, updates LilyPond’s issue tracker.


Installing git-cl

Note: LilyDev users can jump straight to the next section on updating git-cl as it will already be installed in your home directory.

  1. Download git-cl by running the command:
    git clone https://github.com/gperciva/git-cl.git
    

    or, if that command fails for any reason, try:

    git clone git://github.com/gperciva/git-cl.git
    
  2. Add the ‘git-cl/’ directory to your PATH or create a symbolic link to the git-cl and upload.py scripts in one of your PATH directories (e.g. ‘$HOME/bin’).

    In GNU/Linux you can add directories to PATH by adding this line to your ‘.bashrc’ file located in your home directory:

    PATH=~/directory_containing_git-cl:"${PATH}"
    

Updating git-cl

LilyDev users should make sure that they always have the latest version of git-cl installed. It is possible that changes may have been made to git-cl that are not (yet) included in the version of LilyDev has been installed.

Using a terminal run the following commands:

cd ~/git-cl/
git pull

This will download and update you to the lastest version of git-cl.


Configuring git-cl

Set up login accounts

Because the git-cl updates two separate websites (Google’s Rietveld Code Review Tool and LilyPond’s issue tracker) you must have a valid user login and password to both sites.

Although that it may appear that you have to use a ‘Google’ email address for the Rietveld Code Review Tool when you sign up, you can instead select the option “I prefer to use my current email address” during sign up.

For a user login to the LilyPond issue tracker, please send your request, preferably using the email address you want to use for your login, to the LilyPond Developer’s mailing list (lilypond-devel@gnu.org).

Authorising git-cl for the LilyPond issue tracker

The git-cl command itself also needs to be ‘authorized’ so that it can access the LilyPond issue tracker.

  1. Once a valid login has been given for the LilyPond issye tracker, go to the ‘Account settings’ and select the ‘OAuth’ tab.
  2. Locate the ‘Register New Application’ section and enter git-cl in the ‘Application Name:’ field.
  3. Click on the ‘Register new application’ button. You should now see ‘git-cl’ listed under the ‘My Applications’ section.
  4. Click on the ‘Generate Bearer Token’ button. You should now see ‘git-cl’ listed under the ‘Authorized Applications’ section along with a value for the ‘Bearer Token’ entry. This value is used, in the next steps, to allow git-cl to access and update the LilyPond issue tracker.

Running git-cl for the first time

  1. Using a terminal, move to top source directory of the $LILYPOND_GIT directory and then run git-cl with the config option:
    cd $LILYPOND_GIT
    git-cl config
    
  2. When prompted for the Rietveld server:
    Rietveld server (host[:port]) [codereview.appspot.com]:
    
  3. When prompted for the Allura server (the LilyPond issue tracker):
    Allura server [https://sourceforge.net/p/testlilyissues/issues/]:
    
  4. When prompted for the Allura bearer token copy/paste the value generated in the previous steps for Authorising git-cl for the LilyPond issue tracker:
     
    Allura bearer token (see https://sourceforge.net/auth/oauth/) [fdbfca60801533465480]:
    

    Note: The above is a ‘fake’ bearer token just to illustrate the example. Do not use this value.

  5. Finally, when prompted for the CC list entry, add the LilyPond Developer’s group email.
    CC list ("x" to clear) [lilypond-devel@gnu.org]:
    

The git-cl script should now be correctly configured for use.


LilyPond — Contributor’s Guide v2.19.36 (development-branch).