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
122 lines
2.3 KiB
Perl
122 lines
2.3 KiB
Perl
#require py2
|
|
#chg-compatible
|
|
|
|
$ disable treemanifest
|
|
$ readconfig <<EOF
|
|
> [alias]
|
|
> tlog = log --template "{rev}:{node|short}: '{desc}'\n"
|
|
> tout = out --template "{rev}:{node|short}: '{desc}'\n"
|
|
> EOF
|
|
|
|
$ hg init a
|
|
$ cd a
|
|
|
|
$ echo a > a
|
|
$ hg ci -Aqm0
|
|
|
|
$ echo foo >> a
|
|
$ hg ci -Aqm1
|
|
|
|
$ hg up -q 0
|
|
|
|
$ echo bar >> a
|
|
$ hg ci -qm2
|
|
|
|
$ tglog
|
|
@ 2: a578af2cfd0c '2'
|
|
|
|
|
| o 1: 3560197d8331 '1'
|
|
|/
|
|
o 0: f7b1eb17ad24 '0'
|
|
|
|
|
|
$ cd ..
|
|
|
|
$ hg clone -q a b
|
|
|
|
$ cd b
|
|
$ cat .hg/hgrc
|
|
# example repository config (see 'hg help config' for more info)
|
|
[paths]
|
|
default = $TESTTMP/a
|
|
|
|
# path aliases to other clones of this repo in URLs or filesystem paths
|
|
# (see 'hg help config.paths' for more info)
|
|
#
|
|
# default:pushurl = ssh://jdoe@example.net/hg/jdoes-fork
|
|
# my-fork = ssh://jdoe@example.net/hg/jdoes-fork
|
|
# my-clone = /home/jdoe/jdoes-clone
|
|
|
|
[ui]
|
|
# name and email (local to this repository, optional), e.g.
|
|
# username = Jane Doe <jdoe@example.com>
|
|
|
|
$ echo red >> a
|
|
$ hg ci -qm3
|
|
|
|
$ hg up -q default
|
|
|
|
$ echo blue >> a
|
|
$ hg ci -qm4
|
|
|
|
$ tglog
|
|
@ 4: acadbdc73b28 '4'
|
|
|
|
|
o 3: 5de9cb7d8f67 '3'
|
|
|
|
|
o 2: a578af2cfd0c '2'
|
|
|
|
|
| o 1: 3560197d8331 '1'
|
|
|/
|
|
o 0: f7b1eb17ad24 '0'
|
|
|
|
|
|
$ hg tout
|
|
comparing with $TESTTMP/a
|
|
searching for changes
|
|
3:5de9cb7d8f67: '3'
|
|
4:acadbdc73b28: '4'
|
|
|
|
$ hg tlog -r 'outgoing()'
|
|
3:5de9cb7d8f67: '3'
|
|
4:acadbdc73b28: '4'
|
|
|
|
$ hg tout ../a
|
|
comparing with ../a
|
|
searching for changes
|
|
3:5de9cb7d8f67: '3'
|
|
4:acadbdc73b28: '4'
|
|
|
|
$ hg tlog -r 'outgoing("../a")'
|
|
3:5de9cb7d8f67: '3'
|
|
4:acadbdc73b28: '4'
|
|
|
|
$ echo "green = ../a" >> .hg/hgrc
|
|
|
|
$ cat .hg/hgrc
|
|
# example repository config (see 'hg help config' for more info)
|
|
[paths]
|
|
default = $TESTTMP/a
|
|
|
|
# path aliases to other clones of this repo in URLs or filesystem paths
|
|
# (see 'hg help config.paths' for more info)
|
|
#
|
|
# default:pushurl = ssh://jdoe@example.net/hg/jdoes-fork
|
|
# my-fork = ssh://jdoe@example.net/hg/jdoes-fork
|
|
# my-clone = /home/jdoe/jdoes-clone
|
|
|
|
[ui]
|
|
# name and email (local to this repository, optional), e.g.
|
|
# username = Jane Doe <jdoe@example.com>
|
|
green = ../a
|
|
|
|
$ hg tout green
|
|
abort: repository green does not exist!
|
|
[255]
|
|
|
|
$ hg tlog -r 'outgoing("green")'
|
|
abort: repository green does not exist!
|
|
[255]
|
|
|
|
$ cd ..
|