Show More
@@ -2378,7 +2378,7 b' def init(ui, dest=".", **opts):' | |||
|
2378 | 2378 | |
|
2379 | 2379 | Returns 0 on success. |
|
2380 | 2380 | """ |
|
2381 | hg.repository(hg.remoteui(ui, opts), dest, create=1) | |
|
2381 | hg.repository(hg.remoteui(ui, opts), ui.expandpath(dest), create=1) | |
|
2382 | 2382 | |
|
2383 | 2383 | def locate(ui, repo, *pats, **opts): |
|
2384 | 2384 | """locate files matching specific patterns |
@@ -24,13 +24,13 b' This test tries to exercise the ssh func' | |||
|
24 | 24 | $ checknewrepo() |
|
25 | 25 | > { |
|
26 | 26 | > name=$1 |
|
27 | > if [ -d $name/.hg/store ]; then | |
|
27 | > if [ -d "$name"/.hg/store ]; then | |
|
28 | 28 | > echo store created |
|
29 | 29 | > fi |
|
30 | > if [ -f $name/.hg/00changelog.i ]; then | |
|
30 | > if [ -f "$name"/.hg/00changelog.i ]; then | |
|
31 | 31 | > echo 00changelog.i created |
|
32 | 32 | > fi |
|
33 | > cat $name/.hg/requires | |
|
33 | > cat "$name"/.hg/requires | |
|
34 | 34 | > } |
|
35 | 35 | |
|
36 | 36 | creating 'local' |
@@ -157,3 +157,31 b" creating 'local/sub/repo'" | |||
|
157 | 157 | revlogv1 |
|
158 | 158 | store |
|
159 | 159 | fncache |
|
160 | ||
|
161 | prepare test of init of url configured from paths | |
|
162 | ||
|
163 | $ echo '[paths]' >> $HGRCPATH | |
|
164 | $ echo "somewhere = `pwd`/url from paths" >> $HGRCPATH | |
|
165 | $ echo "elsewhere = `pwd`/another paths url" >> $HGRCPATH | |
|
166 | ||
|
167 | init should (for consistency with clone) expand the url | |
|
168 | ||
|
169 | $ hg init somewhere | |
|
170 | $ checknewrepo "url from paths" | |
|
171 | store created | |
|
172 | 00changelog.i created | |
|
173 | revlogv1 | |
|
174 | store | |
|
175 | fncache | |
|
176 | ||
|
177 | verify that clone also expand urls | |
|
178 | ||
|
179 | $ hg clone somewhere elsewhere | |
|
180 | updating to branch default | |
|
181 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
182 | $ checknewrepo "another paths url" | |
|
183 | store created | |
|
184 | 00changelog.i created | |
|
185 | revlogv1 | |
|
186 | store | |
|
187 | fncache |
General Comments 0
You need to be logged in to leave comments.
Login now