Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/mercurial/loader.py
Show First 20 Lines • Show All 189 Lines • ▼ Show 20 Lines | class HgBundle20Loader(DVCSLoader): | ||||
@staticmethod | @staticmethod | ||||
def clone_with_timeout(log, origin, destination, timeout): | def clone_with_timeout(log, origin, destination, timeout): | ||||
queue = billiard.Queue() | queue = billiard.Queue() | ||||
start = time.monotonic() | start = time.monotonic() | ||||
def do_clone(queue, origin, destination): | def do_clone(queue, origin, destination): | ||||
try: | try: | ||||
result = hglib.clone(source=origin, dest=destination) | result = hglib.clone(source=origin, dest=destination, noupdate=True) | ||||
except CommandError as e: | except CommandError as e: | ||||
# the queued object need an empty constructor to be deserialized later | # the queued object need an empty constructor to be deserialized later | ||||
queue.put(CommandErrorWrapper(e.err)) | queue.put(CommandErrorWrapper(e.err)) | ||||
except BaseException as e: | except BaseException as e: | ||||
queue.put(e) | queue.put(e) | ||||
else: | else: | ||||
queue.put(result) | queue.put(result) | ||||
▲ Show 20 Lines • Show All 465 Lines • Show Last 20 Lines |