Go to file
Raman Tenneti 1fd7bc2438 sync: superproject performance changes.
After updating all project’s revsionIds with the SHAs from superproject,
write the updated manifest into superproject_override.xml file. Reload
that file for future Reloads. This file is created in exp-superproject
directory.

Moved most of the code that is superproject specific into
git_superproject.py and wrote test code.

If git pull fails, did a git clone of the superproject.

We saw performance gains for consecutive repo sync's. The time to sync
went down from around 120 secs to 40 secs when repo sync is executed
consecutively.

Tested the code with the following commands.

$ ./run_tests -v tests/test_git_superproject.py
$ ./run_tests -v

Tested the sync code by copying all the repo changes into my Android
AOSP checkout and doing a repo sync --use-superproject twice.

First run
$ time repo sync --use-superproject
...
real	21m3.745s
user	97m59.380s
sys	19m11.286s

After two consecutive sync runs
$ time repo sync -c -j8 --use-superproject
real	0m39.626s
user	0m29.937s
sys	0m38.155s

Bug: https://crbug.com/gerrit/13709
Bug: https://crbug.com/gerrit/13707
Tested-by: Raman Tenneti <rtenneti@google.com>

Change-Id: Id79a0d7c4d20babd65e9bd485196c6f8fbe9de5e
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/296082
Reviewed-by: Ian Kasprzak <iankaz@google.com>
Tested-by: Raman Tenneti <rtenneti@google.com>
2021-02-07 22:25:38 +00:00
.github/workflows switch to "main" branch for development 2020-11-16 05:07:33 +00:00
docs manifest_xml: - Added doc and testing of unknown tags/elements. 2021-01-12 21:49:13 +00:00
hooks Revert "commit-msg: Insert Change-Id at start of trailers" 2020-04-15 07:17:16 +00:00
release release-process: document schedule (including freezes) publicly 2020-07-23 08:07:38 +00:00
subcmds sync: superproject performance changes. 2021-02-07 22:25:38 +00:00
tests sync: superproject performance changes. 2021-02-07 22:25:38 +00:00
.flake8 flake8: Suppress "E731 do not assign a lambda expression, use a def" 2020-02-15 03:41:17 +00:00
.gitattributes Adds additional crlf clobber avoidance. 2016-06-22 08:36:45 +00:00
.gitignore Add parallelism to 'branches' command 2020-12-14 23:35:12 +00:00
.mailmap Update .mailmap 2020-02-13 04:49:55 +00: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 strip python2-only coding:utf-8 & print_function settings 2021-01-06 18:53:05 +00:00
command.py strip python2-only coding:utf-8 & print_function settings 2021-01-06 18:53:05 +00:00
editor.py strip python2-only coding:utf-8 & print_function settings 2021-01-06 18:53:05 +00:00
error.py sync: Added --use-superproject option and support for superproject. 2021-01-21 19:41:52 +00:00
event_log.py strip python2-only coding:utf-8 & print_function settings 2021-01-06 18:53:05 +00:00
git_command.py git_command.py: Handle unicode decode error 2021-01-28 17:38:24 +00:00
git_config.py drop pyversion & is_python3 checking 2021-01-06 18:53:58 +00:00
git_refs.py strip python2-only coding:utf-8 & print_function settings 2021-01-06 18:53:05 +00:00
git_ssh add license header to a few more files 2019-06-13 13:23:19 -04:00
git_superproject.py sync: superproject performance changes. 2021-02-07 22:25:38 +00:00
git_trace2_event_log.py Update "evt" field to be logged as a string type. 2021-01-19 20:35:56 +00:00
gitc_utils.py strip python2-only coding:utf-8 & print_function settings 2021-01-06 18:53:05 +00:00
hooks.py drop pyversion & is_python3 checking 2021-01-06 18:53:58 +00:00
LICENSE setup.py: add basic packaging files 2019-12-02 04:23:31 +00:00
main.py drop pyversion & is_python3 checking 2021-01-06 18:53:58 +00:00
manifest_xml.py manifest: set revisionId as revision attribute it it is not being set in ToXml. 2021-02-07 17:13:35 +00:00
MANIFEST.in setup.py: add basic packaging files 2019-12-02 04:23:31 +00:00
pager.py strip python2-only coding:utf-8 & print_function settings 2021-01-06 18:53:05 +00:00
platform_utils_win32.py drop pyversion & is_python3 checking 2021-01-06 18:53:58 +00:00
platform_utils.py drop pyversion & is_python3 checking 2021-01-06 18:53:58 +00:00
progress.py strip python2-only coding:utf-8 & print_function settings 2021-01-06 18:53:05 +00:00
project.py Update _CheckForImmutableRevision to use git rev-list 2021-02-05 22:00:31 +00:00
README.md README: use new bug template 2020-02-26 23:20:43 +00:00
repo launcher: bump version for new release 2021-01-21 16:17:19 +00:00
repo_trace.py strip python2-only coding:utf-8 & print_function settings 2021-01-06 18:53:05 +00:00
requirements.json launcher: add a requirements framework to declare version dependencies 2021-01-19 16:48:21 +00:00
run_tests strip python2-only coding:utf-8 & print_function settings 2021-01-06 18:53:05 +00:00
setup.py strip python2-only coding:utf-8 & print_function settings 2021-01-06 18:53:05 +00:00
SUBMITTING_PATCHES.md switch to "main" branch for development 2020-11-16 05:07:33 +00:00
tox.ini stop testing Python 2.7 2020-09-06 17:53:47 +00:00
wrapper.py strip python2-only coding:utf-8 & print_function settings 2021-01-06 18:53:05 +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.

Contact

Please use the repo-discuss mailing list or issue tracker for questions.

You can file a new bug report under the "repo" component.

Please do not e-mail individual developers for support. They do not have the bandwidth for it, and often times questions have already been asked on repo-discuss or bugs posted to the issue tracker. So please search those sites first.

Install

Many distros include repo, so you might be able to install from there.

# Debian/Ubuntu.
$ sudo apt-get install repo

# Gentoo.
$ sudo emerge dev-vcs/repo

You can install it manually as well as it's a single script.

$ mkdir -p ~/.bin
$ PATH="${HOME}/.bin:${PATH}"
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/.bin/repo
$ chmod a+rx ~/.bin/repo