sidedatacopies: teach upgrade about the new requirement
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sun, 06 Oct 2019 23:36:51 -0400
changeset 43138 f9dc98a97cdb
parent 43137 81efc4a295e7
child 43139 f78ad4caa5ad
sidedatacopies: teach upgrade about the new requirement The `debugformat` and `debugupgraderepo` command now detect the requirement. (upgrade to and from are not currently possible). Differential Revision: https://phab.mercurial-scm.org/D6946
mercurial/upgrade.py
tests/test-lfs-serve.t
tests/test-sidedata.t
tests/test-upgrade-repo.t
--- a/mercurial/upgrade.py	Sun Oct 06 23:36:51 2019 -0400
+++ b/mercurial/upgrade.py	Sun Oct 06 23:36:51 2019 -0400
@@ -371,6 +371,21 @@
 
 
 @registerformatvariant
+class copiessdc(requirementformatvariant):
+    name = b'copies-sdc'
+
+    _requirement = localrepo.COPIESSDC_REQUIREMENT
+
+    default = False
+
+    description = _(b'Stores copies information alongside changesets.')
+
+    upgrademessage = _(
+        b'Allows to use more efficient algorithm to deal with ' b'copy tracing.'
+    )
+
+
+@registerformatvariant
 class removecldeltachain(formatvariant):
     name = b'plain-cl-delta'
 
--- a/tests/test-lfs-serve.t	Sun Oct 06 23:36:51 2019 -0400
+++ b/tests/test-lfs-serve.t	Sun Oct 06 23:36:51 2019 -0400
@@ -135,6 +135,9 @@
   sidedata
      Allows storage of extra data alongside a revision.
   
+  copies-sdc
+     Allows to use more efficient algorithm to deal with copy tracing.
+  
   beginning upgrade...
   repository locked and read-only
   creating temporary repository to stage migrated data: * (glob)
--- a/tests/test-sidedata.t	Sun Oct 06 23:36:51 2019 -0400
+++ b/tests/test-sidedata.t	Sun Oct 06 23:36:51 2019 -0400
@@ -56,6 +56,7 @@
   generaldelta:      yes    yes     yes
   sparserevlog:      yes    yes     yes
   sidedata:           no     no      no
+  copies-sdc:         no     no      no
   plain-cl-delta:    yes    yes     yes
   compression:       zlib   zlib    zlib
   compression-level: default default default
@@ -66,6 +67,7 @@
   generaldelta:      yes    yes     yes
   sparserevlog:      yes    yes     yes
   sidedata:           no    yes      no
+  copies-sdc:         no     no      no
   plain-cl-delta:    yes    yes     yes
   compression:       zlib   zlib    zlib
   compression-level: default default default
@@ -82,6 +84,7 @@
   generaldelta:      yes    yes     yes
   sparserevlog:      yes    yes     yes
   sidedata:          yes     no      no
+  copies-sdc:         no     no      no
   plain-cl-delta:    yes    yes     yes
   compression:       zlib   zlib    zlib
   compression-level: default default default
@@ -92,6 +95,7 @@
   generaldelta:      yes    yes     yes
   sparserevlog:      yes    yes     yes
   sidedata:          yes     no      no
+  copies-sdc:         no     no      no
   plain-cl-delta:    yes    yes     yes
   compression:       zlib   zlib    zlib
   compression-level: default default default
--- a/tests/test-upgrade-repo.t	Sun Oct 06 23:36:51 2019 -0400
+++ b/tests/test-upgrade-repo.t	Sun Oct 06 23:36:51 2019 -0400
@@ -58,6 +58,7 @@
   generaldelta:      yes
   sparserevlog:      yes
   sidedata:           no
+  copies-sdc:         no
   plain-cl-delta:    yes
   compression:       zlib
   compression-level: default
@@ -68,6 +69,7 @@
   generaldelta:      yes    yes     yes
   sparserevlog:      yes    yes     yes
   sidedata:           no     no      no
+  copies-sdc:         no     no      no
   plain-cl-delta:    yes    yes     yes
   compression:       zlib   zlib    zlib
   compression-level: default default default
@@ -78,6 +80,7 @@
   generaldelta:      yes    yes     yes
   sparserevlog:      yes    yes     yes
   sidedata:           no     no      no
+  copies-sdc:         no     no      no
   plain-cl-delta:    yes    yes     yes
   compression:       zlib   zlib    zlib
   compression-level: default default default
@@ -88,6 +91,7 @@
   [formatvariant.name.uptodate|generaldelta:     ][formatvariant.repo.uptodate| yes][formatvariant.config.default|    yes][formatvariant.default|     yes]
   [formatvariant.name.uptodate|sparserevlog:     ][formatvariant.repo.uptodate| yes][formatvariant.config.default|    yes][formatvariant.default|     yes]
   [formatvariant.name.uptodate|sidedata:         ][formatvariant.repo.uptodate|  no][formatvariant.config.default|     no][formatvariant.default|      no]
