From 61224d01fa29bcf54dd6d521e09e09a8c0da77fe Mon Sep 17 00:00:00 2001 From: Josip Sokcevic Date: Wed, 18 Dec 2024 18:37:41 +0000 Subject: [PATCH] sync: skip network half on repo upgrade When repo upgrades itself, it will restart itself and rerun sync command. At that point, we know that network half is already done and we can just proceed with local half. R=ddoman@google.com Bug: b/377567091 Change-Id: I77205b1f2df19891597347d55283a617de3c6634 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/446201 Reviewed-by: Scott Lee Tested-by: Josip Sokcevic Commit-Queue: Josip Sokcevic --- subcmds/sync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subcmds/sync.py b/subcmds/sync.py index 7c4c468a..175748a6 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py @@ -1831,7 +1831,7 @@ later is required to fix a server side protocol bug. self._fetch_times = _FetchTimes(manifest) self._local_sync_state = LocalSyncState(manifest) - if not opt.local_only: + if not opt.local_only and not opt.repo_upgraded: with multiprocessing.Manager() as manager: with ssh.ProxyManager(manager) as ssh_proxy: # Initialize the socket dir once in the parent.