Patchwork [mainline] format: create new repository as 'generaldelta' by default

login
register
mail settings
Submitter Pierre-Yves David
Date Nov. 12, 2015, 11:27 p.m.
Message ID <38439322075ccaf7e4bc.1447370821@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/11388/
State Accepted
Headers show

Comments

Pierre-Yves David - Nov. 12, 2015, 11:27 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1446485598 0
#      Mon Nov 02 17:33:18 2015 +0000
# Node ID 38439322075ccaf7e4bcc2de777c463458f6084b
# Parent  2fb17f60bffa550789b3b95c06ee1577c989cf1d
# EXP-Topic generaldelta
# Available At http://hg.netv6.net/marmoute-wip/mercurial/
#              hg pull http://hg.netv6.net/marmoute-wip/mercurial/ -r 38439322075c
format: create new repository as 'generaldelta' by default

Since we have pushed back the performance issue related to general delta behind
another configuration (Still off by default), we can safely create new
repository with general delta support. As client are compatible with it since
Mercurial 1.9 (4.5 years ago) I do no expect any significant compatibility
issues.
Gregory Szorc - Nov. 13, 2015, 3:25 a.m.
On Thu, Nov 12, 2015 at 3:27 PM, Pierre-Yves David <
pierre-yves.david@ens-lyon.org> wrote:

> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@fb.com>
> # Date 1446485598 0
> #      Mon Nov 02 17:33:18 2015 +0000
> # Node ID 38439322075ccaf7e4bcc2de777c463458f6084b
> # Parent  2fb17f60bffa550789b3b95c06ee1577c989cf1d
> # EXP-Topic generaldelta
> # Available At http://hg.netv6.net/marmoute-wip/mercurial/
> #              hg pull http://hg.netv6.net/marmoute-wip/mercurial/ -r
> 38439322075c
> format: create new repository as 'generaldelta' by default
>
> Since we have pushed back the performance issue related to general delta
> behind
> another configuration (Still off by default), we can safely create new
> repository with general delta support. As client are compatible with it
> since
> Mercurial 1.9 (4.5 years ago) I do no expect any significant compatibility
> issues.
>
> diff --git a/mercurial/help/config.txt b/mercurial/help/config.txt
> --- a/mercurial/help/config.txt
> +++ b/mercurial/help/config.txt
> @@ -668,13 +668,13 @@ Example for ``~/.hgrc``::
>
>  ``usegeneraldelta``
>      Enable or disable the "generaldelta" repository format which improves
>      repository compression by allowing "revlog" to store delta against
> arbitrary
>      revision instead of the previous stored one. This provides significant
> -    improvement for repositories with branches. Disabling this option
> ensures that
> -    the on-disk format of newly created repository will be compatible with
> -    Mercurial before version 1.9.
> +    improvement for repositories with branches. Enabled by default.
> Disabling
> +    this option ensures that the on-disk format of newly created
> repository will
> +    be compatible with Mercurial before version 1.9.
>
>  ``usestore``
>      Enable or disable the "store" repository format which improves
>      compatibility with systems that fold case or otherwise mangle
>      filenames. Enabled by default. Disabling this option will allow
> diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
> --- a/mercurial/scmutil.py
> +++ b/mercurial/scmutil.py
> @@ -1174,11 +1174,11 @@ def wlocksub(repo, cmd, *args, **kwargs)
>  def gdinitconfig(ui):
>      """helper function to know if a repo should be created as general
> delta
>      """
>      # experimental config: format.generaldelta
>      return (ui.configbool('format', 'generaldelta', False)
> -            or ui.configbool('format', 'usegeneraldelta', False))
> +            or ui.configbool('format', 'usegeneraldelta', True))
>
>  def gddeltaconfig(ui):
>      """helper function to know if incoming delta should be optimised
>      """
>      # experimental config: format.generaldelta
>

Finally \o/

