[PATCH 2 of 2 V2 mainline] format: introduce 'format.generaldelta=accept'
Matt Mackall
mpm at selenic.com
Mon Nov 9 15:24:51 CST 2015
On Sun, 2015-11-08 at 12:00 -0500, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at fb.com>
> # Date 1446479952 0
> # Mon Nov 02 15:59:12 2015 +0000
> # Node ID 3feb562d4e83fcbb7c59fa79b5749aae45de9fb1
> # Parent 69c64edb25dd96a23564db5b23b8b432b343ec88
> # EXP-Topic generaldelta
> # Available At http://hg.netv6.net/marmoute-wip/mercurial/
> # hg pull http://hg.netv6.net/marmoute-wip/mercurial/ -r
> 3feb562d4e83
> format: introduce 'format.generaldelta=accept'
> def gdconfig(ui):
> """helper function to retrieve general delta setting
>
> - The need for such function is triggered by a soon to come third
> possible
> - value to the config option."""
> + return (usegd, lazydelta) tuple
> +
> + usegd: create new repository as general delta,
> + lazydelta: do not redelta incoming bundle."""
> + # the r'' is a trick to have checkconfig ignore the type
> mismatch
> # experimental config: format.generaldelta
> - return ui.configbool('format', 'generaldelta', False)
> + if ui.config(r'format', 'generaldelta', '') == 'accept':
> + return True, True
> + # experimental config: format.generaldelta
> + usegd = ui.configbool('format', 'generaldelta', False)
> + return usegd, False
Also, I don't think the logic here is nearly complex enough to warrant
a multi-value return. Let's just have two (nearly trivial) functions
defined next to each other.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list