diff options
Diffstat (limited to 'subcmds/sync.py')
-rw-r--r-- | subcmds/sync.py | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py index 74bc4557..13c964b2 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py | |||
@@ -25,13 +25,14 @@ import socket | |||
25 | import sys | 25 | import sys |
26 | import tempfile | 26 | import tempfile |
27 | import time | 27 | import time |
28 | from typing import NamedTuple, List, Set | 28 | from typing import List, NamedTuple, Set |
29 | import urllib.error | 29 | import urllib.error |
30 | import urllib.parse | 30 | import urllib.parse |
31 | import urllib.request | 31 | import urllib.request |
32 | import xml.parsers.expat | 32 | import xml.parsers.expat |
33 | import xmlrpc.client | 33 | import xmlrpc.client |
34 | 34 | ||
35 | |||
35 | try: | 36 | try: |
36 | import threading as _threading | 37 | import threading as _threading |
37 | except ImportError: | 38 | except ImportError: |
@@ -49,34 +50,35 @@ except ImportError: | |||
49 | return (256, 256) | 50 | return (256, 256) |
50 | 51 | ||
51 | 52 | ||
53 | from command import Command | ||
54 | from command import DEFAULT_LOCAL_JOBS | ||
55 | from command import MirrorSafeCommand | ||
56 | from command import WORKER_BATCH_SIZE | ||
57 | from error import GitError | ||
58 | from error import RepoChangedException | ||
59 | from error import RepoExitError | ||
60 | from error import RepoUnhandledExceptionError | ||
61 | from error import SyncError | ||
62 | from error import UpdateManifestError | ||
52 | import event_log | 63 | import event_log |
53 | from git_command import git_require | 64 | from git_command import git_require |
54 | from git_config import GetUrlCookieFile | 65 | from git_config import GetUrlCookieFile |
55 | from git_refs import R_HEADS, HEAD | 66 | from git_refs import HEAD |
67 | from git_refs import R_HEADS | ||
56 | import git_superproject | 68 | import git_superproject |
69 | import platform_utils | ||
70 | from progress import elapsed_str | ||
71 | from progress import jobs_str | ||
72 | from progress import Progress | ||
73 | from project import DeleteWorktreeError | ||
57 | from project import Project | 74 | from project import Project |
58 | from project import RemoteSpec | 75 | from project import RemoteSpec |
59 | from command import ( | 76 | from project import SyncBuffer |
60 | Command, | ||
61 | DEFAULT_LOCAL_JOBS, | ||
62 | MirrorSafeCommand, | ||
63 | WORKER_BATCH_SIZE, | ||
64 | ) | ||
65 | from error import ( | ||
66 | RepoChangedException, | ||
67 | GitError, | ||
68 | RepoExitError, | ||
69 | SyncError, | ||
70 | UpdateManifestError, | ||
71 | RepoUnhandledExceptionError, | ||
72 | ) | ||
73 | import platform_utils | ||
74 | from project import SyncBuffer, DeleteWorktreeError | ||
75 | from progress import Progress, elapsed_str, jobs_str | ||
76 | from repo_trace import Trace | 77 | from repo_trace import Trace |
77 | import ssh | 78 | import ssh |
78 | from wrapper import Wrapper | 79 | from wrapper import Wrapper |
79 | 80 | ||
81 | |||
80 | _ONE_DAY_S = 24 * 60 * 60 | 82 | _ONE_DAY_S = 24 * 60 * 60 |
81 | 83 | ||
82 | # Env var to implicitly turn auto-gc back on. This was added to allow a user to | 84 | # Env var to implicitly turn auto-gc back on. This was added to allow a user to |