upload: Suggest full sync if hooks fail with partially synced tree

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 <vapier@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Tested-by: Gavin Mak <gavinmak@google.com>
This commit is contained in:
Gavin Mak
2023-08-22 01:24:46 +00:00
committed by LUCI
parent 321b7934b5
commit 16109a66b7
3 changed files with 11 additions and 4 deletions

View File

@ -110,7 +110,7 @@ def test_cli_jobs(argv, jobs_manifest, jobs, jobs_net, jobs_check):
class LocalSyncState(unittest.TestCase):
"""Tests for _LocalSyncState."""
"""Tests for LocalSyncState."""
_TIME = 10
@ -129,7 +129,7 @@ class LocalSyncState(unittest.TestCase):
def _new_state(self, time=_TIME):
with mock.patch("time.time", return_value=time):
return sync._LocalSyncState(self.manifest)
return sync.LocalSyncState(self.manifest)
def test_set(self):
"""Times are set."""