2019-07-18 06:59:57 +03:00
|
|
|
# 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 % "'CACHEDIR=`pwd`/hgcache'"
|
|
|
|
|
2019-10-01 02:51:26 +03:00
|
|
|
sh % '. "$TESTDIR/library.sh"'
|
2019-07-18 06:59:57 +03:00
|
|
|
|
|
|
|
sh % "hg init client1"
|
|
|
|
sh % "cd client1"
|
2021-05-05 08:13:57 +03:00
|
|
|
(
|
|
|
|
sh % "cat"
|
|
|
|
<< r"""
|
2019-07-18 06:59:57 +03:00
|
|
|
[remotefilelog]
|
|
|
|
reponame=master
|
|
|
|
cachepath=$CACHEDIR
|
2021-05-05 08:13:57 +03:00
|
|
|
"""
|
|
|
|
>> ".hg/hgrc"
|
|
|
|
)
|
2019-07-18 06:59:57 +03:00
|
|
|
|
|
|
|
sh % "echo a" > "a"
|
|
|
|
sh % "mkdir dir"
|
|
|
|
sh % "echo b" > "dir/b"
|
|
|
|
sh % "hg commit -Aqm 'initial commit'"
|
|
|
|
|
|
|
|
sh % "hg init ../client2"
|
|
|
|
sh % "cd ../client2"
|
|
|
|
sh % "hg pull ../client1" == r"""
|
|
|
|
pulling from ../client1
|
|
|
|
requesting all changes
|
|
|
|
adding changesets
|
|
|
|
adding manifests
|
|
|
|
adding file changes
|
2020-01-15 08:00:48 +03:00
|
|
|
added 1 changesets with 2 changes to 2 files"""
|