changeset 38719:4ad2a1ff0404

upgrade: add information about sparse-revlog Show information about sparse-revlog in debugformat, just like other requirements.
author Paul Morelle <paul.morelle@octobus.net>
date Mon, 16 Jul 2018 17:10:52 -0700
parents f8762ea73e0d
children d12415b8f833
files mercurial/upgrade.py tests/test-upgrade-repo.t
diffstat 2 files changed, 69 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/upgrade.py	Tue Jun 05 08:19:35 2018 +0200
+++ b/mercurial/upgrade.py	Mon Jul 16 17:10:52 2018 -0700
@@ -259,6 +259,28 @@
                        'faster')
 
 @registerformatvariant
+class sparserevlog(requirementformatvariant):
+    name = 'sparserevlog'
+
+    _requirement = localrepo.SPARSEREVLOG_REQUIREMENT
+
+    default = False
+
+    description = _('in order to limit disk reading and memory usage on older '
+                    'version, the span of a delta chain from its root to its '
+                    'end is limited, whatever the relevant data in this span. '
+                    'This can severly limit Mercurial ability to build good '
+                    'chain of delta resulting is much more storage space being '
+                    'taken and limit reusability of on disk delta during '
+                    'exchange.'
+                   )
+
+    upgrademessage = _('Revlog supports delta chain with more unused data '
+                       'between payload. These gaps will be skipped at read '
+                       'time. This allows for better delta chains, making a '
+                       'better compression and faster exchange with server.')
+
+@registerformatvariant
 class removecldeltachain(formatvariant):
     name = 'plain-cl-delta'
 
--- a/tests/test-upgrade-repo.t	Tue Jun 05 08:19:35 2018 +0200
+++ b/tests/test-upgrade-repo.t	Mon Jul 16 17:10:52 2018 -0700
@@ -56,6 +56,7 @@
   fncache:        yes
   dotencode:      yes
   generaldelta:   yes
+  sparserevlog:    no
   plain-cl-delta: yes
   compression:    zlib
   $ hg debugformat --verbose
@@ -63,6 +64,7 @@
   fncache:        yes    yes     yes
   dotencode:      yes    yes     yes
   generaldelta:   yes    yes     yes
+  sparserevlog:    no     no      no
   plain-cl-delta: yes    yes     yes
   compression:    zlib   zlib    zlib
   $ hg debugformat --verbose --config format.usegfncache=no
@@ -70,6 +72,7 @@
   fncache:        yes    yes     yes
   dotencode:      yes    yes     yes
   generaldelta:   yes    yes     yes
+  sparserevlog:    no     no      no
   plain-cl-delta: yes    yes     yes
   compression:    zlib   zlib    zlib
   $ hg debugformat --verbose --config format.usegfncache=no --color=debug
@@ -77,6 +80,7 @@
   [formatvariant.name.uptodate|fncache:       ][formatvariant.repo.uptodate| yes][formatvariant.config.default|    yes][formatvariant.default|     yes]
   [formatvariant.name.uptodate|dotencode:     ][formatvariant.repo.uptodate| yes][formatvariant.config.default|    yes][formatvariant.default|     yes]
   [formatvariant.name.uptodate|generaldelta:  ][formatvariant.repo.uptodate| yes][formatvariant.config.default|    yes][formatvariant.default|     yes]
+  [formatvariant.name.uptodate|sparserevlog:  ][formatvariant.repo.uptodate|  no][formatvariant.config.default|     no][formatvariant.default|      no]
   [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default|    yes][formatvariant.default|     yes]
   [formatvariant.name.uptodate|compression:   ][formatvariant.repo.uptodate| zlib][formatvariant.config.default|   zlib][formatvariant.default|    zlib]
   $ hg debugformat -Tjson
