D6946: sidedatacopies: teach upgrade about the new requirement

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Thu Oct 3 01:55:47 EDT 2019


marmoute created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  The `debugformat` and `debugupgraderepo` command now detect the requirement.
  (upgrade to and from are not currently possible).

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6946

AFFECTED FILES
  mercurial/upgrade.py
  tests/test-lfs-serve.t
  tests/test-sidedata.t
  tests/test-upgrade-repo.t

CHANGE DETAILS

diff --git a/tests/test-upgrade-repo.t b/tests/test-upgrade-repo.t
--- a/tests/test-upgrade-repo.t
+++ b/tests/test-upgrade-repo.t
@@ -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
   
@@ -658,6 +699,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
   
@@ -707,6 +751,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
   
@@ -756,6 +803,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
   
@@ -810,6 +860,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
   
@@ -865,6 +918,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
   
@@ -922,6 +978,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)
@@ -956,6 +1015,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
   
@@ -1023,6 +1085,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)
@@ -1079,6 +1144,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)
@@ -1177,6 +1245,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
   
@@ -1269,6 +1340,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
@@ -1291,6 +1363,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
@@ -1316,6 +1389,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
@@ -1343,6 +1417,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
@@ -1370,6 +1445,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
@@ -1397,6 +1473,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
diff --git a/tests/test-sidedata.t b/tests/test-sidedata.t
--- a/tests/test-sidedata.t
+++ b/tests/test-sidedata.t
@@ -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
diff --git a/tests/test-lfs-serve.t b/tests/test-lfs-serve.t
--- a/tests/test-lfs-serve.t
+++ b/tests/test-lfs-serve.t
@@ -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)
diff --git a/mercurial/upgrade.py b/mercurial/upgrade.py
--- a/mercurial/upgrade.py
+++ b/mercurial/upgrade.py
@@ -334,6 +334,19 @@
     upgrademessage = _('Allows storage of extra data alongside a revision.')
 
 @registerformatvariant
+class copiessdc(requirementformatvariant):
+    name = 'copies-sdc'
+
+    _requirement = localrepo.COPIESSDC_REQUIREMENT
+
+    default = False
+
+    description = _('Stores copies information alongside changesets.')
+
+    upgrademessage = _('Allows to use more efficient algorithm to deal with '
+                       'copy tracing.')
+
+ at registerformatvariant
 class removecldeltachain(formatvariant):
     name = 'plain-cl-delta'
 



To: marmoute, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list