Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

serve: catch Abort errors from hgweb

Changeset 8ca560af823d

Parent a9c7de3581b4

by Steve Borho

Changes to one file · Browse files at 8ca560af823d Showing diff from parent a9c7de3581b4 Diff from another changeset...

Change 1 of 2 Show Entire File hggtk/​serve.py Stacked
 
210
211
212
 
 
 
 
 
 
213
214
215
 
228
229
230
231
 
 
232
233
234
 
210
211
212
213
214
215
216
217
218
219
220
221
 
234
235
236
 
237
238
239
240
241
@@ -210,6 +210,12 @@
  self._get_config()     def _start_server(self): + def threadfunc(path, q, *args): + try: + hglib.hgcmd_toq(path, q, *args) + except util.Abort, e: + self._write(str(e)) +   # gather input data   try:   port = int(self._port_input.get_text()) @@ -228,7 +234,8 @@
  else:   args.append('--name')   args.append(self.webname) - thread = threading.Thread(target=hglib.hgcmd_toq, args=args) + + thread = threading.Thread(target=threadfunc, args=args)   thread.start()     while not gservice or not hasattr(gservice, 'httpd'):