# HG changeset patch # User Pierre-Yves David # Date 2022-10-17 14:26:16 # Node ID 4bd12c0f531e8b15db2d7ff6d720374aea081706 # Parent f56873a7284c7b7c2ad3dcdffcc449ee75df27ae reuse-delta-base: improves some documentation The current code got me a bit confused initially. So a bit more documentation around it cannot hurt. diff --git a/mercurial/configitems.py b/mercurial/configitems.py --- a/mercurial/configitems.py +++ b/mercurial/configitems.py @@ -2075,6 +2075,7 @@ coreconfigitem( b'revlog.reuse-external-delta', default=True, ) +# This option is True unless `format.generaldelta` is set. coreconfigitem( b'storage', b'revlog.reuse-external-delta-parent', diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py --- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -1858,7 +1858,12 @@ def gdinitconfig(ui): def gddeltaconfig(ui): - """helper function to know if incoming delta should be optimised""" + """helper function to know if incoming deltas should be optimized + + The `format.generaldelta` config is an old form of the config that also + implies that incoming delta-bases should be never be trusted. This function + exists for this purpose. + """ # experimental config: format.generaldelta return ui.configbool(b'format', b'generaldelta')