<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tools/git-repo.git/tests/test_subcmds_sync.py, branch v2.43</title>
<subtitle>Mirror of gerrit.googlesource.com/git-repo</subtitle>
<id>https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.43</id>
<link rel='self' href='https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.43'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/'/>
<updated>2024-02-27T17:28:33+00:00</updated>
<entry>
<title>sync: Introduce git checkout levels</title>
<updated>2024-02-27T17:28:33+00:00</updated>
<author>
<name>Josip Sokcevic</name>
<email>sokcevic@google.com</email>
</author>
<published>2024-02-23T00:38:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=5554572f02537b8646139d59ab520e59e1d5f7b3'/>
<id>urn:sha1:5554572f02537b8646139d59ab520e59e1d5f7b3</id>
<content type='text'>
If a repo manifest is updated so that project B is placed within a
project A, and if project A had content in new B's location in the old
checkout, then repo sync could break depending on checkout order, since
B can't be checked out before A.

This change introduces checkout levels which enforces right sequence of
checkouts while still allowing for parallel checkout. In an example
above, A will always be checked out first before B.

BUG=b:325119758
TEST=./run_tests, manual sync on ChromeOS repository

Change-Id: Ib3b5e4d2639ca56620a1e4c6bf76d7b1ab805250
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/410421
Tested-by: Josip Sokcevic &lt;sokcevic@google.com&gt;
Reviewed-by: Greg Edelston &lt;gredelston@google.com&gt;
Commit-Queue: Josip Sokcevic &lt;sokcevic@google.com&gt;
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
</content>
</entry>
<entry>
<title>sync: Fix partial sync false positive</title>
<updated>2023-11-30T22:36:41+00:00</updated>
<author>
<name>Matt Schulte</name>
<email>matsch@google.com</email>
</author>
<published>2023-11-30T19:00:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=0dd0a830b055e177a713bbc81fc7ecdda1605643'/>
<id>urn:sha1:0dd0a830b055e177a713bbc81fc7ecdda1605643</id>
<content type='text'>
In the case of a project being removed from the manifest, and in the
path in which the project used to exist, and symlink is place to another
project repo will start to warn about partial syncs when a partial sync
did not occur.

Repro steps:

1) Create a manifest with two projects. Project a -&gt; a/ and project b -&gt; b/
2) Run `repo sync`
3) Remove project b from the manifest.
4) Use `link` in the manifest to link all of Project a to b/

Bug: 314161804
Change-Id: I4a4ac4f70a7038bc7e0c4e0e51ae9fc942411a34
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/395640
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
Tested-by: Matt Schulte &lt;matsch@google.com&gt;
Commit-Queue: Gavin Mak &lt;gavinmak@google.com&gt;
</content>
</entry>
<entry>
<title>tests: test_subcmds_sync.py: fix for py3.6 &amp; 3.7</title>
<updated>2023-09-13T18:24:04+00:00</updated>
<author>
<name>Daniel Kutik</name>
<email>daniel.kutik@lavawerk.com</email>
</author>
<published>2023-08-15T13:59:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=880c621dc641e3b27233199f6cd3a9438fdf73ab'/>
<id>urn:sha1:880c621dc641e3b27233199f6cd3a9438fdf73ab</id>
<content type='text'>
tests/test_subcmds_sync.py::LocalSyncState::test_prune_removed_projects
was failing in Python 3.6 and 3.7 due to topdir not being set with the
following error message:
    TypeError: expected str, bytes or os.PathLike object, not MagicMock

topdir is accessed from within PruneRemovedProjects().

Test: tox with Python 3.6 to 3.11
Change-Id: I7ba5144df0a0126c01776384e2178136c3510091
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/382816
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Commit-Queue: Daniel Kutik &lt;daniel.kutik@lavawerk.com&gt;
Tested-by: Daniel Kutik &lt;daniel.kutik@lavawerk.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>upload: Suggest full sync if hooks fail with partially synced tree</title>
<updated>2023-08-22T17:18:13+00:00</updated>
<author>
<name>Gavin Mak</name>
<email>gavinmak@google.com</email>
</author>
<published>2023-08-22T01:24:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=16109a66b705211efd25f434201d113628aff04c'/>
<id>urn:sha1:16109a66b705211efd25f434201d113628aff04c</id>
<content type='text'>
Pre-upload hooks may fail because of partial syncs.

