<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tools/git-repo.git/tests, branch v2.12</title>
<subtitle>Mirror of gerrit.googlesource.com/git-repo</subtitle>
<id>https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.12</id>
<link rel='self' href='https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.12'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/'/>
<updated>2021-01-21T19:41:52+00:00</updated>
<entry>
<title>sync: Added --use-superproject option and support for superproject.</title>
<updated>2021-01-21T19:41:52+00:00</updated>
<author>
<name>Raman Tenneti</name>
<email>rtenneti@google.com</email>
</author>
<published>2021-01-15T03:17:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=6a872c9daeec58dda61786e6f65591330709f6ad'/>
<id>urn:sha1:6a872c9daeec58dda61786e6f65591330709f6ad</id>
<content type='text'>
Added "--use-superporject" option to sync.py to fetch project SHAs from
superproject. If there are any missing projects in superprojects, it
prints the missing entries and exits. If there are no missing entries,
it will use SHAs from superproject to fetch the projects from git.

Tested the code with the following commands.

$ ./run_tests tests/test_manifest_xml.py
$ ./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 adding &lt;superporject&gt; tag to default.xml. With
local modification to the code to print the status,

.../WORKING_DIRECTORY$ repo sync --use-superproject
repo: executing 'git clone' url: sso://android/platform/superproject
repo: executing 'git ls-tree'
Success: []

Bug: https://crbug.com/gerrit/13709
Tested-by: Raman Tenneti &lt;rtenneti@google.com&gt;
Change-Id: Id18665992428dd684c04b0e0b3a52f46316873a0
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/293822
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>Update "evt" field to be logged as a string type.</title>
<updated>2021-01-19T20:35:56+00:00</updated>
<author>
<name>Ian Kasprzak</name>
<email>iankaz@google.com</email>
</author>
<published>2021-01-19T17:04:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=febe73ff16584578e3818bc35b5a3350ab672f77'/>
<id>urn:sha1:febe73ff16584578e3818bc35b5a3350ab672f77</id>
<content type='text'>
Testing:
- Unit tests
- Verified git trace log has "evt": "2" (vs "evt": 2 previously)

Bug: https://crbug.com/gerrit/13966
Change-Id: I2e0c98dda0cccdd5cb6328105c11b93cd42676eb
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/294123
Reviewed-by: Jonathan Nieder &lt;jrn@google.com&gt;
Tested-by: Ian Kasprzak &lt;iankaz@google.com&gt;
</content>
</entry>
<entry>
<title>launcher: add a requirements framework to declare version dependencies</title>
<updated>2021-01-19T16:48:21+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2021-01-08T03:14:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=e5670c881225ed025c77e0362a7c7edcc912ef9f'/>
<id>urn:sha1:e5670c881225ed025c77e0362a7c7edcc912ef9f</id>
<content type='text'>
Currently we don't have a way for the checked out repo version to
declare the version of tools it needs before we start running it.
For somethings, like git, it's not a big deal as it can handle all
the asserts itself.  But for things like Python, it's impossible
to reliably check before executing.

We're in this state now:
- we've been allowing Python 3.4, so the launcher accepts it
- the repo codebase starts using Python 3.6 features
- launcher tries to import us but hits syntax errors
- user is left confused and assuming new repo is broken because
  they're seeing syntax errors

This scenario is playing out with old launchers that still accept
Python 2, and will continue to play out as time goes on and we want
to require newer versions of Python 3.

Lets create a JSON file to declare all these system requirements.
That file format is extremely stable, so loading &amp; parsing from
even ancient versions of Python shouldn't be a problem.  Then the
launcher can read these settings and check the system state before
attempting to execute any code.  If the tools are too old, it can
clearly diagnose &amp; display information to the user as to the real
problem (and not emit tracebacks or syntax errors).

We have a couple of different tool version checks already (git,
python, ssh) and can harmonize them in a single place.

This also allows us to assert a reverse dependency if the need
ever comes up: force the user to upgrade their `repo` launcher
before we'll let them run us.  Even though the launcher warns
whenever a newer release is available, some users seem to ignore
that, or they don't use repo that often (on the scale of years),
and their upgrade jump is so dramatic that they fall back into
the syntax error pit.

Hopefully by the end of the year we can assume enough people
have upgraded their launcher such that we can delete all of the
duplicate version checks in the codebase.  But until then, we'll
keep them to maintain coverage.

Change-Id: I5c12bbffdfd0a8ce978f39aa7f4674026fe9f4f8
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/293003
Reviewed-by: Michael Mortensen &lt;mmortensen@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>manifest_xml: - Added doc and testing of unknown tags/elements.</title>
<updated>2021-01-12T21:49:13+00:00</updated>
<author>
<name>Raman Tenneti</name>
<email>rtenneti@google.com</email>
</author>
<published>2021-01-11T20:18:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=48b2d10d8f7565173ca53bed0d0be15323512de4'/>
<id>urn:sha1:48b2d10d8f7565173ca53bed0d0be15323512de4</id>
<content type='text'>
Added this test to verify that older versions of repo can handle
"&lt;superproject" element. Tested by adding "&lt;iankaz" unknown element.

Tested the code with the following commands.

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

