##// END OF EJS Templates
tests: eliminate daemon race in test-bad-pull
tests: eliminate daemon race in test-bad-pull

File last commit:

r15622:86fc364c default
r16296:4343d522 stable
Show More
test-init.t
196 lines | 4.6 KiB | text/troff | Tads3Lexer
Mads Kiilerich
tests: use 'hghave no-windows' to avoid testing reserved file names on windows
r15444 $ "$TESTDIR/hghave" no-windows || exit 80
Matt Mackall
tests: fix a bunch of pointless #s in unified tests
r12328 This test tries to exercise the ssh functionality with a dummy script
Nicolas Dumazet
tests: unify test-init
r11786
$ checknewrepo()
> {
> name=$1
Mads Kiilerich
init: expand destination url as a configured paths...
r12584 > if [ -d "$name"/.hg/store ]; then
Nicolas Dumazet
tests: unify test-init
r11786 > echo store created
> fi
Mads Kiilerich
init: expand destination url as a configured paths...
r12584 > if [ -f "$name"/.hg/00changelog.i ]; then
Nicolas Dumazet
tests: unify test-init
r11786 > echo 00changelog.i created
> fi
Mads Kiilerich
init: expand destination url as a configured paths...
r12584 > cat "$name"/.hg/requires
Nicolas Dumazet
tests: unify test-init
r11786 > }
creating 'local'
$ hg init local
$ checknewrepo local
store created
00changelog.i created
revlogv1
Andrew Pritchard
localrepo: make requirements attribute of newly-created repos contain a set...
r14905 fncache
Nicolas Dumazet
tests: unify test-init
r11786 store
Adrian Buehlmann
store: encode first period or space in filenames (issue1713)...
r12687 dotencode
Nicolas Dumazet
tests: unify test-init
r11786 $ echo this > local/foo
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg ci --cwd local -A -m "init"
Nicolas Dumazet
tests: unify test-init
r11786 adding foo
creating repo with format.usestore=false
$ hg --config format.usestore=false init old
$ checknewrepo old
revlogv1
creating repo with format.usefncache=false
$ hg --config format.usefncache=false init old2
$ checknewrepo old2
store created
00changelog.i created
revlogv1
store
Adrian Buehlmann
tests: add testcase for --config format.dotencode=false
r12712 creating repo with format.dotencode=false
$ hg --config format.dotencode=false init old3
$ checknewrepo old3
store created
00changelog.i created
revlogv1
Andrew Pritchard
localrepo: make requirements attribute of newly-created repos contain a set...
r14905 fncache
Adrian Buehlmann
tests: add testcase for --config format.dotencode=false
r12712 store
Nicolas Dumazet
tests: unify test-init
r11786 test failure
$ hg init local
abort: repository local already exists!
Matt Mackall
tests: add exit codes to unified tests
r12316 [255]
Nicolas Dumazet
tests: unify test-init
r11786
init+push to remote2
Mads Kiilerich
tests: share dummyssh
r14186 $ hg init -e "python $TESTDIR/dummyssh" ssh://user@dummy/remote2
Nicolas Dumazet
tests: unify test-init
r11786 $ hg incoming -R remote2 local
comparing with local
Martin Geisler
tests: remove unneeded -d flags...
r12156 changeset: 0:08b9e9f63b32
Nicolas Dumazet
tests: unify test-init
r11786 tag: tip
user: test
Martin Geisler
tests: remove unneeded -d flags...
r12156 date: Thu Jan 01 00:00:00 1970 +0000
Nicolas Dumazet
tests: unify test-init
r11786 summary: init
Mads Kiilerich
tests: share dummyssh
r14186 $ hg push -R local -e "python $TESTDIR/dummyssh" ssh://user@dummy/remote2
Nicolas Dumazet
tests: unify test-init
r11786 pushing to ssh://user@dummy/remote2
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 1 changes to 1 files
clone to remote1
Mads Kiilerich
tests: share dummyssh
r14186 $ hg clone -e "python $TESTDIR/dummyssh" local ssh://user@dummy/remote1
Nicolas Dumazet
tests: unify test-init
r11786 searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 1 changes to 1 files
init to existing repo
Mads Kiilerich
tests: share dummyssh
r14186 $ hg init -e "python $TESTDIR/dummyssh" ssh://user@dummy/remote1
Nicolas Dumazet
tests: unify test-init
r11786 abort: repository remote1 already exists!
abort: could not create remote repo!
Matt Mackall
tests: add exit codes to unified tests
r12316 [255]
Nicolas Dumazet
tests: unify test-init
r11786
clone to existing repo
Mads Kiilerich
tests: share dummyssh
r14186 $ hg clone -e "python $TESTDIR/dummyssh" local ssh://user@dummy/remote1
Nicolas Dumazet
tests: unify test-init
r11786 abort: repository remote1 already exists!
abort: could not create remote repo!
Matt Mackall
tests: add exit codes to unified tests
r12316 [255]
Nicolas Dumazet
tests: unify test-init
r11786
output of dummyssh
$ cat dummylog
Mads Kiilerich
sshrepo: don't quote obviously safe strings (issue2983)...
r15622 Got arguments 1:user@dummy 2:hg init remote2
Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio
Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio
Got arguments 1:user@dummy 2:hg init remote1
Got arguments 1:user@dummy 2:hg -R remote1 serve --stdio
Got arguments 1:user@dummy 2:hg init remote1
Got arguments 1:user@dummy 2:hg init remote1
Nicolas Dumazet
tests: unify test-init
r11786
comparing repositories
$ hg tip -q -R local
Martin Geisler
tests: remove unneeded -d flags...
r12156 0:08b9e9f63b32
Nicolas Dumazet
tests: unify test-init
r11786 $ hg tip -q -R remote1
Martin Geisler
tests: remove unneeded -d flags...
r12156 0:08b9e9f63b32
Nicolas Dumazet
tests: unify test-init
r11786 $ hg tip -q -R remote2
Martin Geisler
tests: remove unneeded -d flags...
r12156 0:08b9e9f63b32
Nicolas Dumazet
tests: unify test-init
r11786
check names for repositories (clashes with URL schemes, special chars)
$ for i in bundle file hg http https old-http ssh static-http " " "with space"; do
Martin Geisler
test-init: replace 'echo -n' with 'printf'...
r11883 > printf "hg init \"$i\"... "
Nicolas Dumazet
tests: unify test-init
r11786 > hg init "$i"
> test -d "$i" -a -d "$i/.hg" && echo "ok" || echo "failed"
> done
hg init "bundle"... ok
hg init "file"... ok
hg init "hg"... ok
hg init "http"... ok
hg init "https"... ok
hg init "old-http"... ok
hg init "ssh"... ok
hg init "static-http"... ok
hg init " "... ok
hg init "with space"... ok
creating 'local/sub/repo'
$ hg init local/sub/repo
$ checknewrepo local/sub/repo
store created
00changelog.i created
revlogv1
Andrew Pritchard
localrepo: make requirements attribute of newly-created repos contain a set...
r14905 fncache
Nicolas Dumazet
tests: unify test-init
r11786 store
Adrian Buehlmann
store: encode first period or space in filenames (issue1713)...
r12687 dotencode
Mads Kiilerich
init: expand destination url as a configured paths...
r12584
prepare test of init of url configured from paths
$ echo '[paths]' >> $HGRCPATH
$ echo "somewhere = `pwd`/url from paths" >> $HGRCPATH
$ echo "elsewhere = `pwd`/another paths url" >> $HGRCPATH
init should (for consistency with clone) expand the url
$ hg init somewhere
$ checknewrepo "url from paths"
store created
00changelog.i created
revlogv1
Andrew Pritchard
localrepo: make requirements attribute of newly-created repos contain a set...
r14905 fncache
Mads Kiilerich
init: expand destination url as a configured paths...
r12584 store
Adrian Buehlmann
store: encode first period or space in filenames (issue1713)...
r12687 dotencode
Mads Kiilerich
init: expand destination url as a configured paths...
r12584
verify that clone also expand urls
$ hg clone somewhere elsewhere
updating to branch default
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ checknewrepo "another paths url"
store created
00changelog.i created
revlogv1
Andrew Pritchard
localrepo: make requirements attribute of newly-created repos contain a set...
r14905 fncache
Mads Kiilerich
init: expand destination url as a configured paths...
r12584 store
Adrian Buehlmann
store: encode first period or space in filenames (issue1713)...
r12687 dotencode
David Soria Parra
hg: add support for cloning bookmarks
r13604
clone bookmarks
$ hg -R local bookmark test
$ hg -R local bookmarks
* test 0:08b9e9f63b32
Mads Kiilerich
tests: share dummyssh
r14186 $ hg clone -e "python $TESTDIR/dummyssh" local ssh://user@dummy/remote-bookmarks
David Soria Parra
hg: add support for cloning bookmarks
r13604 searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 1 changes to 1 files
$ hg -R remote-bookmarks bookmarks
test 0:08b9e9f63b32