Bug: b/271507654
Change-Id: I124cd386c5af2c34e1dcaa3e86916624e235b1e3
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/383474
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Commit-Queue: Gavin Mak &lt;gavinmak@google.com&gt;
Tested-by: Gavin Mak &lt;gavinmak@google.com&gt;
</content>
</entry>
<entry>
<title>sync: Ignore repo project when checking partial syncs</title>
<updated>2023-08-22T17:13:43+00:00</updated>
<author>
<name>Gavin Mak</name>
<email>gavinmak@google.com</email>
</author>
<published>2023-08-22T03:10:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=321b7934b5e8e316b7fa4dc306e055d3d6d351ff'/>
<id>urn:sha1:321b7934b5e8e316b7fa4dc306e055d3d6d351ff</id>
<content type='text'>
The repo project is fetched at most once a day and should be ignored
when checking if the tree is partially synced.

Bug: b/286126621, b/271507654
Change-Id: I684ed1669c3b3b9605162f8cc9d57185bb3dfe8e
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/383494
Commit-Queue: Gavin Mak &lt;gavinmak@google.com&gt;
Tested-by: Gavin Mak &lt;gavinmak@google.com&gt;
Reviewed-by: Josip Sokcevic &lt;sokcevic@google.com&gt;
</content>
</entry>
<entry>
<title>sync: Warn if partial sync state is detected</title>
<updated>2023-08-10T18:13:14+00:00</updated>
<author>
<name>Gavin Mak</name>
<email>gavinmak@google.com</email>
</author>
<published>2023-08-08T04:43:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=f0aeb220def22edfac9838288ad251f86da782c1'/>
<id>urn:sha1:f0aeb220def22edfac9838288ad251f86da782c1</id>
<content type='text'>
Partial syncs are not supported and can lead to strange behavior like
deleting files. Explicitly warn users on partial sync.

Bug: b/286126621, b/271507654
Change-Id: I471f78ac5942eb855bc34c80af47aa561dfa61e8
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/382154
Reviewed-by: Jason Chang &lt;jasonnc@google.com&gt;
Reviewed-by: Aravind Vasudevan &lt;aravindvasudev@google.com&gt;
Tested-by: Gavin Mak &lt;gavinmak@google.com&gt;
Commit-Queue: Gavin Mak &lt;gavinmak@google.com&gt;
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Reviewed-by: Josip Sokcevic &lt;sokcevic@google.com&gt;
</content>
</entry>
<entry>
<title>Refactor errors for sync command</title>
<updated>2023-08-02T18:29:05+00:00</updated>
<author>
<name>Jason Chang</name>
<email>jasonnc@google.com</email>
</author>
<published>2023-07-14T23:45:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=32b59565b7bd41ec1a121869823557f0b2b022d7'/>
<id>urn:sha1:32b59565b7bd41ec1a121869823557f0b2b022d7</id>
<content type='text'>
Per discussion in go/repo-error-update updated aggregated and exit
errors for sync command.

Aggregated errors are errors that result in eventual command failure.
Exit errors are errors that result in immediate command failure.

Also updated main.py to log aggregated and exit errors to git sessions
log

Bug: b/293344017
Change-Id: I77a21f14da32fe2e68c16841feb22de72e86a251
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/379614
Reviewed-by: Aravind Vasudevan &lt;aravindvasudev@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>sync: Track last completed fetch/checkout</title>
<updated>2023-07-28T18:55:04+00:00</updated>
<author>
<name>Gavin Mak</name>
<email>gavinmak@google.com</email>
</author>
<published>2023-07-22T02:56:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=1d2e99d0289a36e8c2a53ff3bf5690f0f780ba63'/>
<id>urn:sha1:1d2e99d0289a36e8c2a53ff3bf5690f0f780ba63</id>
<content type='text'>
Save the latest time any project is fetched and checked out. This will
be used to detect partial checkouts.

Bug: b/286126621
Change-Id: I53b264dc70ba168d506076dbd693ef79a696b61d
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/380514
Commit-Queue: Gavin Mak &lt;gavinmak@google.com&gt;
Reviewed-by: Joanna Wang &lt;jojwang@google.com&gt;
Tested-by: Gavin Mak &lt;gavinmak@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>
</feed>
