mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 00:45:18 +03:00
1183f14f11
Summary: This was a hack to allow the tests to produce the same hashes as before. Let's disable this and fix the remaining test failures. A future diff will remove the feature entirely. Where possible I changed input hashes to desc() and output hashes to globs so hopefully future hash changes are a little easier. Differential Revision: D29567762 fbshipit-source-id: cf5150c112c56b08f583feba80e5a636cc07db0a
79 lines
1.4 KiB
Python
79 lines
1.4 KiB
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
|
|
|
|
|
|
sh % "hg init"
|
|
|
|
sh % "mkdir alpha"
|
|
sh % "touch alpha/one"
|
|
sh % "mkdir beta"
|
|
sh % "touch beta/two"
|
|
|
|
sh % "hg add alpha/one beta/two"
|
|
sh % "hg ci -m start"
|
|
|
|
sh % "echo 1" > "alpha/one"
|
|
sh % "echo 2" > "beta/two"
|
|
|
|
# everything
|
|
|
|
sh % "hg diff --nodates" == r"""
|
|
diff -r * alpha/one (glob)
|
|
--- a/alpha/one
|
|
+++ b/alpha/one
|
|
@@ -0,0 +1,1 @@
|
|
+1
|
|
diff -r * beta/two (glob)
|
|
--- a/beta/two
|
|
+++ b/beta/two
|
|
@@ -0,0 +1,1 @@
|
|
+2"""
|
|
|
|
# beta only
|
|
|
|
sh % "hg diff --nodates beta" == r"""
|
|
diff -r * beta/two (glob)
|
|
--- a/beta/two
|
|
+++ b/beta/two
|
|
@@ -0,0 +1,1 @@
|
|
+2"""
|
|
|
|
# inside beta
|
|
|
|
sh % "cd beta"
|
|
sh % "hg diff --nodates ." == r"""
|
|
diff -r * beta/two (glob)
|
|
--- a/beta/two
|
|
+++ b/beta/two
|
|
@@ -0,0 +1,1 @@
|
|
+2"""
|
|
|
|
# relative to beta
|
|
|
|
sh % "cd .."
|
|
sh % "hg diff --nodates --root beta" == r"""
|
|
diff -r * two (glob)
|
|
--- a/two
|
|
+++ b/two
|
|
@@ -0,0 +1,1 @@
|
|
+2"""
|
|
|
|
# inside beta
|
|
|
|
sh % "cd beta"
|
|
sh % "hg diff --nodates --root ." == r"""
|
|
diff -r * two (glob)
|
|
--- a/two
|
|
+++ b/two
|
|
@@ -0,0 +1,1 @@
|
|
+2"""
|
|
|
|
sh % "cd .."
|