Skip to content
Snippets Groups Projects
Commit f62873dba3fd authored by Boris Feld's avatar Boris Feld
Browse files

revbranchcache: disable the new part for narrow hg bundle

The lack of some revisions confuses the new cache part. To simplify things, we
disable it for now.
parent c0e90df1ab1e
No related branches found
No related tags found
No related merge requests found
......@@ -479,6 +479,19 @@
origcgfn(*args, **kwargs)
exchange.getbundle2partsmapping['changegroup'] = wrappedcgfn
# disable rev branch cache exchange when serving a narrow bundle
# (currently incompatible with that part)
origrbcfn = exchange.getbundle2partsmapping['cache:rev-branch-cache']
def wrappedcgfn(*args, **kwargs):
repo = args[1]
if repo.ui.has_section(_NARROWACL_SECTION):
return
elif kwargs.get(r'narrow', False):
return
else:
origrbcfn(*args, **kwargs)
exchange.getbundle2partsmapping['cache:rev-branch-cache'] = wrappedcgfn
# Extend changegroup receiver so client can fixup after widen requests.
origcghandler = bundle2.parthandlermapping['changegroup']
def wrappedcghandler(op, inpart):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment