cubicweb-mercurial-server #3099417 repository creation hook does not handle RepoError properly [validation pending]

In the code below (MercurialServerRepositoryCreation):

try:
     commands.init(ui.ui(), uri)
     self.warning('init-ed repository %s', uri)
 except error.RepoError:
     self.warning('repo %s seems to be already there: cannot init', uri)

Quite a few things can trigger RepoError (e.g. SSH connection problem). So just assuming the repository already exists (and passing) is a bit presumptuous.

We need to be sure that the repository actually exists.

prioritynormal
typebug
done in0.4.0
load1.000
load left0.000
closed by#8b18f87b9f72 Use mercurial-server SSH API for remote repository creation when applicable, #943b613be194 [hooks] Improve error handling on hg init (closes #3099417)
patch[hooks] Improve error handling on hg init (closes #3099417) [applied]