sapling/eden/scm/tests/test-dirstate-migrate.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

94 lines
2.5 KiB
Perl

#require py2
#chg-compatible
$ for src in 0 1 2; do
> for dst in 0 1 2; do
> [ $src = $dst ] && continue
> echo ==== Migrating dirstate v$src to v$dst ====
> cd $TESTTMP
> setconfig format.dirstate=$src
> newrepo
> touch normal modified removed deleted
> hg ci -A . -q -m init
> hg rm removed
> rm deleted
> touch untracked
> echo 1 > modified
> hg status
> hg debugtreestate status
> hg debugtreestate v$dst
> hg status
> hg debugtreestate status
> done
> done
==== Migrating dirstate v0 to v1 ====
M modified
R removed
! deleted
? untracked
dirstate v0 (flat dirstate, 4 files tracked)
M modified
R removed
! deleted
? untracked
dirstate v1 (using dirstate.tree.*, 4 files tracked) (glob)
==== Migrating dirstate v0 to v2 ====
M modified
R removed
! deleted
? untracked
dirstate v0 (flat dirstate, 4 files tracked)
M modified
R removed
! deleted
? untracked
dirstate v2 (using treestate*, offset *, 4 files tracked) (glob) (no-fsmonitor !)
dirstate v2 (using treestate*, offset *, 5 files tracked) (glob) (fsmonitor !)
==== Migrating dirstate v1 to v0 ====
M modified
R removed
! deleted
? untracked
dirstate v1 (using dirstate.tree*, 4 files tracked) (glob)
M modified
R removed
! deleted
? untracked
dirstate v0 (flat dirstate, 4 files tracked)
==== Migrating dirstate v1 to v2 ====
M modified
R removed
! deleted
? untracked
dirstate v1 (using dirstate.tree*, 4 files tracked) (glob)
M modified
R removed
! deleted
? untracked
dirstate v2 (using treestate*, offset *, 4 files tracked) (glob) (no-fsmonitor !)
dirstate v2 (using treestate*, offset *, 5 files tracked) (glob) (fsmonitor !)
==== Migrating dirstate v2 to v0 ====
M modified
R removed
! deleted
? untracked
dirstate v2 (using treestate*, offset *, 4 files tracked) (glob) (no-fsmonitor !)
dirstate v2 (using treestate*, offset *, 5 files tracked) (glob) (fsmonitor !)
M modified
R removed
! deleted
? untracked
dirstate v0 (flat dirstate, 4 files tracked)
==== Migrating dirstate v2 to v1 ====
M modified
R removed
! deleted
? untracked
dirstate v2 (using treestate*, offset *, 4 files tracked) (glob) (no-fsmonitor !)
dirstate v2 (using treestate*, offset *, 5 files tracked) (glob) (fsmonitor !)
M modified
R removed
! deleted
? untracked
dirstate v1 (using dirstate.tree*, 4 files tracked) (glob)