Bug: https://crbug.com/gerrit/13709
Tested-by: Raman Tenneti &lt;rtenneti@google.com&gt;
Change-Id: I858d56f38cefcfcd14474efdd631a5a940c3ce47
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/293482
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>manifest_xml: initial support for &lt;superproject&gt;</title>
<updated>2021-01-08T19:49:52+00:00</updated>
<author>
<name>Raman Tenneti</name>
<email>rtenneti@google.com</email>
</author>
<published>2021-01-08T00:50:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=1bb4fb222d831ed384d6fdef7402d36c19e91b2e'/>
<id>urn:sha1:1bb4fb222d831ed384d6fdef7402d36c19e91b2e</id>
<content type='text'>
At most one superproject may be specified. It will be used
to specify the URL of superproject.

It would have 3 attributes: remote, name, and default.
Only "name" is required while the others have reasonable defaults.

&lt;remote name="superproject-url" review="&lt;url&gt;" /&gt;
&lt;superproject remote="superproject-url" name="platform/superproject"/&gt;

TODO: This CL only implements the parsing logic and further work
will be in followup CLs.

Tested the code with the following commands.

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

Bug: https://crbug.com/gerrit/13709
Tested-by: Raman Tenneti &lt;rtenneti@google.com&gt;
Change-Id: I5b4bba02c8b59601c754cf6b5e4d07a1e16ce167
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/292982
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>Fix bug in git trace2 event Write() function when no config present.</title>
<updated>2021-01-07T14:31:51+00:00</updated>
<author>
<name>Ian Kasprzak</name>
<email>iankaz@google.com</email>
</author>
<published>2021-01-07T00:26:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=343d585ff99c5748d33823e92507fa06a037c608'/>
<id>urn:sha1:343d585ff99c5748d33823e92507fa06a037c608</id>
<content type='text'>
See https://bugs.chromium.org/p/gerrit/issues/detail?id=13706#c9

Added additional unit tests for Write() for additional test coverage.

Testing:
- Unit tests
- Verified repo works with:
  - Valid trace2.eventtarget
  - Invalid trace2.eventtarget

Bug: https://crbug.com/gerrit/13706
Tested-by: Ian Kasprzak &lt;iankaz@google.com&gt;
Change-Id: I6b027cb2399bd03e453a132ad82e022a1f48476e
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/292762
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>drop pyversion &amp; is_python3 checking</title>
<updated>2021-01-06T18:53:58+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2019-06-13T06:24:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=acf63b28928b33d1335dfed1af7e2d8fc6bb5fc4'/>
<id>urn:sha1:acf63b28928b33d1335dfed1af7e2d8fc6bb5fc4</id>
<content type='text'>
We're committed to Python 3 at this point, so purge all the
is_python3 related dynamic checks.

Bug: https://crbug.com/gerrit/10418
Change-Id: I4c8b405d6de359b8b83223c9f4b9c8ffa18ea1a2
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/292383
Reviewed-by: Chris Mcdonald &lt;cjmcdonald@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>strip python2-only coding:utf-8 &amp; print_function settings</title>
<updated>2021-01-06T18:53:05+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2021-01-01T13:42:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=784ccfc040dc8efa1a64d3c7d4070b66beb15d08'/>
<id>urn:sha1:784ccfc040dc8efa1a64d3c7d4070b66beb15d08</id>
<content type='text'>
We're committed to Python 3 at this point, so clean up boilerplate.

Bug: https://crbug.com/gerrit/10418
Change-Id: Ib1719ba2eb65c53b94881a1a1bf203ddfcaaafed
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/292382
Reviewed-by: Chris Mcdonald &lt;cjmcdonald@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>launcher: add test for version requirements</title>
<updated>2021-01-06T17:56:51+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2021-01-05T04:29:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=1379a9b1851e203611c490218fe62ef808a7d0ae'/>
<id>urn:sha1:1379a9b1851e203611c490218fe62ef808a7d0ae</id>
<content type='text'>
Make sure the modules stay in sync in case one is updated but we
forgot to update the other.

Bug: https://crbug.com/gerrit/13795
Change-Id: I6de9533d45c083e5f7ad792ee6d541e23647de3f
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/292444
Reviewed-by: Michael Mortensen &lt;mmortensen@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>Enable git trace2 event format logging.</title>
<updated>2021-01-06T17:49:41+00:00</updated>
<author>
<name>Ian Kasprzak</name>
<email>iankaz@google.com</email>
</author>
<published>2020-12-23T18:08:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=30bc354e25cb5ccfbbb276a93ec54195e6b966a4'/>
<id>urn:sha1:30bc354e25cb5ccfbbb276a93ec54195e6b966a4</id>
<content type='text'>
Ways to enable logging:
1) Set git's trace2.eventtarget config variable to desired logging path
2) Specify path via --git_trace2_event_log option

A unique logfile name is generated per repo execution (based on the repo session-id).

Testing:
1) Verified git config 'trace2.eventtarget' and flag enable logging.
2) Verified version/start/end events are expected format:
  https://git-scm.com/docs/api-trace2#_event_format
3) Unit tests

Bug: https://crbug.com/gerrit/13706
Change-Id: I335eba68124055321c4149979bec36ac16ef81eb
Tested-by: Ian Kasprzak &lt;iankaz@google.com&gt;
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/292262
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Reviewed-by: Jonathan Nieder &lt;jrn@google.com&gt;
</content>
</entry>
</feed>
