<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tools/git-repo.git/command.py, branch v2.14.1</title>
<subtitle>Mirror of gerrit.googlesource.com/git-repo</subtitle>
<id>https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.14.1</id>
<link rel='self' href='https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.14.1'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/'/>
<updated>2021-04-15T05:10:16+00:00</updated>
<entry>
<title>command: add a helper for the parallel execution boilerplate</title>
<updated>2021-04-15T05:10:16+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2021-03-01T05:56:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=b5d075d04f1e555f85aad27e74f16073a50b2ae6'/>
<id>urn:sha1:b5d075d04f1e555f85aad27e74f16073a50b2ae6</id>
<content type='text'>
Now that we have a bunch of subcommands doing parallel execution, a
common pattern arises that we can factor out for most of them.  We
leave forall alone as it's a bit too complicated atm to cut over.

Change-Id: I3617a4f7c66142bcd1ab030cb4cca698a65010ac
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/301942
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
Reviewed-by: Chris Mcdonald &lt;cjmcdonald@google.com&gt;
</content>
</entry>
<entry>
<title>command: make --verbose/--quiet available to all subcommands</title>
<updated>2021-04-13T22:25:17+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2021-04-13T18:57:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=9180a07b8fb33d5ba0b82facf987b51ca7b15dc4'/>
<id>urn:sha1:9180a07b8fb33d5ba0b82facf987b51ca7b15dc4</id>
<content type='text'>
Add new CommonOptions entry points to move the existing --jobs to,
and relocate all --verbose/--quiet options to that.  This provides
both a consistent interface for users as well as for code.

Change-Id: Ifaf83b88872421f4749b073c472b4a67ca6c0437
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/303224
Reviewed-by: Raman Tenneti &lt;rtenneti@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>superproject: pass groups to ToXml method.</title>
<updated>2021-03-11T01:24:52+00:00</updated>
<author>
<name>Raman Tenneti</name>
<email>rtenneti@google.com</email>
</author>
<published>2021-03-09T23:19:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=080877e41347b8987977fc8cc3ec90dcd149651a'/>
<id>urn:sha1:080877e41347b8987977fc8cc3ec90dcd149651a</id>
<content type='text'>
Added the following methods to XmlManifest class.
+ GetDefaultGroupsStr() - return 'default,platform-' + platform.system().lower()
+ GetGroupsStr() - Same as gitc_utils.py's _manifest_groups func.

+ Replaced gitc_utils.py's_manifest_groups calls with GetGroupsStr.
+ Used the above methods to get groups in command.py::GetProjects
  and part of init.py.

TODO: clean up these funcs to take structured group data more instead
      of passing strings around everywhere that need parsing.

Tested the code with the following commands.

$ ./run_tests -v

Tested the sync code by using repo_dev alias and pointing to this CL
and verified prebuilts/fullsdk-linux directory has all the folders.

Tested repo init and repo sync with --use-superproject and without
--use-superproject argument.

$ repo_dev init -u sso://android.git.corp.google.com/platform/manifest -b androidx-main  --partial-clone --clone-filter=blob:limit=10M --repo-rev=main --use-superproject

$ repo_dev sync -c -j32

Bug: [google internal] b/181804931
Bug: https://crbug.com/gerrit/13707
Change-Id: Ia98585cbfa3a1449710655af55d56241794242b6
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/299422
Reviewed-by: Jonathan Nieder &lt;jrn@google.com&gt;
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: Raman Tenneti &lt;rtenneti@google.com&gt;
</content>
</entry>
<entry>
<title>status: improve parallel execution stability</title>
<updated>2021-02-22T22:51:34+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2021-02-16T06:45:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=7c871163c8803e812998e5b2296e3bbb30b1367f'/>
<id>urn:sha1:7c871163c8803e812998e5b2296e3bbb30b1367f</id>
<content type='text'>
The status command runs a bunch of jobs in parallel, and each one
is responsible for writing to stdout directly.  When running many
noisy jobs in parallel, output can get intermingled.  Pass down a
StringIO buffer for writing to so we can return the entire output
as a string so the main job can handle displaying it.  This fixes
interleaved output as well as making the output stable: we always
display results in the same project order now.  By switching from
map to imap, this ends up not really adding any overhead.

