# HG changeset patch # User Martin Bornhold # Date 2016-06-23 15:07:30 # Node ID 368b34ff28030718afdc09105fcb4379c3891b54 # Parent e472f9423d92dc523531d2d4eb4b9692e0677325 mercurial: Explicitly disable largefiles extension when no config value is present for it. Recent mercurial versions enable the largefiles extension in the hgrc file when cloning from a repo that uses largefiles. This may lead to undesired behaviour. By explicitly disabling it in the baseui object we override the setting in the hgrc file. diff --git a/vcsserver/hg.py b/vcsserver/hg.py --- a/vcsserver/hg.py +++ b/vcsserver/hg.py @@ -57,6 +57,14 @@ def make_ui_from_config(repo_config): # signal in a non-main thread, thus generating a ValueError. baseui.setconfig('worker', 'numcpus', 1) + # If there is no config for the largefiles extension, we explicitly disable + # it here. This overrides settings from repositories hgrc file. Recent + # mercurial versions enable largefiles in hgrc on clone from largefile + # repo. + if not baseui.hasconfig('extensions', 'largefiles'): + log.debug('Explicitly disable largefiles extension for repo.') + baseui.setconfig('extensions', 'largefiles', '!') + return baseui