<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tools/git-repo.git/git_command.py, branch v2.40</title>
<subtitle>Mirror of gerrit.googlesource.com/git-repo</subtitle>
<id>https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.40</id>
<link rel='self' href='https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.40'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/'/>
<updated>2023-10-31T16:03:54+00:00</updated>
<entry>
<title>cleanup: Update codebase to expect Python 3.6</title>
<updated>2023-10-31T16:03:54+00:00</updated>
<author>
<name>Jason R. Coombs</name>
<email>jaraco@google.com</email>
</author>
<published>2023-09-29T15:04:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=b32ccbb66bb16965ecb8b4e266c4e45186636c1b'/>
<id>urn:sha1:b32ccbb66bb16965ecb8b4e266c4e45186636c1b</id>
<content type='text'>
- Bump minimum version to Python 3.6.
- Use f-strings in a lot of places.

Change-Id: I2aa70197230fcec2eff8e7c8eb754f20c08075bb
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/389034
Tested-by: Jason R. Coombs &lt;jaraco@google.com&gt;
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Commit-Queue: Jason R. Coombs &lt;jaraco@google.com&gt;
</content>
</entry>
<entry>
<title>delete Python 2 (object) compat</title>
<updated>2023-10-20T04:51:01+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2023-10-19T09:13:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=d4aee6570b64c5b6de584b0a5ce76e6a139faf38'/>
<id>urn:sha1:d4aee6570b64c5b6de584b0a5ce76e6a139faf38</id>
<content type='text'>
Bug: 302871152
Change-Id: I39636d73a6e1d69efa8ade74f75c5381651e6dc8
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/390054
Commit-Queue: Mike Frysinger &lt;vapier@google.com&gt;
Reviewed-by: Aravind Vasudevan &lt;aravindvasudev@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>git_command: read1 needs a size in py3.6</title>
<updated>2023-10-09T17:04:38+00:00</updated>
<author>
<name>Daniel Kutik</name>
<email>daniel.kutik@lavawerk.com</email>
</author>
<published>2023-10-09T11:21:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=6a7f73bb9a55ab4463238af4c5096e6bf3789934'/>
<id>urn:sha1:6a7f73bb9a55ab4463238af4c5096e6bf3789934</id>
<content type='text'>
Not setting size causes "TypeError: read1() takes exactly one argument
(0 given)" in Python 3.6.
In Python 3.7 onwards size defaults to -1, which means an arbitrary
number of bytes will be returned.

Compare https://docs.python.org/3.6/library/io.html#io.BufferedReader.read1
and https://docs.python.org/3.7/library/io.html#io.BufferedIOBase.read1
for more details.

Change-Id: Ia4aaf8140ead9493ec650fac167c641569e6a9d8
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/388718
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: Daniel Kutik &lt;daniel.kutik@lavawerk.com&gt;
Commit-Queue: Daniel Kutik &lt;daniel.kutik@lavawerk.com&gt;
</content>
</entry>
<entry>
<title>git_command: lru_cache needs maxsize for py36 &amp; 37</title>
<updated>2023-10-09T14:08:29+00:00</updated>
<author>
<name>Daniel Kutik</name>
<email>daniel.kutik@lavawerk.com</email>
</author>
<published>2023-10-09T11:09:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=23d063bdcd1bdcaa70ac8565615764dd4313adf9'/>
<id>urn:sha1:23d063bdcd1bdcaa70ac8565615764dd4313adf9</id>
<content type='text'>
Python 3.6 and 3.7 do not have a default value for lru_cache maxsize.
Not setting it would cause:
  TypeError: Expected maxsize to be an integer or None

