##// END OF EJS Templates
hgweb: extract app factory...
Yuya Nishihara -
r30508:9195bc4c default
parent child Browse files
Show More
@@ -115,11 +115,14 b' def createservice(ui, repo, opts):'
115 for u in alluis:
115 for u in alluis:
116 u.setconfig("web", o, val, 'serve')
116 u.setconfig("web", o, val, 'serve')
117
117
118 app = createapp(baseui, repo, webconf)
119 return httpservice(servui, app, opts)
120
121 def createapp(baseui, repo, webconf):
118 if webconf:
122 if webconf:
119 app = hgwebdir_mod.hgwebdir(webconf, baseui=baseui)
123 return hgwebdir_mod.hgwebdir(webconf, baseui=baseui)
120 else:
124 else:
121 if not repo:
125 if not repo:
122 raise error.RepoError(_("there is no Mercurial repository"
126 raise error.RepoError(_("there is no Mercurial repository"
123 " here (.hg not found)"))
127 " here (.hg not found)"))
124 app = hgweb_mod.hgweb(repo, baseui=baseui)
128 return hgweb_mod.hgweb(repo, baseui=baseui)
125 return httpservice(servui, app, opts)
General Comments 0
You need to be logged in to leave comments. Login now