sapling/eden/scm/edenscm/hooks.py
Jun Wu 5f0a6f35af py3: fix conflictinfo compatibility
Summary: File content needs to be encoded.

Reviewed By: DurhamG

Differential Revision: D23463706

fbshipit-source-id: e8e512668452618e3b139d7d94ec8776f2b6b25b
2020-09-01 18:31:35 -07:00

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(""))