<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tools/git-repo.git/command.py, branch v2.38</title>
<subtitle>Mirror of gerrit.googlesource.com/git-repo</subtitle>
<id>https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.38</id>
<link rel='self' href='https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.38'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/'/>
<updated>2023-08-22T18:32:22+00:00</updated>
<entry>
<title>isort: format codebase</title>
<updated>2023-08-22T18:32:22+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2023-08-22T01:20:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=6447733eb28ea188d551ae518a7e51ebf63a4350'/>
<id>urn:sha1:6447733eb28ea188d551ae518a7e51ebf63a4350</id>
<content type='text'>
Change-Id: I6f11d123b68fd077f558d3c21349c55c5f251019
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/383715
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
Commit-Queue: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>gitc: drop support</title>
<updated>2023-08-15T22:14:52+00:00</updated>
<author>
<name>Jason Chang</name>
<email>jasonnc@google.com</email>
</author>
<published>2023-05-26T19:44:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=8914b1f86db3903e507b26979f6f137907ea3398'/>
<id>urn:sha1:8914b1f86db3903e507b26979f6f137907ea3398</id>
<content type='text'>
Bug: b/282775958
Change-Id: Ib6383d6fd82a017d0a6670d6558a905d41be321f
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/375314
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: Jason Chang &lt;jasonnc@google.com&gt;
Commit-Queue: Jason Chang &lt;jasonnc@google.com&gt;
</content>
</entry>
<entry>
<title>Raise repo exit errors in place of sys.exit</title>
<updated>2023-08-07T23:56:07+00:00</updated>
<author>
<name>Jason Chang</name>
<email>jasonnc@google.com</email>
</author>
<published>2023-08-03T21:38:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=f9aacd4087b02948da9a7878da48ea186ab99d5a'/>
<id>urn:sha1:f9aacd4087b02948da9a7878da48ea186ab99d5a</id>
<content type='text'>
Bug: b/293344017
Change-Id: I92d81c78eba8ff31b5252415f4c9a515a6c76411
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/381774
Tested-by: Jason Chang &lt;jasonnc@google.com&gt;
Reviewed-by: Joanna Wang &lt;jojwang@google.com&gt;
Commit-Queue: Jason Chang &lt;jasonnc@google.com&gt;
</content>
</entry>
<entry>
<title>Format codebase with black and check formatting in CQ</title>
<updated>2023-03-22T17:46:28+00:00</updated>
<author>
<name>Gavin Mak</name>
<email>gavinmak@google.com</email>
</author>
<published>2023-03-11T06:46:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=ea2e330e43c182dc16b0111ebc69ee5a71ee4ce1'/>
<id>urn:sha1:ea2e330e43c182dc16b0111ebc69ee5a71ee4ce1</id>
<content type='text'>
Apply rules set by https://gerrit-review.googlesource.com/c/git-repo/+/362954/ across the codebase and fix any lingering errors caught
by flake8. Also check black formatting in run_tests (and CQ).

Bug: b/267675342
Change-Id: I972d77649dac351150dcfeb1cd1ad0ea2efc1956
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/363474
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: Gavin Mak &lt;gavinmak@google.com&gt;
Commit-Queue: Gavin Mak &lt;gavinmak@google.com&gt;
</content>
</entry>
<entry>
<title>Fix flake8 warnings for some files</title>
<updated>2023-01-05T18:43:12+00:00</updated>
<author>
<name>Sergiy Belozorov</name>
<email>sergiyb@chromium.org</email>
</author>
<published>2023-01-05T17:57:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=78e82ec78e9bd4677c2e1f941b046d126f2f0ba7'/>
<id>urn:sha1:78e82ec78e9bd4677c2e1f941b046d126f2f0ba7</id>
<content type='text'>
Change-Id: If67f8660cfb0479f0e710b3566285ef401fcf077
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/355969
Tested-by: Sergiy Belozorov &lt;sergiyb@chromium.org&gt;
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>Only sync superproject if it will be used.</title>
<updated>2022-06-08T16:49:08+00:00</updated>
<author>
<name>LaMont Jones</name>
<email>lamontjones@google.com</email>
</author>
<published>2022-06-01T21:03:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=ff6b1dae1e9f2e7405690c1aeedf7e0c7d768460'/>
<id>urn:sha1:ff6b1dae1e9f2e7405690c1aeedf7e0c7d768460</id>
<content type='text'>
If the user says `--no-use-superproject`, then do not bother syncing the
superproject.

