The script is simply called from the repository holding the patch to backport, with the last branch number and the commit(s) ID(s) to send there and it then follows the chain of "down" repos to go down one step until it meets the indicated last one. It basically automates what we do by hand. Example: ./scripts/backport 1.9 1c7c0d6b97513e79c304aaf834f83843f32a674d Note that it does *not* push, which still has to be done by hand after building and testing.