tests: rename generate-working-copy-states

Summary:
Renaming it to `generateworkingcopystates`. This is a valid module name.
The goal is to convert this script to a module. While we are converting
tests it needs to be accessible in both script form and module.

Reviewed By: singhsrb

Differential Revision: D17611370

fbshipit-source-id: 0b2d0de71f0da7cd6efd7874c505d9aa77f7b296
This commit is contained in:
Stefan Filip 2019-09-27 13:27:38 -07:00 committed by Facebook Github Bot
parent 92f92d5138
commit 40e989ef9a
6 changed files with 27 additions and 27 deletions

View File

@ -16,15 +16,15 @@
#
# Typical usage:
#
# $ python $TESTDIR/generate-working-copy-states.py state 2 1
# $ python $TESTDIR/generateworkingcopystates.py state 2 1
# $ hg addremove --similarity 0
# $ hg commit -m 'first'
#
# $ python $TESTDIR/generate-working-copy-states.py state 2 1
# $ python $TESTDIR/generateworkingcopystates.py state 2 1
# $ hg addremove --similarity 0
# $ hg commit -m 'second'
#
# $ python $TESTDIR/generate-working-copy-states.py state 2 wc
# $ python $TESTDIR/generateworkingcopystates.py state 2 wc
# $ hg addremove --similarity 0
# $ hg forget *_*_*-untracked
# $ rm *_*_missing-*

View File

@ -227,15 +227,15 @@ Generates history of files having 3 states, r0_r1_wc:
$ hg init $TESTTMP/wcstates
$ cd $TESTTMP/wcstates
$ $PYTHON $TESTDIR/generate-working-copy-states.py state 2 1
$ $PYTHON $TESTDIR/generateworkingcopystates.py state 2 1
$ hg addremove -q --similarity 0
$ hg commit -m0
$ $PYTHON $TESTDIR/generate-working-copy-states.py state 2 2
$ $PYTHON $TESTDIR/generateworkingcopystates.py state 2 2
$ hg addremove -q --similarity 0
$ hg commit -m1
$ $PYTHON $TESTDIR/generate-working-copy-states.py state 2 wc
$ $PYTHON $TESTDIR/generateworkingcopystates.py state 2 wc
$ hg addremove -q --similarity 0
$ hg forget *_*_*-untracked
$ rm *_*_missing-*

View File

@ -2,15 +2,15 @@
Set up history and working copy
$ $PYTHON $TESTDIR/generate-working-copy-states.py state 2 1
$ $PYTHON $TESTDIR/generateworkingcopystates.py state 2 1
$ hg addremove -q --similarity 0
$ hg commit -m first
$ $PYTHON $TESTDIR/generate-working-copy-states.py state 2 2
$ $PYTHON $TESTDIR/generateworkingcopystates.py state 2 2
$ hg addremove -q --similarity 0
$ hg commit -m second
$ $PYTHON $TESTDIR/generate-working-copy-states.py state 2 wc
$ $PYTHON $TESTDIR/generateworkingcopystates.py state 2 wc
$ hg addremove -q --similarity 0
$ hg forget *_*_*-untracked
$ rm *_*_missing-*

View File