@@ -100,6 +104,12 @@
     "repo": true
    },
    {
+    "config": false,
+    "default": false,
+    "name": "sparserevlog",
+    "repo": false
+   },
+   {
     "config": true,
     "default": true,
     "name": "plain-cl-delta",
@@ -119,6 +129,9 @@
   requirements
      preserved: dotencode, fncache, generaldelta, revlogv1, store
   
+  sparserevlog
+     Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
+  
   additional optimizations are available by specifying "--optimize <name>":
   
   redeltaparent
@@ -143,6 +156,9 @@
   requirements
      preserved: dotencode, fncache, generaldelta, revlogv1, store
   
+  sparserevlog
+     Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
+  
   redeltaparent
      deltas within internal storage will choose a new base revision if needed
   
@@ -170,6 +186,7 @@
   fncache:         no
   dotencode:       no
   generaldelta:    no
+  sparserevlog:    no
   plain-cl-delta: yes
   compression:    zlib
   $ hg debugformat --verbose
@@ -177,6 +194,7 @@
   fncache:         no    yes     yes
   dotencode:       no    yes     yes
   generaldelta:    no    yes     yes
+  sparserevlog:    no     no      no
   plain-cl-delta: yes    yes     yes
   compression:    zlib   zlib    zlib
   $ hg debugformat --verbose --config format.usegeneraldelta=no
@@ -184,6 +202,7 @@
   fncache:         no    yes     yes
   dotencode:       no    yes     yes
   generaldelta:    no     no     yes
+  sparserevlog:    no     no      no
   plain-cl-delta: yes    yes     yes
   compression:    zlib   zlib    zlib
   $ hg debugformat --verbose --config format.usegeneraldelta=no --color=debug
@@ -191,6 +210,7 @@
   [formatvariant.name.mismatchconfig|fncache:       ][formatvariant.repo.mismatchconfig|  no][formatvariant.config.default|    yes][formatvariant.default|     yes]
   [formatvariant.name.mismatchconfig|dotencode:     ][formatvariant.repo.mismatchconfig|  no][formatvariant.config.default|    yes][formatvariant.default|     yes]
   [formatvariant.name.mismatchdefault|generaldelta:  ][formatvariant.repo.mismatchdefault|  no][formatvariant.config.special|     no][formatvariant.default|     yes]
+  [formatvariant.name.uptodate|sparserevlog:  ][formatvariant.repo.uptodate|  no][formatvariant.config.default|     no][formatvariant.default|      no]
   [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default|    yes][formatvariant.default|     yes]
   [formatvariant.name.uptodate|compression:   ][formatvariant.repo.uptodate| zlib][formatvariant.config.default|   zlib][formatvariant.default|    zlib]
   $ hg debugupgraderepo
@@ -221,6 +241,9 @@
   generaldelta
      repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster
   
+  sparserevlog
+     Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
+  
   additional optimizations are available by specifying "--optimize <name>":
   
   redeltaparent
@@ -263,6 +286,9 @@
   generaldelta
      repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster
   
+  sparserevlog
+     Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
+  
   additional optimizations are available by specifying "--optimize <name>":
   
   redeltaparent
@@ -289,6 +315,9 @@
   requirements
      preserved: dotencode, fncache, generaldelta, revlogv1, store
   
+  sparserevlog
+     Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
+  
   beginning upgrade...
   repository locked and read-only
   creating temporary repository to stage migrated data: $TESTTMP/modern/.hg/upgrade.* (glob)
@@ -326,6 +355,9 @@
   generaldelta
      repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster
   
+  sparserevlog
+     Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
+  
   beginning upgrade...
   repository locked and read-only
   creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
@@ -423,6 +455,9 @@
   requirements
      preserved: dotencode, fncache, generaldelta, revlogv1, store
   
+  sparserevlog
+     Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
+  
   beginning upgrade...
   repository locked and read-only
   creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob)
@@ -454,6 +489,9 @@
   requirements
      preserved: dotencode, fncache, generaldelta, revlogv1, store
   
+  sparserevlog
+     Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
+  
   redeltafulladd
      each revision will be added as new content to the internal storage; this will likely drastically slow down execution time, but some extensions might need it
   
@@ -512,6 +550,9 @@
   requirements
      preserved: dotencode, fncache, generaldelta, largefiles, revlogv1, store
   
+  sparserevlog
+     Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
+  
   beginning upgrade...
   repository locked and read-only
   creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
@@ -564,6 +605,9 @@
   requirements
      preserved: dotencode, fncache, generaldelta, largefiles, lfs, revlogv1, store
   
+  sparserevlog
+     Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
+  
   beginning upgrade...
   repository locked and read-only
   creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
@@ -659,6 +703,9 @@
   requirements
      preserved: dotencode, fncache, generaldelta, revlogv1, store
   
+  sparserevlog
+     Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server.
+  
   redeltaall
      deltas within internal storage will be fully recomputed; this will likely drastically slow down execution time