Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.0.4, 2.0.5, and 2.1

stable serve: honor web.port setting (fixes #612)

Changeset e5d11468db9c

Parent b1164a91eceb

by Yuya Nishihara

Changes to one file · Browse files at e5d11468db9c Showing diff from parent b1164a91eceb Diff from another changeset...

 
162
163
164
 
 
 
165
166
167
 
246
247
248
 
 
 
 
 
 
 
 
 
 
 
249
250
251
 
162
163
164
165
166
167
168
169
170
 
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
@@ -162,6 +162,9 @@
  """Port number of the web server"""   return int(self._qui.port_edit.value())   + def setport(self, port): + self._qui.port_edit.setValue(port) +   def keyPressEvent(self, event):   if self.isstarted() and event.key() == Qt.Key_Escape:   self.stop() @@ -246,6 +249,17 @@
  repopath = opts.get('root') or paths.find_root()   webconfpath = opts.get('web_conf') or opts.get('webdir_conf')   dlg = ServeDialog(webconf=_newwebconf(repopath, webconfpath)) + + lui = ui.copy() + if webconfpath: + lui.readconfig(webconfpath) + elif repopath: + lui.readconfig(os.path.join(repopath, '.hg', 'hgrc'), repopath) + try: + dlg.setport(int(lui.config('web', 'port', '8000'))) + except ValueError: + pass +   if repopath or webconfpath:   dlg.start()   return dlg