tests: remove redundant mkdir
authorMartin Geisler <mg@lazybytes.net>
Tue, 19 Apr 2011 12:04:44 +0200
changeset 13956 ffb5c09ba822
parent 13954 1184bb274cb3
child 13959 141f88ae5276
tests: remove redundant mkdir There are still many tests that check that a bare 'hg init' initializes the current directory.
tests/test-archive.t
tests/test-basic.t
tests/test-clone-failure.t
tests/test-clone.t
tests/test-copy-move-merge.t
tests/test-dumprevlog.t
tests/test-flags.t
tests/test-grep.t
tests/test-hardlinks.t
tests/test-hgweb-no-path-info.t
tests/test-hgweb-no-request-uri.t
tests/test-hgweb-non-interactive.t
tests/test-incoming-outgoing.t
tests/test-inotify-dirty-dirstate.t
tests/test-locate.t
tests/test-merge1.t
tests/test-merge2.t
tests/test-merge6.t
tests/test-pull-permission.t
tests/test-pull.t
tests/test-push-warn.t
tests/test-rename-dir-merge.t
tests/test-rename-merge2.t
tests/test-requires.t
tests/test-rollback.t
tests/test-simple-update.t
tests/test-static-http.t
tests/test-unrelated-pull.t
tests/test-up-local-change.t
tests/test-walk.t
--- a/tests/test-archive.t	Mon Apr 18 20:52:08 2011 -0500
+++ b/tests/test-archive.t	Tue Apr 19 12:04:44 2011 +0200
@@ -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
--- a/tests/test-basic.t	Mon Apr 18 20:52:08 2011 -0500
+++ b/tests/test-basic.t	Tue Apr 19 12:04:44 2011 +0200
@@ -1,8 +1,7 @@
 Create a repository:
 
-  $ mkdir t
+  $ hg init t
   $ cd t
-  $ hg init
 
 Make a changeset:
 
--- a/tests/test-clone-failure.t	Mon Apr 18 20:52:08 2011 -0500
+++ b/tests/test-clone-failure.t	Tue Apr 19 12:04:44 2011 +0200
@@ -21,9 +21,8 @@
 
 Inaccessible destination
 
-  $ mkdir b
+  $ hg init b
   $ cd b
-  $ hg init
   $ hg clone . ../a
   abort: Permission denied: ../a
   [255]
@@ -44,10 +43,7 @@
 
 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
--- a/tests/test-clone.t	Mon Apr 18 20:52:08 2011 -0500
+++ b/tests/test-clone.t	Tue Apr 19 12:04:44 2011 +0200
@@ -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
--- a/tests/test-copy-move-merge.t	Mon Apr 18 20:52:08 2011 -0500
+++ b/tests/test-copy-move-merge.t	Tue Apr 19 12:04:44 2011 +0200
@@ -1,6 +1,5 @@
-  $ mkdir t
+  $ hg init t
   $ cd t
-  $ hg init
 
   $ echo 1 > a
   $ hg ci -qAm "first"
--- a/tests/test-dumprevlog.t	Mon Apr 18 20:52:08 2011 -0500
+++ b/tests/test-dumprevlog.t	Tue Apr 19 12:04:44 2011 +0200
@@ -4,9 +4,8 @@
 
 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 @@
 
 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
--- a/tests/test-flags.t	Mon Apr 18 20:52:08 2011 -0500
+++ b/tests/test-flags.t	Tue Apr 19 12:04:44 2011 +0200
@@ -1,8 +1,7 @@
   $ umask 027
-  $ mkdir test1
+
+  $ hg init test1
   $ cd test1
-
-  $ hg init
   $ 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
+
+  $ hg init test2
   $ cd test2
-
-  $ hg init
   $ hg pull ../test1
   pulling from ../test1
   requesting all changes
--- a/tests/test-grep.t	Mon Apr 18 20:52:08 2011 -0500
+++ b/tests/test-grep.t	Tue Apr 19 12:04:44 2011 +0200
@@ -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'
--- a/tests/test-hardlinks.t	Mon Apr 18 20:52:08 2011 -0500
+++ b/tests/test-hardlinks.t	Tue Apr 19 12:04:44 2011 +0200
@@ -25,9 +25,8 @@
 
 Prepare repo r1:
 
-  $ mkdir r1
+  $ hg init r1
   $ cd r1
-  $ hg init
 
   $ echo c1 > f1
   $ hg add f1
--- a/tests/test-hgweb-no-path-info.t	Mon Apr 18 20:52:08 2011 -0500
+++ b/tests/test-hgweb-no-path-info.t	Tue Apr 19 12:04:44 2011 +0200
@@ -2,9 +2,8 @@
 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"
--- a/tests/test-hgweb-no-request-uri.t	Mon Apr 18 20:52:08 2011 -0500
+++ b/tests/test-hgweb-no-request-uri.t	Tue Apr 19 12:04:44 2011 +0200
@@ -2,9 +2,8 @@
 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"
--- a/tests/test-hgweb-non-interactive.t	Mon Apr 18 20:52:08 2011 -0500
+++ b/tests/test-hgweb-non-interactive.t	Tue Apr 19 12:04:44 2011 +0200
@@ -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"
--- a/tests/test-incoming-outgoing.t	Mon Apr 18 20:52:08 2011 -0500
+++ b/tests/test-incoming-outgoing.t	Tue Apr 19 12:04:44 2011 +0200
@@ -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
--- a/tests/test-inotify-dirty-dirstate.t	Mon Apr 18 20:52:08 2011 -0500
+++ b/tests/test-inotify-dirty-dirstate.t	Tue Apr 19 12:04:44 2011 +0200
@@ -7,8 +7,7 @@
 
 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
