Mercurial > hg-stable
changeset 14148:cc9366a3751b
httprepo: use the original exception after falling back to static-http failed
Before the fine exception handling in httprepo was never shown.
The static-http exception will now only be shown when static-http is requested
explicitly.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Mon, 07 Mar 2011 22:50:55 +0100 |
parents | 617483af1cc0 |
children | 091c86a77d19 |
files | mercurial/httprepo.py |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/httprepo.py Sun May 01 15:49:13 2011 +0200 +++ b/mercurial/httprepo.py Mon Mar 07 22:50:55 2011 +0100 @@ -224,6 +224,10 @@ # No luck, try older compatibility check. inst.between([(nullid, nullid)]) return inst - except error.RepoError: - ui.note('(falling back to static-http)\n') - return statichttprepo.instance(ui, "static-" + path, create) + except error.RepoError, httpexception: + try: + r = statichttprepo.instance(ui, "static-" + path, create) + ui.note('(falling back to static-http)\n') + return r + except error.RepoError: + raise httpexception # use the original http RepoError instead