mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 23:07:18 +03:00
tests: remove redundant mkdir
There are still many tests that check that a bare 'hg init' initializes the current directory.
This commit is contained in:
parent
3960f4de1d
commit
5a0135a6ca
@ -1,6 +1,5 @@
|
||||
$ mkdir test
|
||||
$ hg init test
|
||||
$ cd test
|
||||
$ hg init
|
||||
$ echo foo>foo
|
||||
$ hg commit -Am 1 -d '1 0'
|
||||
adding foo
|
||||
|
@ -1,8 +1,7 @@
|
||||
Create a repository:
|
||||
|
||||
$ mkdir t
|
||||
$ hg init t
|
||||
$ cd t
|
||||
$ hg init
|
||||
|
||||
Make a changeset:
|
||||
|
||||
|
@ -21,9 +21,8 @@ Inaccessible source
|
||||
|
||||
Inaccessible destination
|
||||
|
||||
$ mkdir b
|
||||
$ hg init b
|
||||
$ cd b
|
||||
$ hg init
|
||||
$ hg clone . ../a
|
||||
abort: Permission denied: ../a
|
||||
[255]
|
||||
@ -44,10 +43,7 @@ Source of wrong type
|
||||
|
||||
Default destination, same directory
|
||||
|
||||
$ mkdir q
|
||||
$ cd q
|
||||
$ hg init
|
||||
$ cd ..
|
||||
$ hg init q
|
||||
$ hg clone q
|
||||
destination directory: q
|
||||
abort: destination 'q' is not empty
|
||||
|
@ -1,8 +1,7 @@
|
||||
Prepare repo a:
|
||||
|
||||
$ mkdir a
|
||||
$ hg init a
|
||||
$ cd a
|
||||
$ hg init
|
||||
$ echo a > a
|
||||
$ hg add a
|
||||
$ hg commit -m test
|
||||
|
@ -1,6 +1,5 @@
|
||||
$ mkdir t
|
||||
$ hg init t
|
||||
$ cd t
|
||||
$ hg init
|
||||
|
||||
$ echo 1 > a
|
||||
$ hg ci -qAm "first"
|
||||
|
@ -4,9 +4,8 @@ Set vars:
|
||||
|
||||
Prepare repo-a:
|
||||
|
||||
$ mkdir repo-a
|
||||
$ hg init repo-a
|
||||
$ cd repo-a
|
||||
$ hg init
|
||||
|
||||
$ echo this is file a > a
|
||||
$ hg add a
|
||||
@ -64,9 +63,8 @@ Dump all revlogs to file repo.dump:
|
||||
|
||||
Undumping into repo-b:
|
||||
|
||||
$ mkdir repo-b
|
||||
$ hg init repo-b
|
||||
$ cd repo-b
|
||||
$ hg init
|
||||
$ python $CONTRIBDIR/undumprevlog < ../repo.dump
|
||||
.hg/store/00changelog.i
|
||||
.hg/store/00manifest.i
|
||||
|
@ -1,8 +1,7 @@
|
||||
$ umask 027
|
||||
$ mkdir test1
|
||||
$ cd test1
|
||||
|
||||
$ hg init
|
||||
$ hg init test1
|
||||
$ cd test1
|
||||
$ touch a b
|
||||
$ hg add a b
|
||||
$ hg ci -m "added a b"
|
||||
@ -11,10 +10,9 @@
|
||||
$ hg clone test1 test3
|
||||
updating to branch default
|
||||
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
$ mkdir test2
|
||||
$ cd test2
|
||||
|
||||
$ hg init
|
||||
$ hg init test2
|
||||
$ cd test2
|
||||
$ hg pull ../test1
|
||||
pulling from ../test1
|
||||
requesting all changes
|
||||
|
@ -1,6 +1,5 @@
|
||||
$ mkdir t
|
||||
$ hg init t
|
||||
$ cd t
|
||||
$ hg init
|
||||
$ echo import > port
|
||||
$ hg add port
|
||||
$ hg commit -m 0 -u spam -d '0 0'
|
||||
|
@ -25,9 +25,8 @@ Some implementations of cp can't create hardlinks (replaces 'cp -al' on Linux):
|
||||
|
||||
Prepare repo r1:
|
||||
|
||||
$ mkdir r1
|
||||
$ hg init r1
|
||||
$ cd r1
|
||||
$ hg init
|
||||
|
||||
$ echo c1 > f1
|
||||
$ hg add f1
|
||||
|
@ -2,9 +2,8 @@ This tests if hgweb and hgwebdir still work if the REQUEST_URI variable is
|
||||
no longer passed with the request. Instead, SCRIPT_NAME and PATH_INFO
|
||||
should be used from d74fc8dec2b4 onward to route the request.
|
||||
|
||||
$ mkdir repo
|
||||
$ hg init repo
|
||||
$ cd repo
|
||||
$ hg init
|
||||
$ echo foo > bar
|
||||
$ hg add bar
|
||||
$ hg commit -m "test"
|
||||
|
@ -2,9 +2,8 @@ This tests if hgweb and hgwebdir still work if the REQUEST_URI variable is
|
||||
no longer passed with the request. Instead, SCRIPT_NAME and PATH_INFO
|
||||
should be used from d74fc8dec2b4 onward to route the request.
|
||||
|
||||
$ mkdir repo
|
||||
$ hg init repo
|
||||
$ cd repo
|
||||
$ hg init
|
||||
$ echo foo > bar
|
||||
$ hg add bar
|
||||
$ hg commit -m "test"
|
||||
|
@ -1,9 +1,8 @@
|
||||
Tests if hgweb can run without touching sys.stdin, as is required
|
||||
by the WSGI standard and strictly implemented by mod_wsgi.
|
||||
|
||||
$ mkdir repo
|
||||
$ hg init repo
|
||||
$ cd repo
|
||||
$ hg init
|
||||
$ echo foo > bar
|
||||
$ hg add bar
|
||||
$ hg commit -m "test"
|
||||
|
@ -1,6 +1,5 @@
|
||||
$ mkdir test
|
||||
$ hg init test
|
||||
$ cd test
|
||||
$ hg init
|
||||
$ for i in 0 1 2 3 4 5 6 7 8; do
|
||||
> echo $i >> foo
|
||||
> hg commit -A -m $i
|
||||
|
@ -7,8 +7,7 @@ issues when status queries are issued when dirstate is dirty
|
||||
|
||||
issue1810: inotify and fetch
|
||||
|
||||
$ mkdir test; cd test
|
||||
$ hg init
|
||||
$ hg init test; cd test
|
||||
$ hg inserve -d --pid-file=../hg.pid
|
||||
$ cat ../hg.pid >> "$DAEMON_PIDS"
|
||||
$ echo foo > foo
|
||||
|
@ -1,6 +1,5 @@
|
||||
$ mkdir t
|
||||
$ hg init t
|
||||
$ cd t
|
||||
$ hg init
|
||||
$ echo 0 > a
|
||||
$ echo 0 > b
|
||||
$ echo 0 > t.h
|
||||
|
@ -12,9 +12,8 @@
|
||||
> EOF
|
||||
$ HGMERGE="python ../merge"; export HGMERGE
|
||||
|
||||
$ mkdir t
|
||||
$ hg init t
|
||||
$ cd t
|
||||
$ hg init
|
||||
$ echo This is file a1 > a
|
||||
$ hg add a
|
||||
$ hg commit -m "commit #0"
|
||||
@ -49,9 +48,8 @@ no merges expected
|
||||
M b
|
||||
$ cd ..; rm -r t
|
||||
|
||||
$ mkdir t
|
||||
$ hg init t
|
||||
$ cd t
|
||||
$ hg init
|
||||
$ echo This is file a1 > a
|
||||
$ hg add a
|
||||
$ hg commit -m "commit #0"
|
||||
@ -86,9 +84,8 @@ merge of b expected
|
||||
M b
|
||||
$ cd ..; rm -r t
|
||||
|
||||
$ mkdir t
|
||||
$ hg init t
|
||||
$ cd t
|
||||
$ hg init
|
||||
$ echo This is file a1 > a
|
||||
$ hg add a
|
||||
$ hg commit -m "commit #0"
|
||||
@ -129,9 +126,8 @@ merge fails
|
||||
M b
|
||||
$ cd ..; rm -r t
|
||||
|
||||
$ mkdir t
|
||||
$ hg init t
|
||||
$ cd t
|
||||
$ hg init
|
||||
$ echo This is file a1 > a
|
||||
$ hg add a
|
||||
$ hg commit -m "commit #0"
|
||||
|
@ -1,6 +1,5 @@
|
||||
$ mkdir t
|
||||
$ hg init t
|
||||
$ cd t
|
||||
$ hg init
|
||||
$ echo This is file a1 > a
|
||||
$ hg add a
|
||||
$ hg commit -m "commit #0"
|
||||
@ -34,9 +33,8 @@
|
||||
created new head
|
||||
$ cd ..; rm -r t
|
||||
|
||||
$ mkdir t
|
||||
$ hg init t
|
||||
$ cd t
|
||||
$ hg init
|
||||
$ echo This is file a1 > a
|
||||
$ hg add a
|
||||
$ hg commit -m "commit #0"
|
||||
|
@ -4,9 +4,8 @@
|
||||
> EOF
|
||||
$ HGMERGE="python ../merge"; export HGMERGE
|
||||
|
||||
$ mkdir A1
|
||||
$ hg init A1
|
||||
$ cd A1
|
||||
$ hg init
|
||||
$ echo This is file foo1 > foo
|
||||
$ echo This is file bar1 > bar
|
||||
$ hg add foo bar
|
||||
|
@ -1,6 +1,5 @@
|
||||
$ mkdir a
|
||||
$ hg init a
|
||||
$ cd a
|
||||
$ hg init
|
||||
$ echo foo > b
|
||||
$ hg add b
|
||||
$ hg ci -m "b"
|
||||
|
@ -1,8 +1,7 @@
|
||||
$ mkdir test
|
||||
$ hg init test
|
||||
$ cd test
|
||||
|
||||
$ echo foo>foo
|
||||
$ hg init
|
||||
$ hg addremove
|
||||
adding foo
|
||||
$ hg commit -m 1
|
||||
|
@ -1,9 +1,8 @@
|
||||
$ echo "[extensions]" >> $HGRCPATH
|
||||
$ echo "graphlog=" >> $HGRCPATH
|
||||
|
||||
$ mkdir a
|
||||
$ hg init a
|
||||
$ cd a
|
||||
$ hg init
|
||||
$ echo foo > t1
|
||||
$ hg add t1
|
||||
$ hg commit -m "1"
|
||||
|
@ -1,6 +1,5 @@
|
||||
$ mkdir t
|
||||
$ hg init t
|
||||
$ cd t
|
||||
$ hg init
|
||||
|
||||
$ mkdir a
|
||||
$ echo foo > a/a
|
||||
@ -118,9 +117,8 @@
|
||||
Second scenario with two repos:
|
||||
|
||||
$ cd ..
|
||||
$ mkdir r1
|
||||
$ hg init r1
|
||||
$ cd r1
|
||||
$ hg init
|
||||
$ mkdir a
|
||||
$ echo foo > a/f
|
||||
$ hg add a
|
||||
|
@ -17,9 +17,8 @@ $4 = expected result
|
||||
|
||||
$ tm()
|
||||
> {
|
||||
> mkdir t
|
||||
> hg init t
|
||||
> cd t
|
||||
> hg init
|
||||
> echo "[merge]" >> .hg/hgrc
|
||||
> echo "followcopies = 1" >> .hg/hgrc
|
||||
>
|
||||
|
@ -1,6 +1,5 @@
|
||||
$ mkdir t
|
||||
$ hg init t
|
||||
$ cd t
|
||||
$ hg init
|
||||
$ echo a > a
|
||||
$ hg add a
|
||||
$ hg commit -m test
|
||||
|
@ -1,7 +1,6 @@
|
||||
|
||||
$ mkdir t
|
||||
$ hg init t
|
||||
$ cd t
|
||||
$ hg init
|
||||
$ echo a > a
|
||||
$ hg add a
|
||||
$ hg commit -m "test"
|
||||
|
@ -1,7 +1,6 @@
|
||||
$ mkdir test
|
||||
$ hg init test
|
||||
$ cd test
|
||||
$ echo foo>foo
|
||||
$ hg init
|
||||
$ hg addremove
|
||||
adding foo
|
||||
$ hg commit -m "1"
|
||||
|
@ -22,9 +22,8 @@ one pull
|
||||
> EOF
|
||||
$ python dumb.py 2>/dev/null &
|
||||
$ echo $! >> $DAEMON_PIDS
|
||||
$ mkdir remote
|
||||
$ hg init remote
|
||||
$ cd remote
|
||||
$ hg init
|
||||
$ echo foo > bar
|
||||
$ echo c2 > '.dotfile with spaces'
|
||||
$ hg add
|
||||
|
@ -1,14 +1,12 @@
|
||||
$ mkdir a
|
||||
$ hg init a
|
||||
$ cd a
|
||||
$ hg init
|
||||
$ echo 123 > a
|
||||
$ hg add a
|
||||
$ hg commit -m "a" -u a
|
||||
|
||||
$ cd ..
|
||||
$ mkdir b
|
||||
$ hg init b
|
||||
$ cd b
|
||||
$ hg init
|
||||
$ echo 321 > b
|
||||
$ hg add b
|
||||
$ hg commit -m "b" -u b
|
||||
|
@ -1,8 +1,7 @@
|
||||
$ HGMERGE=true; export HGMERGE
|
||||
|
||||
$ mkdir r1
|
||||
$ hg init r1
|
||||
$ cd r1
|
||||
$ hg init
|
||||
$ echo a > a
|
||||
$ hg addremove
|
||||
adding a
|
||||
|
@ -1,6 +1,5 @@
|
||||
$ mkdir t
|
||||
$ hg init t
|
||||
$ cd t
|
||||
$ hg init
|
||||
$ mkdir -p beans
|
||||
$ for b in kidney navy turtle borlotti black pinto; do
|
||||
> echo $b > beans/$b
|
||||
|
Loading…
Reference in New Issue
Block a user