summaryrefslogtreecommitdiffstats
path: root/subcmds
diff options
context:
space:
mode:
Diffstat (limited to 'subcmds')
-rw-r--r--subcmds/sync.py4
-rw-r--r--subcmds/upload.py7
2 files changed, 9 insertions, 2 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py
index bbe03722..159771eb 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -1696,7 +1696,7 @@ later is required to fix a server side protocol bug.
1696 ) 1696 )
1697 1697
1698 self._fetch_times = _FetchTimes(manifest) 1698 self._fetch_times = _FetchTimes(manifest)
1699 self._local_sync_state = _LocalSyncState(manifest) 1699 self._local_sync_state = LocalSyncState(manifest)
1700 if not opt.local_only: 1700 if not opt.local_only:
1701 with multiprocessing.Manager() as manager: 1701 with multiprocessing.Manager() as manager:
1702 with ssh.ProxyManager(manager) as ssh_proxy: 1702 with ssh.ProxyManager(manager) as ssh_proxy:
@@ -1932,7 +1932,7 @@ class _FetchTimes(object):
1932 platform_utils.remove(self._path, missing_ok=True) 1932 platform_utils.remove(self._path, missing_ok=True)
1933 1933
1934 1934
1935class _LocalSyncState(object): 1935class LocalSyncState(object):
1936 _LAST_FETCH = "last_fetch" 1936 _LAST_FETCH = "last_fetch"
1937 _LAST_CHECKOUT = "last_checkout" 1937 _LAST_CHECKOUT = "last_checkout"
1938 1938
diff --git a/subcmds/upload.py b/subcmds/upload.py
index 040eaeb5..b89525ce 100644
--- a/subcmds/upload.py
+++ b/subcmds/upload.py
@@ -26,6 +26,7 @@ from git_command import GitCommand
26from git_refs import R_HEADS 26from git_refs import R_HEADS
27from hooks import RepoHook 27from hooks import RepoHook
28from project import ReviewableBranch 28from project import ReviewableBranch
29from subcmds.sync import LocalSyncState
29 30
30 31
31_DEFAULT_UNUSUAL_COMMIT_THRESHOLD = 5 32_DEFAULT_UNUSUAL_COMMIT_THRESHOLD = 5
@@ -804,6 +805,12 @@ Gerrit Code Review: https://www.gerritcodereview.com/
804 if not hook.Run( 805 if not hook.Run(
805 project_list=pending_proj_names, worktree_list=pending_worktrees 806 project_list=pending_proj_names, worktree_list=pending_worktrees
806 ): 807 ):
808 if LocalSyncState(manifest).IsPartiallySynced():
809 print(
810 "Partially synced tree detected. Syncing all projects "
811 "may resolve issues you're seeing.",
812 file=sys.stderr,
813 )
807 ret = 1 814 ret = 1
808 if ret: 815 if ret:
809 return ret 816 return ret