Mercurial > public > mercurial-scm > hg
diff tests/test-static-http @ 11066:26abd91d9e84 stable
static-http: mimic more closely localrepo (issue2164: allow clone -r )
* httprangereader: name, __iter__ and close are needed to mimic file object
* static-http opener:
- disallow write/append modes
- add (unused) atomictemp parameter
* static-http repo:
- root attribute is needed for localrepo.dirstate()
- _branch* attributes are required for commitctx and branchmap calls
* tags: force repo.opener.__iter__ call earlier to force httprangereader
to try to read the cache early, to avoid raising IOError later.
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Mon, 26 Apr 2010 20:13:14 +0900 |
parents | ace3cf2bc991 |
children | 4c94b6d0fb1c |
line wrap: on
line diff
--- a/tests/test-static-http Fri Apr 30 18:11:56 2010 +0200 +++ b/tests/test-static-http Mon Apr 26 20:13:14 2010 +0900 @@ -43,6 +43,8 @@ cd ../remote echo baz > quux hg commit -A -mtest2 -d '100000000 0' +# check for HTTP opener failures when cachefile does not exist +rm .hg/*.cache cd ../local echo '[hooks]' >> .hg/hgrc @@ -55,8 +57,12 @@ hg commit -m"test" -d "100000000 0" hg push | sed -e "s,:$HGPORT/,:\$HGPORT/," +echo '% trying clone -r' +cd .. +hg clone -r donotexist static-http://localhost:$HGPORT/remote local0 | sed -e "s,:$HGPORT/,:\$HGPORT/," +hg clone -r 0 static-http://localhost:$HGPORT/remote local0 | sed -e "s,:$HGPORT/,:\$HGPORT/," + echo '% test with "/" URI (issue 747)' -cd .. hg init echo a > a hg add a