--- a/tests/test-locate.t	Mon Apr 18 20:52:08 2011 -0500
+++ b/tests/test-locate.t	Tue Apr 19 12:04:44 2011 +0200
@@ -1,6 +1,5 @@
-  $ mkdir t
+  $ hg init t
   $ cd t
-  $ hg init
   $ echo 0 > a
   $ echo 0 > b
   $ echo 0 > t.h
--- a/tests/test-merge1.t	Mon Apr 18 20:52:08 2011 -0500
+++ b/tests/test-merge1.t	Tue Apr 19 12:04:44 2011 +0200
@@ -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 @@
   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 @@
   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 @@
   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"
--- a/tests/test-merge2.t	Mon Apr 18 20:52:08 2011 -0500
+++ b/tests/test-merge2.t	Tue Apr 19 12:04:44 2011 +0200
@@ -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"
--- a/tests/test-merge6.t	Mon Apr 18 20:52:08 2011 -0500
+++ b/tests/test-merge6.t	Tue Apr 19 12:04:44 2011 +0200
@@ -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
--- a/tests/test-pull-permission.t	Mon Apr 18 20:52:08 2011 -0500
+++ b/tests/test-pull-permission.t	Tue Apr 19 12:04:44 2011 +0200
@@ -1,6 +1,5 @@
-  $ mkdir a
+  $ hg init a
   $ cd a
-  $ hg init
   $ echo foo > b
   $ hg add b
   $ hg ci -m "b"
--- a/tests/test-pull.t	Mon Apr 18 20:52:08 2011 -0500
+++ b/tests/test-pull.t	Tue Apr 19 12:04:44 2011 +0200
@@ -1,8 +1,7 @@
-  $ mkdir test
+  $ hg init test
   $ cd test
 
   $ echo foo>foo
-  $ hg init
   $ hg addremove
   adding foo
   $ hg commit -m 1
--- a/tests/test-push-warn.t	Mon Apr 18 20:52:08 2011 -0500
+++ b/tests/test-push-warn.t	Tue Apr 19 12:04:44 2011 +0200
@@ -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"
--- a/tests/test-rename-dir-merge.t	Mon Apr 18 20:52:08 2011 -0500
+++ b/tests/test-rename-dir-merge.t	Tue Apr 19 12:04:44 2011 +0200
@@ -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
--- a/tests/test-rename-merge2.t	Mon Apr 18 20:52:08 2011 -0500
+++ b/tests/test-rename-merge2.t	Tue Apr 19 12:04:44 2011 +0200
@@ -17,9 +17,8 @@
 
   $ tm()
   > {
-  >     mkdir t
+  >     hg init t
   >     cd t
-  >     hg init
   >     echo "[merge]" >> .hg/hgrc
   >     echo "followcopies = 1" >> .hg/hgrc
   > 
--- a/tests/test-requires.t	Mon Apr 18 20:52:08 2011 -0500
+++ b/tests/test-requires.t	Tue Apr 19 12:04:44 2011 +0200
@@ -1,6 +1,5 @@
-  $ mkdir t
+  $ hg init t
   $ cd t
-  $ hg init
   $ echo a > a
   $ hg add a
   $ hg commit -m test
--- a/tests/test-rollback.t	Mon Apr 18 20:52:08 2011 -0500
+++ b/tests/test-rollback.t	Tue Apr 19 12:04:44 2011 +0200
@@ -1,7 +1,6 @@
 
-  $ mkdir t
+  $ hg init t
   $ cd t
-  $ hg init
   $ echo a > a
   $ hg add a
   $ hg commit -m "test"
--- a/tests/test-simple-update.t	Mon Apr 18 20:52:08 2011 -0500
+++ b/tests/test-simple-update.t	Tue Apr 19 12:04:44 2011 +0200
@@ -1,7 +1,6 @@
-  $ mkdir test
+  $ hg init test
   $ cd test
   $ echo foo>foo
-  $ hg init
   $ hg addremove
   adding foo
   $ hg commit -m "1"
--- a/tests/test-static-http.t	Mon Apr 18 20:52:08 2011 -0500
+++ b/tests/test-static-http.t	Tue Apr 19 12:04:44 2011 +0200
@@ -22,9 +22,8 @@
   > 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
--- a/tests/test-unrelated-pull.t	Mon Apr 18 20:52:08 2011 -0500
+++ b/tests/test-unrelated-pull.t	Tue Apr 19 12:04:44 2011 +0200
@@ -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
--- a/tests/test-up-local-change.t	Mon Apr 18 20:52:08 2011 -0500
+++ b/tests/test-up-local-change.t	Tue Apr 19 12:04:44 2011 +0200
@@ -1,8 +1,7 @@
   $ HGMERGE=true; export HGMERGE
 
-  $ mkdir r1
+  $ hg init r1
   $ cd r1
-  $ hg init
   $ echo a > a
   $ hg addremove
   adding a
--- a/tests/test-walk.t	Mon Apr 18 20:52:08 2011 -0500
+++ b/tests/test-walk.t	Tue Apr 19 12:04:44 2011 +0200
@@ -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