+  [formatvariant.name.uptodate|copies-sdc:       ][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]
   [formatvariant.name.uptodate|compression-level:][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default]
@@ -124,6 +128,12 @@
     "repo": false
    },
    {
+    "config": false,
+    "default": false,
+    "name": "copies-sdc",
+    "repo": false
+   },
+   {
     "config": true,
     "default": true,
     "name": "plain-cl-delta",
@@ -152,6 +162,9 @@
   sidedata
      Allows storage of extra data alongside a revision.
   
+  copies-sdc
+     Allows to use more efficient algorithm to deal with copy tracing.
+  
   additional optimizations are available by specifying "--optimize <name>":
   
   re-delta-parent
@@ -179,6 +192,9 @@
   sidedata
      Allows storage of extra data alongside a revision.
   
+  copies-sdc
+     Allows to use more efficient algorithm to deal with copy tracing.
+  
   re-delta-parent
      deltas within internal storage will choose a new base revision if needed
   
@@ -206,6 +222,9 @@
   sidedata
      Allows storage of extra data alongside a revision.
   
+  copies-sdc
+     Allows to use more efficient algorithm to deal with copy tracing.
+  
   re-delta-parent
      deltas within internal storage will choose a new base revision if needed
   
@@ -242,6 +261,7 @@
   generaldelta:       no
   sparserevlog:       no
   sidedata:           no
+  copies-sdc:         no
   plain-cl-delta:    yes
   compression:       zlib
   compression-level: default
@@ -252,6 +272,7 @@
   generaldelta:       no    yes     yes
   sparserevlog:       no    yes     yes
   sidedata:           no     no      no
+  copies-sdc:         no     no      no
   plain-cl-delta:    yes    yes     yes
   compression:       zlib   zlib    zlib
   compression-level: default default default
@@ -262,6 +283,7 @@
   generaldelta:       no     no     yes
   sparserevlog:       no     no     yes
   sidedata:           no     no      no
+  copies-sdc:         no     no      no
   plain-cl-delta:    yes    yes     yes
   compression:       zlib   zlib    zlib
   compression-level: default default default
@@ -272,6 +294,7 @@
   [formatvariant.name.mismatchdefault|generaldelta:     ][formatvariant.repo.mismatchdefault|  no][formatvariant.config.special|     no][formatvariant.default|     yes]
   [formatvariant.name.mismatchdefault|sparserevlog:     ][formatvariant.repo.mismatchdefault|  no][formatvariant.config.special|     no][formatvariant.default|     yes]
   [formatvariant.name.uptodate|sidedata:         ][formatvariant.repo.uptodate|  no][formatvariant.config.default|     no][formatvariant.default|      no]
+  [formatvariant.name.uptodate|copies-sdc:       ][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]
   [formatvariant.name.uptodate|compression-level:][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default]
@@ -312,6 +335,9 @@
   sidedata
      Allows storage of extra data alongside a revision.
   
+  copies-sdc
+     Allows to use more efficient algorithm to deal with copy tracing.
+  
   additional optimizations are available by specifying "--optimize <name>":
   
   re-delta-parent
@@ -363,6 +389,9 @@
   sidedata
      Allows storage of extra data alongside a revision.
   
+  copies-sdc
+     Allows to use more efficient algorithm to deal with copy tracing.
+  
   additional optimizations are available by specifying "--optimize <name>":
   
   re-delta-parent
@@ -392,6 +421,9 @@
   sidedata
      Allows storage of extra data alongside a revision.
   
+  copies-sdc
+     Allows to use more efficient algorithm to deal with copy tracing.
+  
   beginning upgrade...
   repository locked and read-only
   creating temporary repository to stage migrated data: $TESTTMP/modern/.hg/upgrade.* (glob)
@@ -446,6 +478,9 @@
   sidedata
      Allows storage of extra data alongside a revision.
   
+  copies-sdc
+     Allows to use more efficient algorithm to deal with copy tracing.
+  
   beginning upgrade...
   repository locked and read-only
   creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
@@ -545,6 +580,9 @@
   sidedata
      Allows storage of extra data alongside a revision.
   
+  copies-sdc
+     Allows to use more efficient algorithm to deal with copy tracing.
+  
   beginning upgrade...
   repository locked and read-only
   creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
@@ -582,6 +620,9 @@
   sidedata
      Allows storage of extra data alongside a revision.
   
+  copies-sdc
+     Allows to use more efficient algorithm to deal with copy tracing.
+  
   re-delta-parent
      deltas within internal storage will choose a new base revision if needed
   
@@ -659,6 +700,9 @@
   sidedata
      Allows storage of extra data alongside a revision.
   
+  copies-sdc
+     Allows to use more efficient algorithm to deal with copy tracing.
+  
   re-delta-parent
      deltas within internal storage will choose a new base revision if needed
   
@@ -708,6 +752,9 @@
   sidedata
      Allows storage of extra data alongside a revision.
   
+  copies-sdc
+     Allows to use more efficient algorithm to deal with copy tracing.
+  
   re-delta-parent
      deltas within internal storage will choose a new base revision if needed
   
@@ -757,6 +804,9 @@
   sidedata
      Allows storage of extra data alongside a revision.
   
+  copies-sdc
+     Allows to use more efficient algorithm to deal with copy tracing.
+  
   re-delta-parent
      deltas within internal storage will choose a new base revision if needed
   
@@ -811,6 +861,9 @@
   sidedata
      Allows storage of extra data alongside a revision.
   
+  copies-sdc
+     Allows to use more efficient algorithm to deal with copy tracing.
+  
   re-delta-parent
      deltas within internal storage will choose a new base revision if needed
   
@@ -866,6 +919,9 @@
   sidedata
      Allows storage of extra data alongside a revision.
   
+  copies-sdc
+     Allows to use more efficient algorithm to deal with copy tracing.
+  
   re-delta-parent
      deltas within internal storage will choose a new base revision if needed
   
@@ -923,6 +979,9 @@
   sidedata
      Allows storage of extra data alongside a revision.
   
+  copies-sdc
+     Allows to use more efficient algorithm to deal with copy tracing.
+  
   beginning upgrade...
   repository locked and read-only
   creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob)
