sapling/eden/scm/tests/test-fb-hgext-remotefilelog-treemanifest-lfs.t
Zeyi (Rice) Fan 92f6f35e7a mark all tests requiring Python 2
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
2020-01-30 18:49:21 -08:00

52 lines
1.4 KiB
Perl

#require py2
#chg-compatible
$ . "$TESTDIR/library.sh"
$ setconfig treemanifest.flatcompat=False
$ enable lfs treemanifest pushrebase
$ hginit master
$ cd master
$ setconfig remotefilelog.server=True treemanifest.server=True remotefilelog.shallowtrees=True
$ mkdir dir
$ echo x > dir/x
$ hg commit -qAm x1
$ hg book master
$ cd ..
$ hgcloneshallow ssh://user@dummy/master shallow
streaming all changes
2 files to transfer, * of data (glob)
transferred 124 bytes in * seconds (*) (glob)
searching for changes
no changes found
updating to branch default
fetching tree '' 287ee6e53d4fbc5fab2157eb0383fdff1c3277c8
2 trees fetched over * (glob)
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) (?)
$ cd shallow
$ enable remotenames
$ setconfig treemanifest.sendtrees=True
$ echo >> dir/x
$ hg commit -m "Modify dir/x"
$ hg push --to master
pushing rev 6b73ab2c9773 to destination ssh://user@dummy/master bookmark master
searching for changes
remote: pushing 1 changeset:
remote: 6b73ab2c9773 Modify dir/x
updating bookmark master
$ hg --cwd ../master log -G -l 1 --stat
o changeset: 1:6b73ab2c9773
| bookmark: master
~ user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: Modify dir/x
dir/x | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)