Bug: https://crbug.com/gerrit/12231
Change-Id: Ic18b07c8074c046ff36e306eb8d392fb34fb6eca
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/297242
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
Reviewed-by: Chris Mcdonald &lt;cjmcdonald@google.com&gt;
</content>
</entry>
<entry>
<title>command: unify --job option &amp; default values</title>
<updated>2021-02-22T22:51:07+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2021-02-16T06:43:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=6a2400a4d097b6e510dc9b8ec06283517b9ca3ad'/>
<id>urn:sha1:6a2400a4d097b6e510dc9b8ec06283517b9ca3ad</id>
<content type='text'>
Extend the Command class to support adding the --jobs option to the
parser if the command declares it supports running in parallel.  Also
pull the default value used for the number of local jobs into the
command module so local commands can share it.

Change-Id: I22b0f8d2cf69875013cec657b8e6c4385549ccac
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/297024
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
Reviewed-by: Chris Mcdonald &lt;cjmcdonald@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>command: add a `repo help` tip to --help output</title>
<updated>2020-02-19T08:23:04+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2020-02-19T06:20:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=72ebf19e52e7c4b270e40ba07fec1048b3612797'/>
<id>urn:sha1:72ebf19e52e7c4b270e40ba07fec1048b3612797</id>
<content type='text'>
For people used to running `repo xxx --help`, they might not realize
that there are detailed man pages behind `repo help xxx`.  Add a note
to all --help commands to improve discoverability.

Change-Id: I84af58aa0514cc7ead185f6c2534a8f88e09a236
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255853
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
Reviewed-by: David Pursehouse &lt;dpursehouse@collab.net&gt;
</content>
</entry>
<entry>
<title>Fix blank line issues reported by flake8</title>
<updated>2020-02-12T06:36:40+00:00</updated>
<author>
<name>David Pursehouse</name>
<email>dpursehouse@collab.net</email>
</author>
<published>2020-02-12T06:20:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=819827a42ddb364f98c3a1a7eae2536dc54bc4cc'/>
<id>urn:sha1:819827a42ddb364f98c3a1a7eae2536dc54bc4cc</id>
<content type='text'>
- E301 expected 1 blank line
- E302 expected 2 blank lines
- E303 too many blank lines
- E305 expected 2 blank lines after class or function definition
- E306 expected 1 blank line before a nested definition

Fixed automatically with autopep8:

  git ls-files | grep py$ | xargs autopep8 --in-place \
    --select E301,E302,E303,E305,E306

Manually fix issues in project.py caused by misuse of block comments.

Change-Id: Iee840fcaff48aae504ddac9c3e76d2acd484f6a9
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254599
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: David Pursehouse &lt;dpursehouse@collab.net&gt;
</content>
</entry>
<entry>
<title>command: Add parentheses on wrapped condition</title>
<updated>2020-02-12T06:32:47+00:00</updated>
<author>
<name>David Pursehouse</name>
<email>dpursehouse@collab.net</email>
</author>
<published>2020-02-12T05:55:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=5a2517f4115916bee9e55d99dab93a8b6ca4e185'/>
<id>urn:sha1:5a2517f4115916bee9e55d99dab93a8b6ca4e185</id>
<content type='text'>
Surround the condition with parentheses rather than using
backslashes. This prevents confusion about indentation when
running flake8/autoflake8.

Change-Id: I01775b96f817ee616f545b55369a4864fa1d6712
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254603
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: David Pursehouse &lt;dpursehouse@collab.net&gt;
</content>
</entry>
<entry>
<title>command: filter projects by active manifest groups</title>
<updated>2019-10-08T20:15:08+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2019-10-04T18:21:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=e778e57f11f208bd70c51d9cc57090a5cf9e41fa'/>
<id>urn:sha1:e778e57f11f208bd70c51d9cc57090a5cf9e41fa</id>
<content type='text'>
`repo forall &lt;proj&gt;` will look up all &lt;proj&gt; in the manifest for all
manifest groups regardless of which are active.  If &lt;proj&gt; is checked
out to different locations depending on the group, this ultimately
fails as we're unable to locate all of them.

Simple fix is to only include projects that match the manifest groups
that we already passed down &amp; initialized to the active set, and that
we already use when getting the default project list.

Bug: https://crbug.com/gerrit/11677
Bug: https://crbug.com/1011226
Change-Id: I975f10f9a9e5a1cad7d87344123f8003732dab27
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/239652
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
Reviewed-by: Raul Rangel &lt;rrangel@chromium.org&gt;
Reviewed-by: David Pursehouse &lt;dpursehouse@collab.net&gt;
</content>
</entry>
</feed>
