comparison mercurial/wireproto.py @ 26443:d947086d8973

streamclone: move code out of exchange.py We bulk move functions from exchange.py related to streaming clones. Function names were renamed slightly to drop a component redundant with the module name. Docstrings and comments referencing old names and locations were updated accordingly.
author Gregory Szorc <gregory.szorc@gmail.com>
date Fri, 02 Oct 2015 16:05:52 -0700
parents 0851678be71b
children 623743010133
comparison
equal deleted inserted replaced
26442:ef8d27f53204 26443:d947086d8973
24 encoding, 24 encoding,
25 error, 25 error,
26 exchange, 26 exchange,
27 peer, 27 peer,
28 pushkey as pushkeymod, 28 pushkey as pushkeymod,
29 streamclone,
29 util, 30 util,
30 ) 31 )
31 32
32 class abstractserverproto(object): 33 class abstractserverproto(object):
33 """abstract class that summarizes the protocol API 34 """abstract class that summarizes the protocol API
718 yield chunk 719 yield chunk
719 720
720 try: 721 try:
721 # LockError may be raised before the first result is yielded. Don't 722 # LockError may be raised before the first result is yielded. Don't
722 # emit output until we're sure we got the lock successfully. 723 # emit output until we're sure we got the lock successfully.
723 it = exchange.generatestreamclone(repo) 724 it = streamclone.generatev1(repo)
724 return streamres(getstream(it)) 725 return streamres(getstream(it))
725 except error.LockError: 726 except error.LockError:
726 return '2\n' 727 return '2\n'
727 728
728 @wireprotocommand('unbundle', 'heads') 729 @wireprotocommand('unbundle', 'heads')