Go to file
Mike Frysinger f7c51606f0 hooks: support external hooks running different Python version
As we convert repo to support Python 3, the version of Python that we
use might not be the version that repo hooks users have written for.
Since repo upgrades are not immediate, and not easily under direct
control of end users (relative to the projects maintaining the hook
code), allow hook authors to declare the version of Python that they
want to use.

Now repo will read the shebang from the hook script and compare it
against the version of Python repo itself is running under.  If they
differ, we'll try to execute a separate instance of Python and have
it load & execute the hook.  If things are compatible, then we still
use the inprocess execution logic that we have today.

This allows repo hook users to upgrade on their own schedule (they
could even upgrade to Python 3 ahead of us) without having to worry
about their supported version being exactly in sync with repo's.

Bug: https://crbug.com/gerrit/10418
Change-Id: I97c7c96b64fb2ee465c39b90e9bdcc76394a146a
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/228432
Reviewed-by: David Pursehouse <dpursehouse@collab.net>
Tested-by: Mike Frysinger <vapier@google.com>
2019-07-27 01:10:40 +00:00
docs hooks: support external hooks running different Python version 2019-07-27 01:10:40 +00:00
hooks hooks/pre-auto-gc-battery: allow gc to run on non-laptops 2018-07-11 13:45:58 -07:00
subcmds Add support for partial clone. 2019-07-16 00:23:16 +00:00
tests hooks: support external hooks running different Python version 2019-07-27 01:10:40 +00:00
.flake8 Replace pylint with pyflakes/flake8 2016-09-14 09:49:02 +02:00
.gitattributes Adds additional crlf clobber avoidance. 2016-06-22 08:36:45 +00:00
.gitignore Add repoc to the .gitignore file 2013-03-08 01:18:08 +00:00
.mailmap Update .mailmap 2017-05-26 21:44:57 +09:00
.project Set correct name in PyDev and Eclipse project config 2013-04-19 09:35:43 +09:00
.pydevproject Leverage the next keyword from python 2.7 2018-12-19 11:06:35 -08:00
color.py set default file encoding to utf-8 2019-06-13 14:30:52 +00:00
command.py set default file encoding to utf-8 2019-06-13 14:30:52 +00:00
COPYING Initial Contribution 2008-10-21 07:00:00 -07:00
editor.py set default file encoding to utf-8 2019-06-13 14:30:52 +00:00
error.py set default file encoding to utf-8 2019-06-13 14:30:52 +00:00
event_log.py set default file encoding to utf-8 2019-06-13 14:30:52 +00:00
git_command.py Add support for partial clone. 2019-07-16 00:23:16 +00:00
git_config.py handle binary stream from urllib.request.urlopen 2019-07-04 18:19:00 -04:00
git_refs.py set default file encoding to utf-8 2019-06-13 14:30:52 +00:00
git_ssh add license header to a few more files 2019-06-13 13:23:19 -04:00
gitc_utils.py set default file encoding to utf-8 2019-06-13 14:30:52 +00:00
main.py repo/main: add module docstrings 2019-07-12 17:23:53 +00:00
manifest_xml.py Add support for partial clone. 2019-07-16 00:23:16 +00:00
pager.py set default file encoding to utf-8 2019-06-13 14:30:52 +00:00
platform_utils_win32.py set default file encoding to utf-8 2019-06-13 14:30:52 +00:00
platform_utils.py set default file encoding to utf-8 2019-06-13 14:30:52 +00:00
progress.py set default file encoding to utf-8 2019-06-13 14:30:52 +00:00
project.py hooks: support external hooks running different Python version 2019-07-27 01:10:40 +00:00
pyversion.py set default file encoding to utf-8 2019-06-13 14:30:52 +00:00
README.md README: link in new bug tracker 2018-12-20 02:11:46 -05:00
repo Add support for partial clone. 2019-07-16 00:23:16 +00:00
run_tests run_tests: add a helper for invoking unittests 2019-07-11 04:34:08 +00:00
SUBMITTING_PATCHES.md run_tests: add a helper for invoking unittests 2019-07-11 04:34:08 +00:00
trace.py set default file encoding to utf-8 2019-06-13 14:30:52 +00:00
wrapper.py set default file encoding to utf-8 2019-06-13 14:30:52 +00:00

repo

Repo is a tool built on top of Git. Repo helps manage many Git repositories, does the uploads to revision control systems, and automates parts of the development workflow. Repo is not meant to replace Git, only to make it easier to work with Git. The repo command is an executable Python script that you can put anywhere in your path.