summaryrefslogtreecommitdiffstats
path: root/subcmds/sync.py
diff options
context:
space:
mode:
Diffstat (limited to 'subcmds/sync.py')
-rw-r--r--subcmds/sync.py40
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
25import sys 25import sys
26import tempfile 26import tempfile
27import time 27import time
28from typing import NamedTuple, List, Set 28from typing import List, NamedTuple, Set
29import urllib.error 29import urllib.error
30import urllib.parse 30import urllib.parse
31import urllib.request 31import urllib.request
32import xml.parsers.expat 32import xml.parsers.expat
33import xmlrpc.client 33import xmlrpc.client
34 34
35
35try: 36try:
36 import threading as _threading 37 import threading as _threading
37except ImportError: 38except ImportError:
@@ -49,34 +50,35 @@ except ImportError:
49 return (256, 256) 50 return (256, 256)
50 51
51 52
53from command import Command
54from command import DEFAULT_LOCAL_JOBS
55from command import MirrorSafeCommand
56from command import WORKER_BATCH_SIZE
57from error import GitError
58from error import RepoChangedException
59from error import RepoExitError
60from error import RepoUnhandledExceptionError
61from error import SyncError
62from error import UpdateManifestError
52import event_log 63import event_log
53from git_command import git_require 64from git_command import git_require
54from git_config import GetUrlCookieFile 65from git_config import GetUrlCookieFile
55from git_refs import R_HEADS, HEAD 66from git_refs import HEAD
67from git_refs import R_HEADS
56import git_superproject 68import git_superproject
69import platform_utils
70from progress import elapsed_str
71from progress import jobs_str
72from progress import Progress
73from project import DeleteWorktreeError
57from project import Project 74from project import Project
58from project import RemoteSpec 75from project import RemoteSpec
59from command import ( 76from project import SyncBuffer
60 Command,
61 DEFAULT_LOCAL_JOBS,
62 MirrorSafeCommand,
63 WORKER_BATCH_SIZE,
64)
65from error import (
66 RepoChangedException,
67 GitError,
68 RepoExitError,
69 SyncError,
70 UpdateManifestError,
71 RepoUnhandledExceptionError,
72)
73import platform_utils
74from project import SyncBuffer, DeleteWorktreeError
75from progress import Progress, elapsed_str, jobs_str
76from repo_trace import Trace 77from repo_trace import Trace
77import ssh 78import ssh
78from wrapper import Wrapper 79from 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