sapling/eden/scm/tests/test-fb-hgext-remotefilelog-treemanifest-t.py
John Reese 9fd86a4fae apply upgraded black 21.4b2 formatting to fbsource
Summary:
This applies the formatting changes from black v21.4b2 to all covered
projects in fbsource. Most changes are to single line docstrings, as black
will now remove leading and trailing whitespace to match PEP8. Any other
formatting changes are likely due to files that landed without formatting,
or files that previously triggered errors in black.

Any changes to code should be AST identical. Any test failures are likely
due to bad tests, or testing against the output of pyfmt.

Reviewed By: thatch

Differential Revision: D28204910

fbshipit-source-id: 804725bcd14f763e90c5ddff1d0418117c15809a
2021-05-04 22:16:51 -07:00

71 lines
1.5 KiB
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 % "cat"
<< r"""
[extensions]
treemanifest=
"""
>> "$HGRCPATH"
)
sh % "cd master"
(
sh % "cat"
<< r"""
[extensions]
[remotefilelog]
server=True
[treemanifest]
server=True
"""
>> ".hg/hgrc"
)
sh % "mkdir dir"
sh % "echo x" > "dir/x"
sh % "hg commit -qAm x1"
sh % "cd .."
# Clone with shallowtrees not set (False)
sh % "hgcloneshallow 'ssh://user@dummy/master' shallow --noupdate" == r"""
streaming all changes
3 files to transfer, 235 bytes of data
transferred 235 bytes in 0.0 seconds (229 KB/sec)
searching for changes
no changes found"""
sh % "ls 'shallow/.hg/store/00*.i'" == r"""
shallow/.hg/store/00changelog.i
shallow/.hg/store/00manifesttree.i"""
sh % "rm -rf shallow"
# Clone with shallowtrees=True
(
sh % "cat"
<< r"""
[remotefilelog]
shallowtrees=True
"""
>> "master/.hg/hgrc"
)
sh % "hgcloneshallow 'ssh://user@dummy/master' shallow --noupdate" == r"""
streaming all changes
2 files to transfer, 124 bytes of data
transferred 124 bytes in 0.0 seconds (121 KB/sec)
searching for changes
no changes found"""
sh % "ls 'shallow/.hg/store/00*.i'" == "shallow/.hg/store/00changelog.i"