mercurial/exchange.py
changeset 21989 bdb6d97f0a04
parent 21941 dab31290c7eb
child 22014 71083b020b4a
equal deleted inserted replaced
21988:12cd3827b860 21989:bdb6d97f0a04
   724     have a clearer idea of the API we what to query different data.
   724     have a clearer idea of the API we what to query different data.
   725 
   725 
   726     The implementation is at a very early stage and will get massive rework
   726     The implementation is at a very early stage and will get massive rework
   727     when the API of bundle is refined.
   727     when the API of bundle is refined.
   728     """
   728     """
   729     # build changegroup bundle here.
   729     cg = None
   730     cg = changegroup.getbundle(repo, source, heads=heads,
   730     if kwargs.get('cg', True):
   731                                common=common, bundlecaps=bundlecaps)
   731         # build changegroup bundle here.
       
   732         cg = changegroup.getbundle(repo, source, heads=heads,
       
   733                                    common=common, bundlecaps=bundlecaps)
       
   734     elif 'HG2X' not in bundlecaps:
       
   735         raise ValueError(_('request for bundle10 must include changegroup'))
   732     if bundlecaps is None or 'HG2X' not in bundlecaps:
   736     if bundlecaps is None or 'HG2X' not in bundlecaps:
   733         if kwargs:
   737         if kwargs:
   734             raise ValueError(_('unsupported getbundle arguments: %s')
   738             raise ValueError(_('unsupported getbundle arguments: %s')
   735                              % ', '.join(sorted(kwargs.keys())))
   739                              % ', '.join(sorted(kwargs.keys())))
   736         return cg
   740         return cg