<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tools/git-repo.git/tests/test_subcmds_sync.py, branch v2.63</title>
<subtitle>Mirror of gerrit.googlesource.com/git-repo</subtitle>
<id>https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.63</id>
<link rel='self' href='https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.63'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/'/>
<updated>2026-04-20T22:34:07+00:00</updated>
<entry>
<title>sync: Refactor to use _RunOneGC and fix config leakage</title>
<updated>2026-04-20T22:34:07+00:00</updated>
<author>
<name>Gavin Mak</name>
<email>gavinmak@google.com</email>
</author>
<published>2026-04-20T17:57:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=baa281d99e59dbf1447524e6fd95b384cadbc06e'/>
<id>urn:sha1:baa281d99e59dbf1447524e6fd95b384cadbc06e</id>
<content type='text'>
Extract _RunOneGC to handle GC on a single project. This refactoring
makes it easier to invoke GC from parallel worker tasks.

Also, avoid modifying the passed-in config dictionary in _RunOneGC by
creating a local copy, preventing unintended side effects on other
commands sharing the same config.

Bug: 498290329
Change-Id: I7b77ed6629b14b5ee3322870b9c6c8ce2bfd6ea2
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/574923
Reviewed-by: Becky Siegel &lt;beckysiegel@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>sync: Switch to using self._bloated_projects</title>
<updated>2026-04-20T21:07:14+00:00</updated>
<author>
<name>Gavin Mak</name>
<email>gavinmak@google.com</email>
</author>
<published>2026-04-20T17:56:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=7e9079b7cf79988dd978d04bfb79250564829cc3'/>
<id>urn:sha1:7e9079b7cf79988dd978d04bfb79250564829cc3</id>
<content type='text'>
Store bloated projects in self._bloated_projects and print warnings at
the end of execution. This sets up for moving the check to workers.

Bug: 498290329
Change-Id: I993f1fd741db2994d480994861588eb18f6c5503
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/574922
Reviewed-by: Becky Siegel &lt;beckysiegel@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>tests: Add tests for _CheckForBloatedProjects and _GCProjects</title>
<updated>2026-04-20T20:31:41+00:00</updated>
<author>
<name>Gavin Mak</name>
<email>gavinmak@google.com</email>
</author>
<published>2026-04-20T20:11:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=61bd6b3ccb26bc695ea85ae3004c50e7434e20cf'/>
<id>urn:sha1:61bd6b3ccb26bc695ea85ae3004c50e7434e20cf</id>
<content type='text'>
Change-Id: I6790a13929b8fc06a3197ca405dedf08d39d54c9
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/574926
Tested-by: Gavin Mak &lt;gavinmak@google.com&gt;
Reviewed-by: Becky Siegel &lt;beckysiegel@google.com&gt;
Commit-Queue: Gavin Mak &lt;gavinmak@google.com&gt;
</content>
</entry>
<entry>
<title>manifest: Introduce `sync-j-max` attribute to cap sync jobs</title>
<updated>2026-02-06T21:32:28+00:00</updated>
<author>
<name>Gavin Mak</name>
<email>gavinmak@google.com</email>
</author>
<published>2026-02-03T20:59:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=a214fd31bd477dda2708ab9f3bc675081ceff696'/>
<id>urn:sha1:a214fd31bd477dda2708ab9f3bc675081ceff696</id>
<content type='text'>
Add a way for manifest owners to limit how many sync jobs run in
parallel.

Bug: 481100878
Change-Id: Ia6cbe02cbc83c9e414b53b8d14fe5e7e1b802505
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/548963
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>sync: fix saving of fetch times and local state</title>
<updated>2025-10-20T18:28:21+00:00</updated>
<author>
<name>Gavin Mak</name>
<email>gavinmak@google.com</email>
</author>
<published>2025-10-20T18:13:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=1afe96a7e997ce7748f066b206a85ac648f7a87c'/>
<id>urn:sha1:1afe96a7e997ce7748f066b206a85ac648f7a87c</id>
<content type='text'>
Interleaved sync didn't save _fetch_times and _local_sync_state to disk.
Phased sync saved them, but incorrectly applied moving average smoothing
repeatedly when fetching submodules, and discarded historical data
during partial syncs.

Move .Save() calls to the end of main sync loops to ensure they run
once. Update _FetchTimes.Save() to merge new data with existing history,
preventing data loss.

