mirror of
https://github.com/facebook/sapling.git
synced 2024-12-26 22:47:26 +03:00
eb5e4fb57e
Summary: The share command was reaching into the filesystem directly - use the right utility functions instead Reviewed By: quark-zju Differential Revision: D19672980 fbshipit-source-id: a14323fd5419c3ea00d9c009b9a77f63862a7b2a
25 lines
574 B
Python
25 lines
574 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 sh, testtmp # noqa: F401
|
|
|
|
|
|
# Share works with blackbox enabled:
|
|
|
|
sh % "cat" << r"""
|
|
[extensions]
|
|
blackbox =
|
|
share =
|
|
""" >> "$HGRCPATH"
|
|
|
|
sh % "hg init a"
|
|
sh % "hg share a b" == r"""
|
|
updating working directory
|
|
0 files updated, 0 files merged, 0 files removed, 0 files unresolved"""
|
|
sh % "cd b"
|
|
sh % "hg unshare"
|