mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 17:27:53 +03:00
a3360b4cde
Summary: We've seen several cases where the number of packfiles explodes and causes Mercurial to slowly becoming unusable due to spending most of its time scanning the filesytem for new packfiles. In the case of tree, Mercurial will blow aways the hgcache/manifest directory entirely, causing concurrent Mercurial processes to fail to commit packfiles to disk. Let's just count the number of commits we've had so far, and trigger a repack when it goes over a threshold. Reviewed By: quark-zju Differential Revision: D17677222 fbshipit-source-id: 99c31c6137d792be1f6de3c298ebff8a4372926e
33 lines
910 B
Python
33 lines
910 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 or any later version.
|
|
|
|
from __future__ import absolute_import
|
|
|
|
from testutil.dott import feature, sh, testtmp # noqa: F401
|
|
|
|
|
|
sh % ". $TESTDIR/library.sh"
|
|
|
|
sh % "hginit master"
|
|
sh % "cd master"
|
|
sh % "setconfig 'remotefilelog.server=True'"
|
|
sh % "cd .."
|
|
|
|
sh % "hgcloneshallow ssh://user@dummy/master client" == r"""
|
|
streaming all changes
|
|
0 files to transfer, 0 bytes of data
|
|
transferred 0 bytes in 0.0 seconds (0 bytes/sec)
|
|
no changes found
|
|
updating to branch default
|
|
0 files updated, 0 files merged, 0 files removed, 0 files unresolved"""
|
|
sh % "cd client"
|
|
|
|
sh % "setconfig 'remotefilelog.commitsperrepack=1'"
|
|
|
|
sh % "echo x" > "x"
|
|
sh % "hg commit -Am x" == r"""
|
|
adding x
|
|
(running background incremental repack)"""
|