sapling/eden/scm/tests/test-important-remote-names-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

59 lines
1.4 KiB
Python

# coding=utf-8
# 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.
from __future__ import absolute_import
from testutil.dott import feature, sh, testtmp # noqa: F401
sh % "newrepo server"
(
sh % "drawdag"
<< r"""
D
|
B C
|/
A
"""
)
sh % 'hg bookmark -r "desc(B)" master'
# Remote bookmarks should be written even if remotenames is disabled.
sh % "newrepo client"
sh % 'setconfig "paths.default=$TESTTMP/server" "extensions.remotenames=!"'
sh % "hg pull" == r"""
pulling from $TESTTMP/server
requesting all changes
adding changesets
adding manifests
adding file changes
added 4 changesets with 4 changes to 4 files
adding remote bookmark master"""
sh % 'hg dbsh -c "ui.write(repo.svfs.tryreadutf8(\\"remotenames\\") + \\"\\n\\")"' == "112478962961147124edd43549aedd1a335e44bf bookmarks default/master"
# pull -r should also pull master.
sh % "newrepo client2"
sh % 'setconfig "paths.default=$TESTTMP/server" "extensions.remotenames=!"'
sh % "hg pull -r $C" == r"""
pulling from $TESTTMP/server
adding changesets
adding manifests
adding file changes
added 3 changesets with 3 changes to 3 files
adding remote bookmark master"""
sh % "hg log -Gr 'all()' -T '{desc} {remotenames}'" == r"""
o C
│ o B default/master
├─╯
o A"""