Change-Id: I174f98a62ac86859f1eeea1daba65eb35c227852
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/519821
Commit-Queue: Gavin Mak &lt;gavinmak@google.com&gt;
Reviewed-by: Scott Lee &lt;ddoman@google.com&gt;
Tested-by: Gavin Mak &lt;gavinmak@google.com&gt;
</content>
</entry>
<entry>
<title>sync: Fix missing error details in interleaved summary</title>
<updated>2025-08-14T16:54:15+00:00</updated>
<author>
<name>Gavin Mak</name>
<email>gavinmak@google.com</email>
</author>
<published>2025-08-14T06:42:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=d534a5537fd317cd769fed54eceb8248777db701'/>
<id>urn:sha1:d534a5537fd317cd769fed54eceb8248777db701</id>
<content type='text'>
When checkout errors occurred in interleaved sync, they were wrapped in
a SyncError with no message, causing blank lines in the final summary.
Refactor _SyncResult to hold a list of exceptions, ensuring the original
error messages are propagated correctly.

Bug: 438178765
Change-Id: Ic25e515068959829cb6290cfd9e4c2d3963bbbea
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/498342
Reviewed-by: Scott Lee &lt;ddoman@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>sync: Record and propagate errors from deferred actions</title>
<updated>2025-08-14T06:17:56+00:00</updated>
<author>
<name>Gavin Mak</name>
<email>gavinmak@google.com</email>
</author>
<published>2025-08-14T05:48:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=a64149a7a77814132629bbb4c07d922c2222df25'/>
<id>urn:sha1:a64149a7a77814132629bbb4c07d922c2222df25</id>
<content type='text'>
Failures in deferred sync actions were not recorded because `_Later.Run`
discarded the `GitError` exception. Record the specific error using
`syncbuf.fail()` and propagate it for proper error aggregation and
reporting.

Bug: 438178765
Change-Id: Iad59e389f9677bd6b8d873ee1ea2aa6ce44c86fa
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/498141
Tested-by: Gavin Mak &lt;gavinmak@google.com&gt;
Reviewed-by: Scott Lee &lt;ddoman@google.com&gt;
</content>
</entry>
<entry>
<title>sync: Don't checkout if no worktree</title>
<updated>2025-07-23T22:57:49+00:00</updated>
<author>
<name>Gavin Mak</name>
<email>gavinmak@google.com</email>
</author>
<published>2025-07-23T22:23:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=720bd1e96b4e9c36d035987578fc01a9939d753f'/>
<id>urn:sha1:720bd1e96b4e9c36d035987578fc01a9939d753f</id>
<content type='text'>
Interleaved sync should not try checkout out a project if it's a mirror.

Change-Id: I2549faab197a3202d79a10e44b449b68d53e3fe7
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/492942
Commit-Queue: Gavin Mak &lt;gavinmak@google.com&gt;
Reviewed-by: Scott Lee &lt;ddoman@google.com&gt;
Tested-by: Gavin Mak &lt;gavinmak@google.com&gt;
</content>
</entry>
<entry>
<title>sync: Share self-update logic between sync modes</title>
<updated>2025-06-23T16:12:41+00:00</updated>
<author>
<name>Gavin Mak</name>
<email>gavinmak@google.com</email>
</author>
<published>2025-06-23T16:04:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=f7a3f99dc9e92556f3a0c588633b651439b5f7db'/>
<id>urn:sha1:f7a3f99dc9e92556f3a0c588633b651439b5f7db</id>
<content type='text'>
The logic for checking for repo self-updates lives in _FetchMain, which
is part of the "phased" sync path.

Extract this logic into a new _UpdateRepoProject helper method. Call
this common helper from _ExecuteHelper before either sync mode begins,
so the repo self-update check is always performed.

Bug: 421935613
Change-Id: I9a804f43fbf6239c4146be446040be531f12fc8a
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/484041
Reviewed-by: Scott Lee &lt;ddoman@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: Implement --interleaved sync worker</title>
<updated>2025-06-18T17:26:27+00:00</updated>
<author>
<name>Gavin Mak</name>
<email>gavinmak@google.com</email>
</author>
<published>2025-06-14T00:53:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=7b6ffed4ae3102b7c90592eeff8e28855cc25c11'/>
<id>urn:sha1:7b6ffed4ae3102b7c90592eeff8e28855cc25c11</id>
<content type='text'>
For each assigned project, the worker sequentially calls
Sync_NetworkHalf and Sync_LocalHalf, respecting --local-only and
--network-only flags. To prevent scrambled progress bars, all stderr
output from the checkout phase is captured (shown with --verbose).
Result objects now carry status and timing information from the worker
for state updates.

Bug: 421935613
Change-Id: I398602e08a375e974a8914e5fa48ffae673dda9b
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/483301
Commit-Queue: Gavin Mak &lt;gavinmak@google.com&gt;
Reviewed-by: Scott Lee &lt;ddoman@google.com&gt;
Tested-by: Gavin Mak &lt;gavinmak@google.com&gt;
</content>
</entry>
</feed>
