sapling/eden/scm/tests/test-issue1089-t.py
Durham Goode 7c8f9167e1 tests: avoid turning $TESTTMP into a repo
Summary:
Some tests run `hg init` right inside the test directory, turning the
entire $TESTTMP into a repo. In future diffs we'll start to rely more on hgcache
being present during tests, which creates a directory in $TESTTMP. Let's make
sure all repos are created as sub-directories of $TESTTMP.

Reviewed By: kulshrax

Differential Revision: D23662077

fbshipit-source-id: 2b2b974ebfd1bd19ad6acd1ebe3e68dd03a09869
2020-09-17 10:16:03 -07:00

35 lines
709 B
Python

# Copyright (c) Facebook, Inc. and its affiliates.
# Copyright (c) Mercurial Contributors.
#
# 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
# https://bz.mercurial-scm.org/1089
sh % "hg init repo"
sh % "cd repo"
sh % "mkdir a"
sh % "echo a" > "a/b"
sh % "hg ci -Am m" == "adding a/b"
sh % "hg rm a" == "removing a/b"
sh % "hg ci -m m a"
sh % "mkdir a b"
sh % "echo a" > "a/b"
sh % "hg ci -Am m" == "adding a/b"
sh % "hg rm a" == "removing a/b"
sh % "cd b"
# Relative delete:
sh % "hg ci -m m ../a"
sh % "cd .."