comparison mercurial/exchange.py @ 26761:8270ee357dd9

exchange: support streaming clone bundles in clone bundles Now that we have support for detecting compatible stream clone bundles in bundle specifications, we can safely add support for applying stream clone bundles to the clone bundles feature.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 17 Oct 2015 11:37:08 -0700
parents a18ee7da38c2
children aaa33ec3c951
comparison
equal deleted inserted replaced
26760:a18ee7da38c2 26761:8270ee357dd9
1830 fh = urlmod.open(ui, url) 1830 fh = urlmod.open(ui, url)
1831 cg = readbundle(ui, fh, 'stream') 1831 cg = readbundle(ui, fh, 'stream')
1832 1832
1833 if isinstance(cg, bundle2.unbundle20): 1833 if isinstance(cg, bundle2.unbundle20):
1834 bundle2.processbundle(repo, cg, lambda: tr) 1834 bundle2.processbundle(repo, cg, lambda: tr)
1835 elif isinstance(cg, streamclone.streamcloneapplier):
1836 cg.apply(repo)
1835 else: 1837 else:
1836 cg.apply(repo, 'clonebundles', url) 1838 cg.apply(repo, 'clonebundles', url)
1837 tr.close() 1839 tr.close()
1838 return True 1840 return True
1839 except urllib2.HTTPError as e: 1841 except urllib2.HTTPError as e: