mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 06:47:41 +03:00
tests: remove test cases about legacy dirstates
Summary: Treestate is the only supported dirstate format. Remove test cases about legacy dirstates. Reviewed By: DurhamG Differential Revision: D24340584 fbshipit-source-id: 2ebaa7d5aa9e8639e3ce4caa67c4f93155b52558
This commit is contained in:
parent
36e5276ba9
commit
e179789b7b
@ -1,15 +1,6 @@
|
||||
#chg-compatible
|
||||
|
||||
#chg-compatible
|
||||
|
||||
#require no-icasefs
|
||||
#testcases treestate-on treestate-off
|
||||
|
||||
#if treestate-on
|
||||
$ setconfig format.dirstate=2
|
||||
#else
|
||||
$ setconfig format.dirstate=1
|
||||
#endif
|
||||
|
||||
test file addition with colliding case
|
||||
|
||||
|
@ -1,15 +1,5 @@
|
||||
#chg-compatible
|
||||
|
||||
#chg-compatible
|
||||
|
||||
#testcases treestate-on treestate-off
|
||||
|
||||
#if treestate-on
|
||||
$ setconfig format.dirstate=2
|
||||
#else
|
||||
$ setconfig format.dirstate=1
|
||||
#endif
|
||||
|
||||
Setup
|
||||
|
||||
$ hg init repo
|
||||
|
@ -1,19 +1,5 @@
|
||||
#chg-compatible
|
||||
|
||||
#testcases v0 v1 v2
|
||||
|
||||
#if v0
|
||||
$ setconfig format.dirstate=0
|
||||
#endif
|
||||
|
||||
#if v1
|
||||
$ setconfig format.dirstate=1
|
||||
#endif
|
||||
|
||||
#if v2
|
||||
$ setconfig format.dirstate=2
|
||||
#endif
|
||||
|
||||
Set up
|
||||
|
||||
$ hg init repo
|
||||
|
@ -8,60 +8,50 @@ from __future__ import absolute_import
|
||||
from testutil.dott import feature, sh, testtmp # noqa: F401
|
||||
|
||||
|
||||
for testcase in ["v0", "v1", "v2"]:
|
||||
sh % "cd $TESTTMP"
|
||||
sh % "setconfig 'format.dirstate=2'"
|
||||
|
||||
sh % "cd $TESTTMP"
|
||||
sh % "newrepo"
|
||||
sh % "echo file1" > "file1"
|
||||
sh % "echo file2" > "file2"
|
||||
sh % "mkdir -p dira dirb"
|
||||
sh % "echo file3" > "dira/file3"
|
||||
sh % "echo file4" > "dirb/file4"
|
||||
sh % "echo file5" > "dirb/file5"
|
||||
sh % "hg ci -q -Am base"
|
||||
|
||||
if feature.check(["v0"]):
|
||||
sh % "setconfig 'format.dirstate=0'"
|
||||
# Test debugpathcomplete with just normal files
|
||||
|
||||
if feature.check(["v1"]):
|
||||
sh % "setconfig 'format.dirstate=1'"
|
||||
|
||||
if feature.check(["v2"]):
|
||||
sh % "setconfig 'format.dirstate=2'"
|
||||
|
||||
sh % "newrepo"
|
||||
sh % "echo file1" > "file1"
|
||||
sh % "echo file2" > "file2"
|
||||
sh % "mkdir -p dira dirb"
|
||||
sh % "echo file3" > "dira/file3"
|
||||
sh % "echo file4" > "dirb/file4"
|
||||
sh % "echo file5" > "dirb/file5"
|
||||
sh % "hg ci -q -Am base"
|
||||
|
||||
# Test debugpathcomplete with just normal files
|
||||
|
||||
sh % "hg debugpathcomplete f" == r"""
|
||||
sh % "hg debugpathcomplete f" == r"""
|
||||
file1
|
||||
file2"""
|
||||
sh % "hg debugpathcomplete -f d" == r"""
|
||||
sh % "hg debugpathcomplete -f d" == r"""
|
||||
dira/file3
|
||||
dirb/file4
|
||||
dirb/file5"""
|
||||
|
||||
# Test debugpathcomplete with removed files
|
||||
# Test debugpathcomplete with removed files
|
||||
|
||||
sh % "hg rm dirb/file5"
|
||||
sh % "hg debugpathcomplete -r d" == "dirb"
|
||||
sh % "hg debugpathcomplete -fr d" == "dirb/file5"
|
||||
sh % "hg rm dirb/file4"
|
||||
sh % "hg debugpathcomplete -n d" == "dira"
|
||||
sh % "hg rm dirb/file5"
|
||||
sh % "hg debugpathcomplete -r d" == "dirb"
|
||||
sh % "hg debugpathcomplete -fr d" == "dirb/file5"
|
||||
sh % "hg rm dirb/file4"
|
||||
sh % "hg debugpathcomplete -n d" == "dira"
|
||||
|
||||
# Test debugpathcomplete with merges
|
||||
# Test debugpathcomplete with merges
|
||||
|
||||
sh % "cd .."
|
||||
sh % "newrepo"
|
||||
sh % "drawdag" << r"""
|
||||
sh % "cd .."
|
||||
sh % "newrepo"
|
||||
sh % "drawdag" << r"""
|
||||
D # A/filenormal = 1
|
||||
/ \ # B/filep1 = 1
|
||||
B C # B/filemerged = 1
|
||||
B C # B/filemerged = 1
|
||||
\ / # C/filep2 = 1
|
||||
A # C/filemerged = 2
|
||||
# D/filemerged = 12
|
||||
"""
|
||||
sh % "hg up -q $D"
|
||||
sh % "hg debugpathcomplete f" == r"""
|
||||
"""
|
||||
sh % "hg up -q $D"
|
||||
sh % "hg debugpathcomplete f" == r"""
|
||||
filemerged
|
||||
filenormal
|
||||
filep1
|
||||
|
@ -1,23 +1,5 @@
|
||||
#chg-compatible
|
||||
|
||||
#chg-compatible
|
||||
|
||||
#chg-compatible
|
||||
|
||||
#testcases v0 v1 v2
|
||||
|
||||
#if v0
|
||||
$ setconfig format.dirstate=0
|
||||
#endif
|
||||
|
||||
#if v1
|
||||
$ setconfig format.dirstate=1
|
||||
#endif
|
||||
|
||||
#if v2
|
||||
$ setconfig format.dirstate=2
|
||||
#endif
|
||||
|
||||
$ readconfig <<EOF
|
||||
> [ui]
|
||||
> logtemplate="{node|short} ({phase}) [{tags} {bookmarks}] {desc|firstline}\n"
|
||||
|
@ -10,43 +10,32 @@ from testutil.dott import feature, sh, testtmp # noqa: F401
|
||||
|
||||
feature.require(["symlink"])
|
||||
|
||||
for testcase in ["v0", "v1", "v2"]:
|
||||
sh % "cd $TESTTMP"
|
||||
|
||||
sh % "cd $TESTTMP"
|
||||
sh % "newrepo"
|
||||
sh % "mkdir a b"
|
||||
sh % "touch a/x"
|
||||
|
||||
if feature.check(["v0"]):
|
||||
sh % "setconfig 'format.dirstate=0'"
|
||||
sh % "hg ci -m init -A a/x"
|
||||
|
||||
if feature.check(["v1"]):
|
||||
sh % "setconfig 'format.dirstate=1'"
|
||||
# Replace the directory with a symlink
|
||||
|
||||
if feature.check(["v2"]):
|
||||
sh % "setconfig 'format.dirstate=2'"
|
||||
sh % "mv a/x b/x"
|
||||
sh % "rmdir a"
|
||||
sh % "ln -s b a"
|
||||
|
||||
sh % "newrepo"
|
||||
sh % "mkdir a b"
|
||||
sh % "touch a/x"
|
||||
# "! a/x" should be shown, as it is implicitly removed
|
||||
|
||||
sh % "hg ci -m init -A a/x"
|
||||
|
||||
# Replace the directory with a symlink
|
||||
|
||||
sh % "mv a/x b/x"
|
||||
sh % "rmdir a"
|
||||
sh % "ln -s b a"
|
||||
|
||||
# "! a/x" should be shown, as it is implicitly removed
|
||||
|
||||
sh % "hg status" == r"""
|
||||
sh % "hg status" == r"""
|
||||
! a/x
|
||||
? a
|
||||
? b/x"""
|
||||
|
||||
sh % "hg ci -m rename -A ." == r"""
|
||||
sh % "hg ci -m rename -A ." == r"""
|
||||
adding a
|
||||
removing a/x
|
||||
adding b/x"""
|
||||
|
||||
# "a/x" should not show up in "hg status", even if it exists
|
||||
# "a/x" should not show up in "hg status", even if it exists
|
||||
|
||||
sh % "hg status"
|
||||
sh % "hg status"
|
||||
|
@ -1,15 +1,6 @@
|
||||
#chg-compatible
|
||||
|
||||
#chg-compatible
|
||||
|
||||
#require symlink
|
||||
#testcases treestate-on treestate-off
|
||||
|
||||
#if treestate-on
|
||||
$ setconfig format.dirstate=2
|
||||
#else
|
||||
$ setconfig format.dirstate=1
|
||||
#endif
|
||||
|
||||
Path conflict checking is currently disabled by default because of issue5716.
|
||||
Turn it on for this test.
|
||||
|
@ -1,12 +1,6 @@
|
||||
#chg-compatible
|
||||
|
||||
#testcases treestate-on treestate-off
|
||||
|
||||
#if treestate-on
|
||||
$ setconfig format.dirstate=2
|
||||
#else
|
||||
$ setconfig format.dirstate=1
|
||||
#endif
|
||||
|
||||
$ HGENCODING=utf-8
|
||||
$ export HGENCODING
|
||||
|
@ -1,15 +1,6 @@
|
||||
#chg-compatible
|
||||
|
||||
#chg-compatible
|
||||
|
||||
#require symlink
|
||||
#testcases treestate-on treestate-off
|
||||
|
||||
#if treestate-on
|
||||
$ setconfig format.dirstate=2
|
||||
#else
|
||||
$ setconfig format.dirstate=1
|
||||
#endif
|
||||
|
||||
== tests added in 0.7 ==
|
||||
|
||||
|
@ -8,6 +8,8 @@ from __future__ import absolute_import
|
||||
from testutil.dott import feature, sh, testtmp # noqa: F401
|
||||
|
||||
|
||||
sh.setconfig("treestate.required=false")
|
||||
|
||||
# Create a treedirstate repo
|
||||
|
||||
sh % "hg init repo1 --config 'format.dirstate=1'"
|
||||
|
Loading…
Reference in New Issue
Block a user