It feels extremely weird to me that there are no test changes as a result
of this patch. But that's only because there was a whole series that
manually enabled generaldelta on several tests before this one. Are you
going to mass undo those per-test changes now that they aren't necessary?
Pierre-Yves David - Nov. 14, 2015, 12:45 a.m.
On 11/12/2015 07:25 PM, Gregory Szorc wrote:
> On Thu, Nov 12, 2015 at 3:27 PM, Pierre-Yves David
> <pierre-yves.david@ens-lyon.org <mailto:pierre-yves.david@ens-lyon.org>>
> wrote:
>
>     # HG changeset patch
>     # User Pierre-Yves David <pierre-yves.david@fb.com
>     <mailto:pierre-yves.david@fb.com>>
>     # Date 1446485598 0
>     #      Mon Nov 02 17:33:18 2015 +0000
>     # Node ID 38439322075ccaf7e4bcc2de777c463458f6084b
>     # Parent  2fb17f60bffa550789b3b95c06ee1577c989cf1d
>     # EXP-Topic generaldelta
>     # Available At http://hg.netv6.net/marmoute-wip/mercurial/
>     #              hg pull http://hg.netv6.net/marmoute-wip/mercurial/
>     -r 38439322075c
>     format: create new repository as 'generaldelta' by default
>
>     Since we have pushed back the performance issue related to general
>     delta behind
>     another configuration (Still off by default), we can safely create new
>     repository with general delta support. As client are compatible with
>     it since
>     Mercurial 1.9 (4.5 years ago) I do no expect any significant
>     compatibility
>     issues.
>
>     diff --git a/mercurial/help/config.txt b/mercurial/help/config.txt
>     --- a/mercurial/help/config.txt
>     +++ b/mercurial/help/config.txt
>     @@ -668,13 +668,13 @@ Example for ``~/.hgrc``::
>
>       ``usegeneraldelta``
>           Enable or disable the "generaldelta" repository format which
>     improves
>           repository compression by allowing "revlog" to store delta
>     against arbitrary
>           revision instead of the previous stored one. This provides
>     significant
>     -    improvement for repositories with branches. Disabling this
>     option ensures that
>     -    the on-disk format of newly created repository will be
>     compatible with
>     -    Mercurial before version 1.9.
>     +    improvement for repositories with branches. Enabled by default.
>     Disabling
>     +    this option ensures that the on-disk format of newly created
>     repository will
>     +    be compatible with Mercurial before version 1.9.
>
>       ``usestore``
>           Enable or disable the "store" repository format which improves
>           compatibility with systems that fold case or otherwise mangle
>           filenames. Enabled by default. Disabling this option will allow
>     diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
>     --- a/mercurial/scmutil.py
>     +++ b/mercurial/scmutil.py
>     @@ -1174,11 +1174,11 @@ def wlocksub(repo, cmd, *args, **kwargs)
>       def gdinitconfig(ui):
>           """helper function to know if a repo should be created as
>     general delta
>           """
>           # experimental config: format.generaldelta
>           return (ui.configbool('format', 'generaldelta', False)
>     -            or ui.configbool('format', 'usegeneraldelta', False))
>     +            or ui.configbool('format', 'usegeneraldelta', True))
>
>       def gddeltaconfig(ui):
>           """helper function to know if incoming delta should be optimised
>           """
>           # experimental config: format.generaldelta
>
>
> Finally \o/
>
> It feels extremely weird to me that there are no test changes as a
> result of this patch. But that's only because there was a whole series
> that manually enabled generaldelta on several tests before this one. Are
> you going to mass undo those per-test changes now that they aren't
> necessary?

Yes, this is planned.
Pierre-Yves David - Nov. 24, 2015, 11:06 p.m.
On 11/12/2015 03:27 PM, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@fb.com>
> # Date 1446485598 0
> #      Mon Nov 02 17:33:18 2015 +0000
> # Node ID 38439322075ccaf7e4bcc2de777c463458f6084b
> # Parent  2fb17f60bffa550789b3b95c06ee1577c989cf1d
> # EXP-Topic generaldelta
> # Available At http://hg.netv6.net/marmoute-wip/mercurial/
> #              hg pull http://hg.netv6.net/marmoute-wip/mercurial/ -r 38439322075c
> format: create new repository as 'generaldelta' by default

Pushed to the clowncopter (After Matt side channel approval)

Patch

diff --git a/mercurial/help/config.txt b/mercurial/help/config.txt
--- a/mercurial/help/config.txt
+++ b/mercurial/help/config.txt
@@ -668,13 +668,13 @@  Example for ``~/.hgrc``::
 
 ``usegeneraldelta``
     Enable or disable the "generaldelta" repository format which improves
     repository compression by allowing "revlog" to store delta against arbitrary
     revision instead of the previous stored one. This provides significant
-    improvement for repositories with branches. Disabling this option ensures that
-    the on-disk format of newly created repository will be compatible with
-    Mercurial before version 1.9.
+    improvement for repositories with branches. Enabled by default. Disabling
+    this option ensures that the on-disk format of newly created repository will
+    be compatible with Mercurial before version 1.9.
 
 ``usestore``
     Enable or disable the "store" repository format which improves
     compatibility with systems that fold case or otherwise mangle
     filenames. Enabled by default. Disabling this option will allow
diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -1174,11 +1174,11 @@  def wlocksub(repo, cmd, *args, **kwargs)
 def gdinitconfig(ui):
     """helper function to know if a repo should be created as general delta
     """
     # experimental config: format.generaldelta
     return (ui.configbool('format', 'generaldelta', False)
-            or ui.configbool('format', 'usegeneraldelta', False))
+            or ui.configbool('format', 'usegeneraldelta', True))
 
 def gddeltaconfig(ui):
     """helper function to know if incoming delta should be optimised
     """
     # experimental config: format.generaldelta