comparison mercurial/httprepo.py @ 2612:ffb895f16925

add support for streaming clone. existing clone code uses pull to get changes from remote repo. is very slow, uses lots of memory and cpu. new clone code has server write file data straight to client, client writes file data straight to disk. memory and cpu used are very low, clone is much faster over lan. new client can still clone with pull, can still clone from older servers. new server can still serve older clients.
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Fri, 14 Jul 2006 11:17:22 -0700
parents 52ce0d6bc375
children 109a22f5434a
comparison
equal deleted inserted replaced
2611:1b4eb1f92433 2612:ffb895f16925
324 raise util.Abort(err[1]) 324 raise util.Abort(err[1])
325 finally: 325 finally:
326 fp.close() 326 fp.close()
327 os.unlink(tempname) 327 os.unlink(tempname)
328 328
329 def stream_out(self):
330 return self.do_cmd('stream_out')
331
329 class httpsrepository(httprepository): 332 class httpsrepository(httprepository):
330 def __init__(self, ui, path): 333 def __init__(self, ui, path):
331 if not has_https: 334 if not has_https:
332 raise util.Abort(_('Python support for SSL and HTTPS ' 335 raise util.Abort(_('Python support for SSL and HTTPS '
333 'is not installed')) 336 'is not installed'))