annotate tests/test-init.t @ 13955:86b5cc1e8be8 stable

help config: explain that config files do not exist by default Inspired by critique given on StackOverflow where a user writes: I can have a good guess at what "%USERPROFILE%" might signify but none of the files listed in the "hg help config" output exist after running the installer. Previous experience would suggest that missing files mean something somewhere has gone seriously wrong. http://stackoverflow.com/questions/2329023/2351139#2351139
author Martin Geisler <mg@lazybytes.net>
date Mon, 18 Apr 2011 13:57:22 +0200
parents 1b546140b85e
children 3f6a4579f803
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12328
b63f6422d2a7 tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
1 This test tries to exercise the ssh functionality with a dummy script
2599
e4b5e48052c6 Added tests for local and remote init.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
2
11786
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
3 $ cat <<EOF > dummyssh
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
4 > import sys
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
5 > import os
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
6 >
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
7 > os.chdir(os.path.dirname(sys.argv[0]))
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
8 > if sys.argv[1] != "user@dummy":
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
9 > sys.exit(-1)
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
10 >
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
11 > if not os.path.exists("dummyssh"):
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
12 > sys.exit(-1)
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
13 >
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
14 > log = open("dummylog", "ab")
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
15 > log.write("Got arguments")
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
16 > for i, arg in enumerate(sys.argv[1:]):
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
17 > log.write(" %d:%s" % (i+1, arg))
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
18 > log.write("\n")
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
19 > log.close()
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
20 > r = os.system(sys.argv[2])
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
21 > sys.exit(bool(r))
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
22 > EOF
2599
e4b5e48052c6 Added tests for local and remote init.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
23
11786
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
24 $ checknewrepo()
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
25 > {
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
26 > name=$1
12584
fb24b491e06a init: expand destination url as a configured paths
Mads Kiilerich <mads@kiilerich.com>
parents: 12328
diff changeset
27 > if [ -d "$name"/.hg/store ]; then
11786
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
28 > echo store created
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
29 > fi
12584
fb24b491e06a init: expand destination url as a configured paths
Mads Kiilerich <mads@kiilerich.com>
parents: 12328
diff changeset
30 > if [ -f "$name"/.hg/00changelog.i ]; then
11786
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
31 > echo 00changelog.i created
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
32 > fi
12584
fb24b491e06a init: expand destination url as a configured paths
Mads Kiilerich <mads@kiilerich.com>
parents: 12328
diff changeset
33 > cat "$name"/.hg/requires
11786
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
34 > }
2599
e4b5e48052c6 Added tests for local and remote init.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
35
11786
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
36 creating 'local'
4166
c0271aba6abe small fixes for the parent patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3713
diff changeset
37
11786
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
38 $ hg init local
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
39 $ checknewrepo local
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
40 store created
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
41 00changelog.i created
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
42 revlogv1
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
43 store
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
44 fncache
12687
34d8247a4595 store: encode first period or space in filenames (issue1713)
Adrian Buehlmann <adrian@cadifra.com>
parents: 12584
diff changeset
45 dotencode
11786
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
46 $ echo this > local/foo
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11883
diff changeset
47 $ hg ci --cwd local -A -m "init"
11786
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
48 adding foo
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
49
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
50 creating repo with format.usestore=false
4166
c0271aba6abe small fixes for the parent patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3713
diff changeset
51
11786
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
52 $ hg --config format.usestore=false init old
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
53 $ checknewrepo old
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
54 revlogv1
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
55
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
56 creating repo with format.usefncache=false
4166
c0271aba6abe small fixes for the parent patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3713
diff changeset
57
11786
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
58 $ hg --config format.usefncache=false init old2
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
59 $ checknewrepo old2
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
60 store created
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
61 00changelog.i created
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
62 revlogv1
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
63 store
4166
c0271aba6abe small fixes for the parent patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3713
diff changeset
64
12712
1b546140b85e tests: add testcase for --config format.dotencode=false
Adrian Buehlmann <adrian@cadifra.com>
parents: 12687
diff changeset
65 creating repo with format.dotencode=false
1b546140b85e tests: add testcase for --config format.dotencode=false
Adrian Buehlmann <adrian@cadifra.com>
parents: 12687
diff changeset
66
1b546140b85e tests: add testcase for --config format.dotencode=false
Adrian Buehlmann <adrian@cadifra.com>
parents: 12687
diff changeset
67 $ hg --config format.dotencode=false init old3
1b546140b85e tests: add testcase for --config format.dotencode=false
Adrian Buehlmann <adrian@cadifra.com>
parents: 12687
diff changeset
68 $ checknewrepo old3
1b546140b85e tests: add testcase for --config format.dotencode=false
Adrian Buehlmann <adrian@cadifra.com>
parents: 12687
diff changeset
69 store created
1b546140b85e tests: add testcase for --config format.dotencode=false
Adrian Buehlmann <adrian@cadifra.com>
parents: 12687
diff changeset
70 00changelog.i created
1b546140b85e tests: add testcase for --config format.dotencode=false
Adrian Buehlmann <adrian@cadifra.com>
parents: 12687
diff changeset
71 revlogv1
1b546140b85e tests: add testcase for --config format.dotencode=false
Adrian Buehlmann <adrian@cadifra.com>
parents: 12687
diff changeset
72 store
1b546140b85e tests: add testcase for --config format.dotencode=false
Adrian Buehlmann <adrian@cadifra.com>
parents: 12687
diff changeset
73 fncache
1b546140b85e tests: add testcase for --config format.dotencode=false
Adrian Buehlmann <adrian@cadifra.com>
parents: 12687
diff changeset
74
11786
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
75 test failure
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
76
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
77 $ hg init local
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
78 abort: repository local already exists!
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
79 [255]
11786
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
80
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
81 init+push to remote2
2599
e4b5e48052c6 Added tests for local and remote init.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
82
11786
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
83 $ hg init -e "python ./dummyssh" ssh://user@dummy/remote2
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
84 $ hg incoming -R remote2 local
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
85 comparing with local
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11883
diff changeset
86 changeset: 0:08b9e9f63b32
11786
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
87 tag: tip
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
88 user: test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11883
diff changeset
89 date: Thu Jan 01 00:00:00 1970 +0000
11786
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
90 summary: init
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
91
4166
c0271aba6abe small fixes for the parent patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3713
diff changeset
92
11786
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
93 $ hg push -R local -e "python ./dummyssh" ssh://user@dummy/remote2
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
94 pushing to ssh://user@dummy/remote2
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
95 searching for changes
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
96 remote: adding changesets
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
97 remote: adding manifests
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
98 remote: adding file changes
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
99 remote: added 1 changesets with 1 changes to 1 files
7249
671b3e1eac2e test-init: add test with format.usefncache=false
Adrian Buehlmann <adrian@cadifra.com>
parents: 4297
diff changeset
100
11786
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
101 clone to remote1
3037
3acb76f0124d clone: simplifying dest repo creation
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 2599
diff changeset
102
11786
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
103 $ hg clone -e "python ./dummyssh" local ssh://user@dummy/remote1
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
104 searching for changes
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
105 remote: adding changesets
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
106 remote: adding manifests
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
107 remote: adding file changes
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
108 remote: added 1 changesets with 1 changes to 1 files
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
109
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
110 init to existing repo
2599
e4b5e48052c6 Added tests for local and remote init.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
111
11786
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
112 $ hg init -e "python ./dummyssh" ssh://user@dummy/remote1
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
113 abort: repository remote1 already exists!
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
114 abort: could not create remote repo!
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
115 [255]
11786
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
116
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
117 clone to existing repo
2599
e4b5e48052c6 Added tests for local and remote init.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
118
11786
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
119 $ hg clone -e "python ./dummyssh" local ssh://user@dummy/remote1
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
120 abort: repository remote1 already exists!
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
121 abort: could not create remote repo!
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
122 [255]
11786
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
123
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
124 output of dummyssh
3037
3acb76f0124d clone: simplifying dest repo creation
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 2599
diff changeset
125
11786
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
126 $ cat dummylog
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
127 Got arguments 1:user@dummy 2:hg init remote2
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
128 Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
129 Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
130 Got arguments 1:user@dummy 2:hg init remote1
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
131 Got arguments 1:user@dummy 2:hg -R remote1 serve --stdio
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
132 Got arguments 1:user@dummy 2:hg init remote1
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
133 Got arguments 1:user@dummy 2:hg init remote1
3037
3acb76f0124d clone: simplifying dest repo creation
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 2599
diff changeset
134
11786
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
135 comparing repositories
2599
e4b5e48052c6 Added tests for local and remote init.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
136
11786
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
137 $ hg tip -q -R local
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11883
diff changeset
138 0:08b9e9f63b32
11786
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
139 $ hg tip -q -R remote1
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11883
diff changeset
140 0:08b9e9f63b32
11786
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
141 $ hg tip -q -R remote2
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11883
diff changeset
142 0:08b9e9f63b32
11786
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
143
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
144 check names for repositories (clashes with URL schemes, special chars)
2599
e4b5e48052c6 Added tests for local and remote init.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
145
11786
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
146 $ for i in bundle file hg http https old-http ssh static-http " " "with space"; do
11883
01e04df696e3 test-init: replace 'echo -n' with 'printf'
Martin Geisler <mg@lazybytes.net>
parents: 11786
diff changeset
147 > printf "hg init \"$i\"... "
11786
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
148 > hg init "$i"
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
149 > test -d "$i" -a -d "$i/.hg" && echo "ok" || echo "failed"
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
150 > done
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
151 hg init "bundle"... ok
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
152 hg init "file"... ok
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
153 hg init "hg"... ok
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
154 hg init "http"... ok
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
155 hg init "https"... ok
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
156 hg init "old-http"... ok
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
157 hg init "ssh"... ok
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
158 hg init "static-http"... ok
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
159 hg init " "... ok
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
160 hg init "with space"... ok
2599
e4b5e48052c6 Added tests for local and remote init.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
161
11786
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
162 creating 'local/sub/repo'
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
163
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
164 $ hg init local/sub/repo
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
165 $ checknewrepo local/sub/repo
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
166 store created
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
167 00changelog.i created
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
168 revlogv1
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
169 store
38e3f973a4f3 tests: unify test-init
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11640
diff changeset
170 fncache
12687
34d8247a4595 store: encode first period or space in filenames (issue1713)
Adrian Buehlmann <adrian@cadifra.com>
parents: 12584
diff changeset
171 dotencode
12584
fb24b491e06a init: expand destination url as a configured paths
Mads Kiilerich <mads@kiilerich.com>
parents: 12328
diff changeset
172
fb24b491e06a init: expand destination url as a configured paths
Mads Kiilerich <mads@kiilerich.com>
parents: 12328
diff changeset
173 prepare test of init of url configured from paths
fb24b491e06a init: expand destination url as a configured paths
Mads Kiilerich <mads@kiilerich.com>
parents: 12328
diff changeset
174
fb24b491e06a init: expand destination url as a configured paths
Mads Kiilerich <mads@kiilerich.com>
parents: 12328
diff changeset
175 $ echo '[paths]' >> $HGRCPATH
fb24b491e06a init: expand destination url as a configured paths
Mads Kiilerich <mads@kiilerich.com>
parents: 12328
diff changeset
176 $ echo "somewhere = `pwd`/url from paths" >> $HGRCPATH
fb24b491e06a init: expand destination url as a configured paths
Mads Kiilerich <mads@kiilerich.com>
parents: 12328
diff changeset
177 $ echo "elsewhere = `pwd`/another paths url" >> $HGRCPATH
fb24b491e06a init: expand destination url as a configured paths
Mads Kiilerich <mads@kiilerich.com>
parents: 12328
diff changeset
178
fb24b491e06a init: expand destination url as a configured paths
Mads Kiilerich <mads@kiilerich.com>
parents: 12328
diff changeset
179 init should (for consistency with clone) expand the url
fb24b491e06a init: expand destination url as a configured paths
Mads Kiilerich <mads@kiilerich.com>
parents: 12328
diff changeset
180
fb24b491e06a init: expand destination url as a configured paths
Mads Kiilerich <mads@kiilerich.com>
parents: 12328
diff changeset
181 $ hg init somewhere
fb24b491e06a init: expand destination url as a configured paths
Mads Kiilerich <mads@kiilerich.com>
parents: 12328
diff changeset
182 $ checknewrepo "url from paths"
fb24b491e06a init: expand destination url as a configured paths
Mads Kiilerich <mads@kiilerich.com>
parents: 12328
diff changeset
183 store created
fb24b491e06a init: expand destination url as a configured paths
Mads Kiilerich <mads@kiilerich.com>
parents: 12328
diff changeset
184 00changelog.i created
fb24b491e06a init: expand destination url as a configured paths
Mads Kiilerich <mads@kiilerich.com>
parents: 12328
diff changeset
185 revlogv1
fb24b491e06a init: expand destination url as a configured paths
Mads Kiilerich <mads@kiilerich.com>
parents: 12328
diff changeset
186 store
fb24b491e06a init: expand destination url as a configured paths
Mads Kiilerich <mads@kiilerich.com>
parents: 12328
diff changeset
187 fncache
12687
34d8247a4595 store: encode first period or space in filenames (issue1713)
Adrian Buehlmann <adrian@cadifra.com>
parents: 12584
diff changeset
188 dotencode
12584
fb24b491e06a init: expand destination url as a configured paths
Mads Kiilerich <mads@kiilerich.com>
parents: 12328
diff changeset
189
fb24b491e06a init: expand destination url as a configured paths
Mads Kiilerich <mads@kiilerich.com>
parents: 12328
diff changeset
190 verify that clone also expand urls
fb24b491e06a init: expand destination url as a configured paths
Mads Kiilerich <mads@kiilerich.com>
parents: 12328
diff changeset
191
fb24b491e06a init: expand destination url as a configured paths
Mads Kiilerich <mads@kiilerich.com>
parents: 12328
diff changeset
192 $ hg clone somewhere elsewhere
fb24b491e06a init: expand destination url as a configured paths
Mads Kiilerich <mads@kiilerich.com>
parents: 12328
diff changeset
193 updating to branch default
fb24b491e06a init: expand destination url as a configured paths
Mads Kiilerich <mads@kiilerich.com>
parents: 12328
diff changeset
194 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
fb24b491e06a init: expand destination url as a configured paths
Mads Kiilerich <mads@kiilerich.com>
parents: 12328
diff changeset
195 $ checknewrepo "another paths url"
fb24b491e06a init: expand destination url as a configured paths
Mads Kiilerich <mads@kiilerich.com>
parents: 12328
diff changeset
196 store created
fb24b491e06a init: expand destination url as a configured paths
Mads Kiilerich <mads@kiilerich.com>
parents: 12328
diff changeset
197 00changelog.i created
fb24b491e06a init: expand destination url as a configured paths
Mads Kiilerich <mads@kiilerich.com>
parents: 12328
diff changeset
198 revlogv1
fb24b491e06a init: expand destination url as a configured paths
Mads Kiilerich <mads@kiilerich.com>
parents: 12328
diff changeset
199 store
fb24b491e06a init: expand destination url as a configured paths
Mads Kiilerich <mads@kiilerich.com>
parents: 12328
diff changeset
200 fncache
12687
34d8247a4595 store: encode first period or space in filenames (issue1713)
Adrian Buehlmann <adrian@cadifra.com>
parents: 12584
diff changeset
201 dotencode