Also add/update docstrings and comments throughout.

Change-Id: I9cdad706130501bab9a22d3099a1dae605e9c194
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/338975
Tested-by: LaMont Jones &lt;lamontjones@google.com&gt;
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>sync: add multi-manifest support</title>
<updated>2022-05-26T00:03:37+00:00</updated>
<author>
<name>LaMont Jones</name>
<email>lamontjones@google.com</email>
</author>
<published>2022-04-11T22:50:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=bdcba7dc36f1c8e6041681eb5b3b5229c93c7c5c'/>
<id>urn:sha1:bdcba7dc36f1c8e6041681eb5b3b5229c93c7c5c</id>
<content type='text'>
With this change, partial syncs (sync with a project list) are again
supported.

If the updated manifest includes new sub manifests, download them
inheriting options from the parent manifestProject.

Change-Id: Id952f85df2e26d34e38b251973be26434443ff56
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/334819
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: LaMont Jones &lt;lamontjones@google.com&gt;
</content>
</entry>
<entry>
<title>Add multi-manifest support with &lt;submanifest&gt; element</title>
<updated>2022-02-17T21:57:55+00:00</updated>
<author>
<name>LaMont Jones</name>
<email>lamontjones@google.com</email>
</author>
<published>2021-11-18T22:40:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=cc879a97c3e2614d19b15b4661c3cab4d33139c9'/>
<id>urn:sha1:cc879a97c3e2614d19b15b4661c3cab4d33139c9</id>
<content type='text'>
To be addressed in another change:
 - a partial `repo sync` (with a list of projects/paths to sync)
   requires `--this-tree-only`.

Change-Id: I6c7400bf001540e9d7694fa70934f8f204cb5f57
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/322657
Tested-by: LaMont Jones &lt;lamontjones@google.com&gt;
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>man: make output system independent</title>
<updated>2021-07-31T11:39:35+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2021-07-26T19:59:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=df8b1cba47fc29d045efceec8cbb43b9182acbbb'/>
<id>urn:sha1:df8b1cba47fc29d045efceec8cbb43b9182acbbb</id>
<content type='text'>
The current help output might change based on the number of CPU cores
available (since it reflects the dynamic --jobs logic).  This is good
for users running repo locally, but not good for shipping static man
pages.  Hook the help output to have it generate the same output all
the time.

Change-Id: I3098ceddc0ad914b0b8e3b25d660b5a264cb41ee
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/312882
Reviewed-by: Roger Shimizu &lt;rosh@debian.org&gt;
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>superproject: Don't exit if superproject tag doesn't exist in manifest.</title>
<updated>2021-06-16T04:48:35+00:00</updated>
<author>
<name>Raman Tenneti</name>
<email>rtenneti@google.com</email>
</author>
<published>2021-06-12T00:29:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=784e16f3aa941ca3564d823cc686017a161621a1'/>
<id>urn:sha1:784e16f3aa941ca3564d823cc686017a161621a1</id>
<content type='text'>
Don't exit if there are missing commit ids in superproject.

This change implements the following suggestion from delphij@:

"we should note the event (so we know that --use-superproject but there
 were some errors, e.g. manifest didn't specify commit id for some
 reason, or if there is no superproject but --use-superproject is
 used), print out a message telling the use that this is not support,
 but continue as if --no-use-superproject was specified?"

Changes:

superproject:
+ Added git_trace2_event_log as an argument to the constructor.
+ Sync method returns SyncResult a NamedTuple of
  ++ success - True if sync of superproject is successful, or False.
  ++ fatal - True if caller should exit, Or False.