Change-Id: I32d4fb6a0040a0c24da0b2f29f22f85a36c96531
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/388737
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: Daniel Kutik &lt;daniel.kutik@lavawerk.com&gt;
Commit-Queue: Daniel Kutik &lt;daniel.kutik@lavawerk.com&gt;
</content>
</entry>
<entry>
<title>git_command: Augment underlying git errors with suggestions</title>
<updated>2023-10-06T18:21:45+00:00</updated>
<author>
<name>Aravind Vasudevan</name>
<email>aravindvasudev@google.com</email>
</author>
<published>2023-10-06T00:40:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=2844a5f3cc81ffe2b749e574bdeb61809deab5b9'/>
<id>urn:sha1:2844a5f3cc81ffe2b749e574bdeb61809deab5b9</id>
<content type='text'>
This change appends suggestions to the underlying git error to make the
error slightly more actionable.

DD: go/improve-repo-error-reporting &amp; go/tee-repo-stderr

Bug: b/292704435
Change-Id: I2bf8bea5fca42c6a9acd2fadc70f58f22456e027
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/387774
Commit-Queue: Aravind Vasudevan &lt;aravindvasudev@google.com&gt;
Reviewed-by: Jason Chang &lt;jasonnc@google.com&gt;
Tested-by: Aravind Vasudevan &lt;aravindvasudev@google.com&gt;
Reviewed-by: Aravind Vasudevan &lt;aravindvasudev@google.com&gt;
</content>
</entry>
<entry>
<title>Track expected git errors in logs</title>
<updated>2023-09-27T19:05:16+00:00</updated>
<author>
<name>Jason Chang</name>
<email>jasonnc@google.com</email>
</author>
<published>2023-09-27T18:34:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=87058c6ca5ec2c66d0850f1015de01ec6c0dd758'/>
<id>urn:sha1:87058c6ca5ec2c66d0850f1015de01ec6c0dd758</id>
<content type='text'>
Sometimes it is expected that a GitCommand executed in repo fails. In
such cases indicate in trace logs that the error was expected.

Bug: b/293344017
Change-Id: If137fae9ef9769258246f5b4494e070345db4a71
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/387714
Commit-Queue: Jason Chang &lt;jasonnc@google.com&gt;
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
Tested-by: Jason Chang &lt;jasonnc@google.com&gt;
</content>
</entry>
<entry>
<title>Log ErrorEvent for failing GitCommands</title>
<updated>2023-09-06T18:22:33+00:00</updated>
<author>
<name>Jason Chang</name>
<email>jasonnc@google.com</email>
</author>
<published>2023-09-01T23:07:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=f19b310f15e03e92075e7409c9d7f0956acc007d'/>
<id>urn:sha1:f19b310f15e03e92075e7409c9d7f0956acc007d</id>
<content type='text'>
Change-Id: I270af7401cff310349e736bef87e9b381cc4d016
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/385054
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
Commit-Queue: Jason Chang &lt;jasonnc@google.com&gt;
Tested-by: Jason Chang &lt;jasonnc@google.com&gt;
</content>
</entry>
<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>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>Update errors to extend BaseRepoError</title>
<updated>2023-07-31T21:31:36+00:00</updated>
<author>
<name>Jason Chang</name>
<email>jasonnc@google.com</email>
</author>
<published>2023-07-26T20:23:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=a6413f5d88f12466b3daa833668d0f59fc65ece4'/>
<id>urn:sha1:a6413f5d88f12466b3daa833668d0f59fc65ece4</id>
<content type='text'>
In order to better analyze and track repo errors, repo command failures
need to be tied to specific errors in repo source code.

Additionally a new GitCommandError was added to differentiate between
general git related errors to failed git commands. Git commands that opt
into verification will raise a GitCommandError if the command failed.

The first step in this process is a general error refactoring

Bug: b/293344017
Change-Id: I46944b1825ce892757c8dd3f7e2fab7e460760c0
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/380994
Commit-Queue: Jason Chang &lt;jasonnc@google.com&gt;
Reviewed-by: Aravind Vasudevan &lt;aravindvasudev@google.com&gt;
Tested-by: Jason Chang &lt;jasonnc@google.com&gt;
Reviewed-by: Joanna Wang &lt;jojwang@google.com&gt;
</content>
</entry>
</feed>
