mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 14:58:03 +03:00
92f6f35e7a
Summary: This diff marks **ALL** mercurial tests requiring Python 2 feature. After you fixes some tests, simply remove the `py2` feature requirement and that tests will be continuously run after your diff is landed. To bypass this feature requirement, run the tests command with `HGTEST_FORCE_PY2=1`. For example: ``` HGTEST_FORCE_PY2=1 buck test //eden/scm/tests:hg_run_tests ``` or ``` HGTEST_FORCE_PY2=1 python run-tests.py ``` ---- Basically this diff are created with the following commands: ``` $ sed -i 's/import feature\(.*\)$/import feature\1\n\nfeature.require(["py2"])/' test-*-t.py $ sed -i '1s/^/#require py2\n/' test-*.t $ ls | grep -P "^test.*(?<\!-t)\.py$" > list && vim -p $(cat list) # manually adding feature requires for these Python tests. ``` (Note: this ignores all push blocking failures!) ignore-conflict-markers Reviewed By: singhsrb Differential Revision: D19655148 fbshipit-source-id: 985e3ccb4010cc559049f1d89f8909bc2d9b5e20
106 lines
2.6 KiB
Perl
106 lines
2.6 KiB
Perl
#require py2
|
|
#chg-compatible
|
|
|
|
$ hg init repo
|
|
$ cd repo
|
|
$ enable sparse
|
|
$ mkdir show hide
|
|
$ echo show-modify-1 > show/modify
|
|
$ echo show-remove-1 > show/remove
|
|
$ echo hide-modify-1 > hide/modify
|
|
$ echo hide-remove-1 > hide/remove
|
|
$ echo show-moveout > show/moveout
|
|
$ echo show-movein > hide/movein
|
|
$ hg add show/modify show/remove hide/modify hide/remove show/moveout hide/movein
|
|
$ hg commit -m "first revision"
|
|
$ echo show-modify-2 > show/modify
|
|
$ echo show-add-2 > show/add ; hg add show/add
|
|
$ hg rm show/remove
|
|
$ echo hide-modify-2 > hide/modify
|
|
$ echo hide-add-2 > hide/add ; hg add hide/add
|
|
$ hg rm hide/remove
|
|
$ hg mv hide/movein show/movein
|
|
$ hg mv show/moveout hide/moveout
|
|
$ hg commit -m "second revision"
|
|
$ hg sparse --exclude hide
|
|
|
|
Run diff. This should still show the file contents of excluded files (and should not crash).
|
|
|
|
$ hg diff -r ".^" --git
|
|
diff --git a/hide/add b/hide/add
|
|
new file mode 100644
|
|
--- /dev/null
|
|
+++ b/hide/add
|
|
@@ -0,0 +1,1 @@
|
|
+hide-add-2
|
|
diff --git a/hide/modify b/hide/modify
|
|
--- a/hide/modify
|
|
+++ b/hide/modify
|
|
@@ -1,1 +1,1 @@
|
|
-hide-modify-1
|
|
+hide-modify-2
|
|
diff --git a/show/moveout b/hide/moveout
|
|
rename from show/moveout
|
|
rename to hide/moveout
|
|
diff --git a/hide/remove b/hide/remove
|
|
deleted file mode 100644
|
|
--- a/hide/remove
|
|
+++ /dev/null
|
|
@@ -1,1 +0,0 @@
|
|
-hide-remove-1
|
|
diff --git a/show/add b/show/add
|
|
new file mode 100644
|
|
--- /dev/null
|
|
+++ b/show/add
|
|
@@ -0,0 +1,1 @@
|
|
+show-add-2
|
|
diff --git a/show/modify b/show/modify
|
|
--- a/show/modify
|
|
+++ b/show/modify
|
|
@@ -1,1 +1,1 @@
|
|
-show-modify-1
|
|
+show-modify-2
|
|
diff --git a/hide/movein b/show/movein
|
|
rename from hide/movein
|
|
rename to show/movein
|
|
diff --git a/show/remove b/show/remove
|
|
deleted file mode 100644
|
|
--- a/show/remove
|
|
+++ /dev/null
|
|
@@ -1,1 +0,0 @@
|
|
-show-remove-1
|
|
|
|
Run diff --sparse. This should only show files within the sparse profile.
|
|
|
|
$ hg diff --sparse --git -r ".^"
|
|
diff --git a/show/add b/show/add
|
|
new file mode 100644
|
|
--- /dev/null
|
|
+++ b/show/add
|
|
@@ -0,0 +1,1 @@
|
|
+show-add-2
|
|
diff --git a/show/modify b/show/modify
|
|
--- a/show/modify
|
|
+++ b/show/modify
|
|
@@ -1,1 +1,1 @@
|
|
-show-modify-1
|
|
+show-modify-2
|
|
diff --git a/show/movein b/show/movein
|
|
new file mode 100644
|
|
--- /dev/null
|
|
+++ b/show/movein
|
|
@@ -0,0 +1,1 @@
|
|
+show-movein
|
|
diff --git a/show/moveout b/show/moveout
|
|
deleted file mode 100644
|
|
--- a/show/moveout
|
|
+++ /dev/null
|
|
@@ -1,1 +0,0 @@
|
|
-show-moveout
|
|
diff --git a/show/remove b/show/remove
|
|
deleted file mode 100644
|
|
--- a/show/remove
|
|
+++ /dev/null
|
|
@@ -1,1 +0,0 @@
|
|
-show-remove-1
|