+ UpdateProjectsRevisionId returns UpdateProjectsResult a NamedTuple of
   ++ manifest_path - path name of the overriding manifest file instead
      of None
   ++ fatal - True if caller should exit, Or False
+ _GetAllProjectsCommitIds returns CommitIdsResult a NamedTuple of
  ++ commit_ids - a dictionary with the projects/commit ids on success,
     otherwise None
  ++ fatal - True if caller should exit, Or False
+ Added  _SkipUpdatingProjectRevisionId a helper function to see if a
  project's revision id needs to be updated or not. This function is
  used to exclude projects from local manifest file.
+ Added the following error events into git_trace2_event_log
  ++ If superproject is missing in a manifest
  ++ If there are missing commit ids for projects.

command.py:
+ Deleted unused import - platform
+ Added git_trace2_event_log as a member so all subcmds can log error
  events.

main.py:
+ Initialized git_trace2_event_log as a member of command object.

init.py:
+ Deleted unused import - optparse

init.py:
+ Called sys.exit only if Sync returns exit=True

sync.py:
+ Called sys.exit only if Superproject's UpdateProjectsRevisionId returns
  exit=True
+ Reloaded the manifest only if manifest path is returned by
  UpdateProjectsRevisionId. If not, fall back to the old way of doing
  repo sync.

test_git_superproject:
+ Added code to verify error events are being logged.
+ Added a test for no superproject tag
+ Added test for UpdateProjectsRevisionId not updating the revision id
  with the commit ids.

Tested the code with the following commands.

+ Positive test case with aosp-master.
  $ repo_dev init -u persistent-https://android.git.corp.google.com/platform/manifest -b master --use-superproject
  NOTICE: --use-superproject is in beta; report any issues to the address described in `repo version`
  .../android/aosp/.repo/exp-superproject/925043f706ba64db713e9bf3b55987e2-superproject.git: Initial setup for superproject completed.

  Your identity is: Raman Tenneti &lt;rtenneti@google.com&gt;
  If you want to change this, please re-run 'repo init' with --config-name

  repo has been initialized in .../android/aosp

  $ repo_dev sync -j40 --use-superproject
  remote: Total 12 (delta 4), reused 12 (delta 4)
  NOTICE: --use-superproject is in beta; report any issues to the address described in `repo version`
  .../android/aosp/.repo/exp-superproject/925043f706ba64db713e9bf3b55987e2-superproject.git: Initial setup for superproject completed.
  ...
  repo sync has finished successfully.

+ Negative test case without superproject tag.
  $ repo_dev sync -j40 --use-superproject
  NOTICE: --use-superproject is in beta; report any issues to the address described in `repo version`
  repo error: superproject tag is not defined in manifest: .../android/aosp/.repo/manifest.xml
  error: Cannot get project commit ids from manifest
  error: Update of revsionId from superproject has failed. Please resync with --no-use-superproject option
  ...
  Checking out: 100% (1022/1022), done in 3.589s
  repo sync has finished successfully.

+ Test for missing commit_id for a project.
  $ repo_dev sync -j40 --use-superproject
  NOTICE: --use-superproject is in beta; report any issues to the address described in `repo version`
  .../android/aosp/.repo/exp-superproject/925043f706ba64db713e9bf3b55987e2-superproject.git: Initial setup for superproject completed.
  error: please file a bug using go/repo-bug to report missing commit_ids for: ['build/blueprint']
  error: Update of revsionId from superproject has failed. Please resync with --no-use-superproject option
  ...
  Checking out: 100% (1022/1022), done in 3.364s
  repo sync has finished successfully.

$ ./run_tests -v
  ...
  ...== 164 passed in 2.87s ==...

Bug: [google internal] b/189371541
Change-Id: I5ea49f87e8fa41be590fc0c914573e16c8cdfcfa
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/309162
Tested-by: Raman Tenneti &lt;rtenneti@google.com&gt;
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
</feed>
