mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 23:38:50 +03:00
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.
This commit is contained in:
parent
d27df0bd40
commit
e24ddf937d
@ -224,6 +224,10 @@ def instance(ui, path, create):
|
||||
# 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
|
||||
|
Loading…
Reference in New Issue
Block a user