mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
5f0a6f35af
Summary: File content needs to be encoded. Reviewed By: DurhamG Differential Revision: D23463706 fbshipit-source-id: e8e512668452618e3b139d7d94ec8776f2b6b25b
22 lines
534 B
Python
22 lines
534 B
Python
# Copyright (c) Facebook, Inc. and its affiliates.
|
|
#
|
|
# This software may be used and distributed according to the terms of the
|
|
# GNU General Public License version 2.
|
|
|
|
"""predefined hooks"""
|
|
|
|
from .mercurial import util
|
|
|
|
|
|
def backgroundfsync(ui, repo, hooktype, **kwargs):
|
|
"""run fsync in background
|
|
|
|
Example config::
|
|
|
|
[hooks]
|
|
postwritecommand.fsync = python:edenscm.hooks.backgroundfsync
|
|
"""
|
|
if not repo:
|
|
return
|
|
util.spawndetached(util.gethgcmd() + ["debugfsync"], cwd=repo.svfs.join(""))
|