@ -12,26 +12,26 @@ remote content, then finally forgotten.
Create base changeset
$ $PYTHON $TESTDIR/generate-working-copy-states.py state 3 1
$ $PYTHON $TESTDIR/generateworkingcopystates.py state 3 1
$ hg addremove -q --similarity 0
$ hg commit -qm 'base'
Create remote changeset
$ $PYTHON $TESTDIR/generate-working-copy-states.py state 3 2
$ $PYTHON $TESTDIR/generateworkingcopystates.py state 3 2
$ hg addremove -q --similarity 0
$ hg commit -qm 'remote'
Create local changeset
$ hg update -q 0
$ $PYTHON $TESTDIR/generate-working-copy-states.py state 3 3
$ $PYTHON $TESTDIR/generateworkingcopystates.py state 3 3
$ hg addremove -q --similarity 0
$ hg commit -qm 'local'
Set up working directory
$ $PYTHON $TESTDIR/generate-working-copy-states.py state 3 wc
$ $PYTHON $TESTDIR/generateworkingcopystates.py state 3 wc
$ hg addremove -q --similarity 0
$ hg forget *_*_*_*-untracked
$ rm *_*_*_missing-*
@ -283,7 +283,7 @@ missing_missing_content3_missing-tracked becomes removed ('R'), even though
the remote side did not touch the file
$ checkstatus() {
> for f in `$PYTHON $TESTDIR/generate-working-copy-states.py filelist 3`
> for f in `$PYTHON $TESTDIR/generateworkingcopystates.py filelist 3`
> do
> echo
> hg status -A $f
@ -664,7 +664,7 @@ the remote side did not touch the file
missing_missing_missing_missing-untracked: * (glob)
<missing>
$ for f in `$PYTHON $TESTDIR/generate-working-copy-states.py filelist 3`
$ for f in `$PYTHON $TESTDIR/generateworkingcopystates.py filelist 3`
> do
> if test -f ${f}.orig
> then
@ -781,7 +781,7 @@ Set up working directory again
$ hg -q update --clean 2
$ hg --config extensions.purge= purge
$ $PYTHON $TESTDIR/generate-working-copy-states.py state 3 wc
$ $PYTHON $TESTDIR/generateworkingcopystates.py state 3 wc
$ hg addremove -q --similarity 0
$ hg forget *_*_*_*-untracked
$ rm *_*_*_missing-*

View File

@ -493,7 +493,7 @@ Write the python script to disk
check list of planned files
$ $PYTHON $TESTDIR/generate-working-copy-states.py filelist 2
$ $PYTHON $TESTDIR/generateworkingcopystates.py filelist 2
content1_content1_content1-tracked
content1_content1_content1-untracked
content1_content1_content3-tracked
@ -548,7 +548,7 @@ Generate appropriate repo state
Generate base changeset
$ $PYTHON $TESTDIR/generate-working-copy-states.py state 2 1
$ $PYTHON $TESTDIR/generateworkingcopystates.py state 2 1
$ hg addremove --similarity 0
adding content1_content1_content1-tracked
adding content1_content1_content1-untracked
@ -620,7 +620,7 @@ Generate base changeset
Create parent changeset
$ $PYTHON $TESTDIR/generate-working-copy-states.py state 2 2
$ $PYTHON $TESTDIR/generateworkingcopystates.py state 2 2
$ hg addremove --similarity 0
removing content1_missing_content1-tracked
removing content1_missing_content1-untracked
@ -684,7 +684,7 @@ Create parent changeset
Setup working directory
$ $PYTHON $TESTDIR/generate-working-copy-states.py state 2 wc
$ $PYTHON $TESTDIR/generateworkingcopystates.py state 2 wc
$ hg addremove --similarity 0
adding content1_missing_content1-tracked
adding content1_missing_content1-untracked
@ -900,7 +900,7 @@ Test revert to parent content with explicit file name
revert all files individually and check the output
(output is expected to be different than in the --all case)
$ for file in `$PYTHON $TESTDIR/generate-working-copy-states.py filelist 2`; do
$ for file in `$PYTHON $TESTDIR/generateworkingcopystates.py filelist 2`; do
> echo '### revert for:' $file;
> hg revert $file;
> echo
@ -993,7 +993,7 @@ Test revert to "base" content with explicit file name
revert all files individually and check the output
(output is expected to be different than in the --all case)
$ for file in `$PYTHON $TESTDIR/generate-working-copy-states.py filelist 2`; do
$ for file in `$PYTHON $TESTDIR/generateworkingcopystates.py filelist 2`; do
> echo '### revert for:' $file;
> hg revert $file --rev 'desc(base)';
> echo
@ -1087,7 +1087,7 @@ Test revert to parent content with explicit file name but ignored files
revert all files individually and check the output
(output is expected to be different than in the --all case)
$ for file in `$PYTHON $TESTDIR/generate-working-copy-states.py filelist 2`; do
$ for file in `$PYTHON $TESTDIR/generateworkingcopystates.py filelist 2`; do
> echo '### revert for:' $file;
> hg revert $file;
> echo
@ -1181,7 +1181,7 @@ Test revert to "base" content with explicit file name
revert all files individually and check the output
(output is expected to be different than in the --all case)
$ for file in `$PYTHON $TESTDIR/generate-working-copy-states.py filelist 2`; do
$ for file in `$PYTHON $TESTDIR/generateworkingcopystates.py filelist 2`; do
> echo '### revert for:' $file;
> hg revert $file --rev 'desc(base)';
> echo

View File

@ -5,7 +5,7 @@ combined correctly with the dirstate status.
First commit
$ $PYTHON $TESTDIR/generate-working-copy-states.py state 2 1
$ $PYTHON $TESTDIR/generateworkingcopystates.py state 2 1
$ hg addremove --similarity 0
adding content1_content1_content1-tracked
adding content1_content1_content1-untracked
@ -31,7 +31,7 @@ First commit
Second commit
$ $PYTHON $TESTDIR/generate-working-copy-states.py state 2 2
$ $PYTHON $TESTDIR/generateworkingcopystates.py state 2 2
$ hg addremove --similarity 0
removing content1_missing_content1-tracked
removing content1_missing_content1-untracked
@ -49,7 +49,7 @@ Second commit
Working copy
$ $PYTHON $TESTDIR/generate-working-copy-states.py state 2 wc
$ $PYTHON $TESTDIR/generateworkingcopystates.py state 2 wc
$ hg addremove --similarity 0
adding content1_missing_content1-tracked
adding content1_missing_content1-untracked