48 def getrepocaps_narrow(orig, repo, **kwargs): |
48 def getrepocaps_narrow(orig, repo, **kwargs): |
49 caps = orig(repo, **kwargs) |
49 caps = orig(repo, **kwargs) |
50 caps[NARROWCAP] = ['v0'] |
50 caps[NARROWCAP] = ['v0'] |
51 return caps |
51 return caps |
52 |
52 |
53 def getbundlechangegrouppart_nonellipsis(bundler, repo, source, bundlecaps=None, |
53 def getbundlechangegrouppart_widen(bundler, repo, source, bundlecaps=None, |
54 b2caps=None, heads=None, common=None, |
54 b2caps=None, heads=None, common=None, |
55 **kwargs): |
55 **kwargs): |
56 """Handling changegroup changegroup generation on the server when user |
56 """Handling changegroup changegroup generation on the server when user |
57 is widening their narrowspec""" |
57 is widening their narrowspec""" |
58 |
58 |
59 cgversions = b2caps.get('changegroup') |
59 cgversions = b2caps.get('changegroup') |
60 if cgversions: # 3.1 and 3.2 ship with an empty value |
60 if cgversions: # 3.1 and 3.2 ship with an empty value |
315 |
315 |
316 if (kwargs.get(r'narrow', False) and |
316 if (kwargs.get(r'narrow', False) and |
317 repo.ui.configbool('experimental', 'narrowservebrokenellipses')): |
317 repo.ui.configbool('experimental', 'narrowservebrokenellipses')): |
318 getbundlechangegrouppart_narrow(*args, **kwargs) |
318 getbundlechangegrouppart_narrow(*args, **kwargs) |
319 elif kwargs.get(r'widen', False) and kwargs.get(r'narrow', False): |
319 elif kwargs.get(r'widen', False) and kwargs.get(r'narrow', False): |
320 getbundlechangegrouppart_nonellipsis(*args, **kwargs) |
320 getbundlechangegrouppart_widen(*args, **kwargs) |
321 else: |
321 else: |
322 origcgfn(*args, **kwargs) |
322 origcgfn(*args, **kwargs) |
323 exchange.getbundle2partsmapping['changegroup'] = wrappedcgfn |
323 exchange.getbundle2partsmapping['changegroup'] = wrappedcgfn |
324 |
324 |
325 # Extend changegroup receiver so client can fixup after widen requests. |
325 # Extend changegroup receiver so client can fixup after widen requests. |