@@ -957,6 +1016,9 @@
   sidedata
      Allows storage of extra data alongside a revision.
   
+  copies-sdc
+     Allows to use more efficient algorithm to deal with copy tracing.
+  
   re-delta-fulladd
      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
   
@@ -1024,6 +1086,9 @@
   sidedata
      Allows storage of extra data alongside a revision.
   
+  copies-sdc
+     Allows to use more efficient algorithm to deal with copy tracing.
+  
   beginning upgrade...
   repository locked and read-only
   creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
@@ -1080,6 +1145,9 @@
   sidedata
      Allows storage of extra data alongside a revision.
   
+  copies-sdc
+     Allows to use more efficient algorithm to deal with copy tracing.
+  
   beginning upgrade...
   repository locked and read-only
   creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
@@ -1178,6 +1246,9 @@
   sidedata
      Allows storage of extra data alongside a revision.
   
+  copies-sdc
+     Allows to use more efficient algorithm to deal with copy tracing.
+  
   re-delta-all
      deltas within internal storage will be fully recomputed; this will likely drastically slow down execution time
   
@@ -1270,6 +1341,7 @@
   generaldelta:      yes    yes     yes
   sparserevlog:      yes    yes     yes
   sidedata:           no     no      no
+  copies-sdc:         no     no      no
   plain-cl-delta:    yes    yes     yes
   compression:       zstd   zlib    zlib
   compression-level: default default default
@@ -1292,6 +1364,7 @@
   generaldelta:      yes    yes     yes
   sparserevlog:      yes    yes     yes
   sidedata:           no     no      no
+  copies-sdc:         no     no      no
   plain-cl-delta:    yes    yes     yes
   compression:       zlib   zlib    zlib
   compression-level: default default default
@@ -1317,6 +1390,7 @@
   generaldelta:      yes    yes     yes
   sparserevlog:      yes    yes     yes
   sidedata:           no     no      no
+  copies-sdc:         no     no      no
   plain-cl-delta:    yes    yes     yes
   compression:       zstd   zstd    zlib
   compression-level: default default default
@@ -1344,6 +1418,7 @@
   generaldelta:      yes    yes     yes
   sparserevlog:      yes    yes     yes
   sidedata:          yes     no      no
+  copies-sdc:         no     no      no
   plain-cl-delta:    yes    yes     yes
   compression:       zstd   zstd    zlib
   compression-level: default default default
@@ -1371,6 +1446,7 @@
   generaldelta:      yes    yes     yes
   sparserevlog:      yes    yes     yes
   sidedata:           no     no      no
+  copies-sdc:         no     no      no
   plain-cl-delta:    yes    yes     yes
   compression:       zstd   zstd    zlib
   compression-level: default default default
@@ -1398,6 +1474,7 @@
   generaldelta:      yes    yes     yes
   sparserevlog:      yes    yes     yes
   sidedata:          yes    yes      no
+  copies-sdc:         no     no      no
   plain-cl-delta:    yes    yes     yes
   compression:       zstd   zstd    zlib
   compression-level: default default default