tests/test-upgrade-repo.t
author Boris Feld <boris.feld@octobus.net>
Thu, 07 Dec 2017 16:12:32 +0100
changeset 35338 bd326f3e0e14
parent 35337 cfb403b92f43
child 35340 ead01b74be04
permissions -rw-r--r--
debugformat: update label depending on value difference The new label highlight areas where the repo format differs from current config or default. This should help people spot area where a repository mismatch with the expected state.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
30775
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
     1
  $ cat >> $HGRCPATH << EOF
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
     2
  > [extensions]
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
     3
  > share =
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
     4
  > EOF
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
     5
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
     6
store and revlogv1 are required in source
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
     7
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
     8
  $ hg --config format.usestore=false init no-store
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
     9
  $ hg -R no-store debugupgraderepo
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    10
  abort: cannot upgrade repository; requirement missing: store
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    11
  [255]
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    12
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    13
  $ hg init no-revlogv1
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    14
  $ cat > no-revlogv1/.hg/requires << EOF
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    15
  > dotencode
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    16
  > fncache
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    17
  > generaldelta
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    18
  > store
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    19
  > EOF
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    20
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    21
  $ hg -R no-revlogv1 debugupgraderepo
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    22
  abort: cannot upgrade repository; requirement missing: revlogv1
30774
eaa5607132a2 debugcommands: stub for debugupgraderepo command
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    23
  [255]
30775
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    24
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    25
Cannot upgrade shared repositories
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    26
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    27
  $ hg init share-parent
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    28
  $ hg -q share share-parent share-child
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    29
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    30
  $ hg -R share-child debugupgraderepo
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    31
  abort: cannot upgrade repository; unsupported source requirement: shared
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    32
  [255]
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    33
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    34
Do not yet support upgrading manifestv2 and treemanifest repos
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    35
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    36
  $ hg --config experimental.manifestv2=true init manifestv2
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    37
  $ hg -R manifestv2 debugupgraderepo
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    38
  abort: cannot upgrade repository; unsupported source requirement: manifestv2
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    39
  [255]
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    40
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    41
  $ hg --config experimental.treemanifest=true init treemanifest
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    42
  $ hg -R treemanifest debugupgraderepo
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    43
  abort: cannot upgrade repository; unsupported source requirement: treemanifest
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    44
  [255]
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    45
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    46
Cannot add manifestv2 or treemanifest requirement during upgrade
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    47
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    48
  $ hg init disallowaddedreq
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    49
  $ hg -R disallowaddedreq --config experimental.manifestv2=true --config experimental.treemanifest=true debugupgraderepo
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    50
  abort: cannot upgrade repository; do not support adding requirement: manifestv2, treemanifest
513d68a90398 repair: implement requirements checking for upgrades
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30774
diff changeset
    51
  [255]
30776
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
    52
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
    53
An upgrade of a repository created with recommended settings only suggests optimizations
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
    54
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
    55
  $ hg init empty
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
    56
  $ cd empty
35336
c3e4f196b6e0 debugformat: add a 'debugformat' command
Boris Feld <boris.feld@octobus.net>
parents: 35303
diff changeset
    57
  $ hg debugformat
c3e4f196b6e0 debugformat: add a 'debugformat' command
Boris Feld <boris.feld@octobus.net>
parents: 35303
diff changeset
    58
  format-variant repo
c3e4f196b6e0 debugformat: add a 'debugformat' command
Boris Feld <boris.feld@octobus.net>
parents: 35303
diff changeset
    59
  fncache:        yes
c3e4f196b6e0 debugformat: add a 'debugformat' command
Boris Feld <boris.feld@octobus.net>
parents: 35303
diff changeset
    60
  dotencode:      yes
c3e4f196b6e0 debugformat: add a 'debugformat' command
Boris Feld <boris.feld@octobus.net>
parents: 35303
diff changeset
    61
  generaldelta:   yes
c3e4f196b6e0 debugformat: add a 'debugformat' command
Boris Feld <boris.feld@octobus.net>
parents: 35303
diff changeset
    62
  plain-cl-delta: yes
35337
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
    63
  $ hg debugformat --verbose
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
    64
  format-variant repo config default
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
    65
  fncache:        yes    yes     yes
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
    66
  dotencode:      yes    yes     yes
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
    67
  generaldelta:   yes    yes     yes
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
    68
  plain-cl-delta: yes    yes     yes
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
    69
  $ hg debugformat --verbose --config format.usegfncache=no
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
    70
  format-variant repo config default
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
    71
  fncache:        yes    yes     yes
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
    72
  dotencode:      yes    yes     yes
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
    73
  generaldelta:   yes    yes     yes
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
    74
  plain-cl-delta: yes    yes     yes
35338
bd326f3e0e14 debugformat: update label depending on value difference
Boris Feld <boris.feld@octobus.net>
parents: 35337
diff changeset
    75
  $ hg debugformat --verbose --config format.usegfncache=no --color=debug
bd326f3e0e14 debugformat: update label depending on value difference
Boris Feld <boris.feld@octobus.net>
parents: 35337
diff changeset
    76
  format-variant repo config default
bd326f3e0e14 debugformat: update label depending on value difference
Boris Feld <boris.feld@octobus.net>
parents: 35337
diff changeset
    77
  [formatvariant.name.uptodate|fncache:       ][formatvariant.repo.uptodate| yes][formatvariant.config.default|    yes][formatvariant.default|     yes]
bd326f3e0e14 debugformat: update label depending on value difference
Boris Feld <boris.feld@octobus.net>
parents: 35337
diff changeset
    78
  [formatvariant.name.uptodate|dotencode:     ][formatvariant.repo.uptodate| yes][formatvariant.config.default|    yes][formatvariant.default|     yes]
bd326f3e0e14 debugformat: update label depending on value difference
Boris Feld <boris.feld@octobus.net>
parents: 35337
diff changeset
    79
  [formatvariant.name.uptodate|generaldelta:  ][formatvariant.repo.uptodate| yes][formatvariant.config.default|    yes][formatvariant.default|     yes]
bd326f3e0e14 debugformat: update label depending on value difference
Boris Feld <boris.feld@octobus.net>
parents: 35337
diff changeset
    80
  [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default|    yes][formatvariant.default|     yes]
30776
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
    81
  $ hg debugupgraderepo
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
    82
  (no feature deficiencies found in existing repository)
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
    83
  performing an upgrade with "--run" will make the following changes:
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
    84
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
    85
  requirements
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
    86
     preserved: dotencode, fncache, generaldelta, revlogv1, store
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
    87
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
    88
  additional optimizations are available by specifying "--optimize <name>":
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
    89
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
    90
  redeltaparent
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
    91
     deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
    92
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
    93
  redeltamultibase
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
    94
     deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
    95
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
    96
  redeltaall
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
    97
     deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
    98
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
    99
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   100
--optimize can be used to add optimizations
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   101
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   102
  $ hg debugupgrade --optimize redeltaparent
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   103
  (no feature deficiencies found in existing repository)
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   104
  performing an upgrade with "--run" will make the following changes:
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   105
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   106
  requirements
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   107
     preserved: dotencode, fncache, generaldelta, revlogv1, store
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   108
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   109
  redeltaparent
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   110
     deltas within internal storage will choose a new base revision if needed
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   111
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   112
  additional optimizations are available by specifying "--optimize <name>":
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   113
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   114
  redeltamultibase
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   115
     deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   116
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   117
  redeltaall
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   118
     deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   119
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   120
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   121
Various sub-optimal detections work
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   122
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   123
  $ cat > .hg/requires << EOF
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   124
  > revlogv1
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   125
  > store
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   126
  > EOF
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   127
35336
c3e4f196b6e0 debugformat: add a 'debugformat' command
Boris Feld <boris.feld@octobus.net>
parents: 35303
diff changeset
   128
  $ hg debugformat
c3e4f196b6e0 debugformat: add a 'debugformat' command
Boris Feld <boris.feld@octobus.net>
parents: 35303
diff changeset
   129
  format-variant repo
c3e4f196b6e0 debugformat: add a 'debugformat' command
Boris Feld <boris.feld@octobus.net>
parents: 35303
diff changeset
   130
  fncache:         no
c3e4f196b6e0 debugformat: add a 'debugformat' command
Boris Feld <boris.feld@octobus.net>
parents: 35303
diff changeset
   131
  dotencode:       no
c3e4f196b6e0 debugformat: add a 'debugformat' command
Boris Feld <boris.feld@octobus.net>
parents: 35303
diff changeset
   132
  generaldelta:    no
c3e4f196b6e0 debugformat: add a 'debugformat' command
Boris Feld <boris.feld@octobus.net>
parents: 35303
diff changeset
   133
  plain-cl-delta: yes
35337
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
   134
  $ hg debugformat --verbose
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
   135
  format-variant repo config default
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
   136
  fncache:         no    yes     yes
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
   137
  dotencode:       no    yes     yes
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
   138
  generaldelta:    no    yes     yes
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
   139
  plain-cl-delta: yes    yes     yes
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
   140
  $ hg debugformat --verbose --config format.usegeneraldelta=no
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
   141
  format-variant repo config default
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
   142
  fncache:         no    yes     yes
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
   143
  dotencode:       no    yes     yes
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
   144
  generaldelta:    no     no     yes
cfb403b92f43 debugformat: add data about the config when verbose
Boris Feld <boris.feld@octobus.net>
parents: 35336
diff changeset
   145
  plain-cl-delta: yes    yes     yes
35338
bd326f3e0e14 debugformat: update label depending on value difference
Boris Feld <boris.feld@octobus.net>
parents: 35337
diff changeset
   146
  $ hg debugformat --verbose --config format.usegeneraldelta=no --color=debug
bd326f3e0e14 debugformat: update label depending on value difference
Boris Feld <boris.feld@octobus.net>
parents: 35337
diff changeset
   147
  format-variant repo config default
bd326f3e0e14 debugformat: update label depending on value difference
Boris Feld <boris.feld@octobus.net>
parents: 35337
diff changeset
   148
  [formatvariant.name.mismatchconfig|fncache:       ][formatvariant.repo.mismatchconfig|  no][formatvariant.config.default|    yes][formatvariant.default|     yes]
bd326f3e0e14 debugformat: update label depending on value difference
Boris Feld <boris.feld@octobus.net>
parents: 35337
diff changeset
   149
  [formatvariant.name.mismatchconfig|dotencode:     ][formatvariant.repo.mismatchconfig|  no][formatvariant.config.default|    yes][formatvariant.default|     yes]
bd326f3e0e14 debugformat: update label depending on value difference
Boris Feld <boris.feld@octobus.net>
parents: 35337
diff changeset
   150
  [formatvariant.name.mismatchdefault|generaldelta:  ][formatvariant.repo.mismatchdefault|  no][formatvariant.config.special|     no][formatvariant.default|     yes]
bd326f3e0e14 debugformat: update label depending on value difference
Boris Feld <boris.feld@octobus.net>
parents: 35337
diff changeset
   151
  [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default|    yes][formatvariant.default|     yes]
30776
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   152
  $ hg debugupgraderepo
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   153
  repository lacks features recommended by current config options:
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   154
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   155
  fncache
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   156
     long and reserved filenames may not work correctly; repository performance is sub-optimal
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   157
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   158
  dotencode
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   159
     storage of filenames beginning with a period or space may not work correctly
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   160
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   161
  generaldelta
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   162
     deltas within internal storage are unable to choose optimal revisions; repository is larger and slower than it could be; interaction with other repositories may require extra network and CPU resources, making "hg push" and "hg pull" slower
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   163
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   164
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   165
  performing an upgrade with "--run" will make the following changes:
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   166
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   167
  requirements
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   168
     preserved: revlogv1, store
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   169
     added: dotencode, fncache, generaldelta
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   170
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   171
  fncache
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   172
     repository will be more resilient to storing certain paths and performance of certain operations should be improved
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   173
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   174
  dotencode
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   175
     repository will be better able to store files beginning with a space or period
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   176
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   177
  generaldelta
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   178
     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
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   179
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   180
  additional optimizations are available by specifying "--optimize <name>":
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   181
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   182
  redeltaparent
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   183
     deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   184
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   185
  redeltamultibase
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   186
     deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   187
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   188
  redeltaall
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   189
     deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   190
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   191
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   192
  $ hg --config format.dotencode=false debugupgraderepo
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   193
  repository lacks features recommended by current config options:
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   194
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   195
  fncache
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   196
     long and reserved filenames may not work correctly; repository performance is sub-optimal
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   197
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   198
  generaldelta
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   199
     deltas within internal storage are unable to choose optimal revisions; repository is larger and slower than it could be; interaction with other repositories may require extra network and CPU resources, making "hg push" and "hg pull" slower
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   200
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   201
  repository lacks features used by the default config options:
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   202
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   203
  dotencode
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   204
     storage of filenames beginning with a period or space may not work correctly
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   205
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   206
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   207
  performing an upgrade with "--run" will make the following changes:
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   208
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   209
  requirements
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   210
     preserved: revlogv1, store
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   211
     added: fncache, generaldelta
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   212
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   213
  fncache
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   214
     repository will be more resilient to storing certain paths and performance of certain operations should be improved
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   215
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   216
  generaldelta
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   217
     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
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   218
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   219
  additional optimizations are available by specifying "--optimize <name>":
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   220
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   221
  redeltaparent
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   222
     deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   223
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   224
  redeltamultibase
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   225
     deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   226
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   227
  redeltaall
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   228
     deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   229
  
3997edc4a86d repair: determine what upgrade will do
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30775
diff changeset
   230
30777
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   231
  $ cd ..
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   232
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   233
Upgrading a repository that is already modern essentially no-ops
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   234
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   235
  $ hg init modern
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   236
  $ hg -R modern debugupgraderepo --run
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   237
  upgrade will perform the following actions:
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   238
  
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   239
  requirements
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   240
     preserved: dotencode, fncache, generaldelta, revlogv1, store
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   241
  
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   242
  beginning upgrade...
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   243
  repository locked and read-only
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   244
  creating temporary repository to stage migrated data: $TESTTMP/modern/.hg/upgrade.* (glob)
30779
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   245
  (it is safe to interrupt this process any time before data migration completes)
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   246
  data fully migrated to temporary repository
30777
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   247
  marking source repository as being upgraded; clients will be unable to read from repository
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   248
  starting in-place swap of repository data
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   249
  replaced files will be backed up at $TESTTMP/modern/.hg/upgradebackup.* (glob)
30779
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   250
  replacing store...
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   251
  store replacement complete; repository was inconsistent for *s (glob)
30777
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   252
  finalizing requirements file and making repository readable again
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   253
  removing temporary repository $TESTTMP/modern/.hg/upgrade.* (glob)
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   254
  copy of old repository backed up at $TESTTMP/modern/.hg/upgradebackup.* (glob)
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   255
  the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   256
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   257
Upgrading a repository to generaldelta works
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   258
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   259
  $ hg --config format.usegeneraldelta=false init upgradegd
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   260
  $ cd upgradegd
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   261
  $ touch f0
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   262
  $ hg -q commit -A -m initial
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   263
  $ touch f1
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   264
  $ hg -q commit -A -m 'add f1'
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   265
  $ hg -q up -r 0
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   266
  $ touch f2
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   267
  $ hg -q commit -A -m 'add f2'
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   268
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   269
  $ hg debugupgraderepo --run
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   270
  upgrade will perform the following actions:
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   271
  
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   272
  requirements
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   273
     preserved: dotencode, fncache, revlogv1, store
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   274
     added: generaldelta
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   275
  
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   276
  generaldelta
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   277
     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
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   278
  
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   279
  beginning upgrade...
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   280
  repository locked and read-only
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   281
  creating temporary repository to stage migrated data: $TESTTMP/upgradegd/.hg/upgrade.* (glob)
30779
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   282
  (it is safe to interrupt this process any time before data migration completes)
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   283
  migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog)
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   284
  migrating 341 bytes in store; 401 bytes tracked data
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   285
  migrating 3 filelogs containing 3 revisions (0 bytes in store; 0 bytes tracked data)
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   286
  finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   287
  migrating 1 manifests containing 3 revisions (157 bytes in store; 220 bytes tracked data)
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   288
  finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   289
  migrating changelog containing 3 revisions (184 bytes in store; 181 bytes tracked data)
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   290
  finished migrating 3 changelog revisions; change in size: 0 bytes
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   291
  finished migrating 9 total revisions; total change in store size: 0 bytes
30780
2603d04889e1 repair: copy non-revlog store files during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30779
diff changeset
   292
  copying phaseroots
30779
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   293
  data fully migrated to temporary repository
30777
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   294
  marking source repository as being upgraded; clients will be unable to read from repository
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   295
  starting in-place swap of repository data
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   296
  replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
30779
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   297
  replacing store...
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   298
  store replacement complete; repository was inconsistent for *s (glob)
30777
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   299
  finalizing requirements file and making repository readable again
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   300
  removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob)
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   301
  copy of old repository backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob)
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   302
  the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   303
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   304
Original requirements backed up
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   305
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   306
  $ cat .hg/upgradebackup.*/requires
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   307
  dotencode
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   308
  fncache
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   309
  revlogv1
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   310
  store
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   311
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   312
generaldelta added to original requirements files
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   313
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   314
  $ cat .hg/requires
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   315
  dotencode
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   316
  fncache
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   317
  generaldelta
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   318
  revlogv1
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   319
  store
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   320
30779
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   321
store directory has files we expect
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   322
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   323
  $ ls .hg/store
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   324
  00changelog.i
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   325
  00manifest.i
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   326
  data
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   327
  fncache
30780
2603d04889e1 repair: copy non-revlog store files during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30779
diff changeset
   328
  phaseroots
30779
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   329
  undo
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   330
  undo.backupfiles
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   331
  undo.phaseroots
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   332
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   333
manifest should be generaldelta
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   334
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   335
  $ hg debugrevlog -m | grep flags
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   336
  flags  : inline, generaldelta
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   337
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   338
verify should be happy
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   339
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   340
  $ hg verify
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   341
  checking changesets
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   342
  checking manifests
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   343
  crosschecking files in changesets and manifests
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   344
  checking files
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   345
  3 files, 3 changesets, 3 total revisions
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   346
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   347
old store should be backed up
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   348
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   349
  $ ls .hg/upgradebackup.*/store
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   350
  00changelog.i
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   351
  00manifest.i
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   352
  data
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   353
  fncache
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   354
  phaseroots
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   355
  undo
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   356
  undo.backup.fncache
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   357
  undo.backupfiles
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   358
  undo.phaseroots
38aa1ca97b6a repair: migrate revlogs during upgrade
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30777
diff changeset
   359
30777
7de7afd8bdd9 repair: begin implementation of in-place upgrading
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30776
diff changeset
   360
  $ cd ..
31798
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
   361
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
   362
store files with special filenames aren't encoded during copy
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
   363
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
   364
  $ hg init store-filenames
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
   365
  $ cd store-filenames
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
   366
  $ touch foo
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
   367
  $ hg -q commit -A -m initial
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
   368
  $ touch .hg/store/.XX_special_filename
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
   369
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
   370
  $ hg debugupgraderepo --run
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
   371
  upgrade will perform the following actions:
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
   372
  
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
   373
  requirements
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
   374
     preserved: dotencode, fncache, generaldelta, revlogv1, store
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
   375
  
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
   376
  beginning upgrade...
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
   377
  repository locked and read-only
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
   378
  creating temporary repository to stage migrated data: $TESTTMP/store-filenames/.hg/upgrade.* (glob)
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
   379
  (it is safe to interrupt this process any time before data migration completes)
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
   380
  migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
   381
  migrating 109 bytes in store; 107 bytes tracked data
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
   382
  migrating 1 filelogs containing 1 revisions (0 bytes in store; 0 bytes tracked data)
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
   383
  finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
   384
  migrating 1 manifests containing 1 revisions (46 bytes in store; 45 bytes tracked data)
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
   385
  finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
   386
  migrating changelog containing 1 revisions (63 bytes in store; 62 bytes tracked data)
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
   387
  finished migrating 1 changelog revisions; change in size: 0 bytes
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
   388
  finished migrating 3 total revisions; total change in store size: 0 bytes
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
   389
  copying .XX_special_filename
31799
8110d49e0558 repair: use rawvfs when copying extra store files
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31798
diff changeset
   390
  copying phaseroots
8110d49e0558 repair: use rawvfs when copying extra store files
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31798
diff changeset
   391
  data fully migrated to temporary repository
8110d49e0558 repair: use rawvfs when copying extra store files
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31798
diff changeset
   392
  marking source repository as being upgraded; clients will be unable to read from repository
8110d49e0558 repair: use rawvfs when copying extra store files
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31798
diff changeset
   393
  starting in-place swap of repository data
8110d49e0558 repair: use rawvfs when copying extra store files
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31798
diff changeset
   394
  replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
8110d49e0558 repair: use rawvfs when copying extra store files
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31798
diff changeset
   395
  replacing store...
8110d49e0558 repair: use rawvfs when copying extra store files
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31798
diff changeset
   396
  store replacement complete; repository was inconsistent for *s (glob)
8110d49e0558 repair: use rawvfs when copying extra store files
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31798
diff changeset
   397
  finalizing requirements file and making repository readable again
31798
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
   398
  removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob)
31799
8110d49e0558 repair: use rawvfs when copying extra store files
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31798
diff changeset
   399
  copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob)
8110d49e0558 repair: use rawvfs when copying extra store files
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31798
diff changeset
   400
  the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
31798
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
   401
8c9178d647f7 tests: add test demonstrating buggy path handling
Gregory Szorc <gregory.szorc@gmail.com>
parents: 30781
diff changeset
   402
  $ cd ..
35303
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   403
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   404
Check upgrading a large file repository
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   405
---------------------------------------
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   406
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   407
  $ hg init largefilesrepo
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   408
  $ cat << EOF >> largefilesrepo/.hg/hgrc
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   409
  > [extensions]
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   410
  > largefiles =
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   411
  > EOF
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   412
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   413
  $ cd largefilesrepo
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   414
  $ touch foo
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   415
  $ hg add --large foo
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   416
  $ hg -q commit -m initial
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   417
  $ cat .hg/requires
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   418
  dotencode
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   419
  fncache
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   420
  generaldelta
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   421
  largefiles
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   422
  revlogv1
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   423
  store
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   424
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   425
  $ hg debugupgraderepo --run
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   426
  upgrade will perform the following actions:
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   427
  
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   428
  requirements
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   429
     preserved: dotencode, fncache, generaldelta, largefiles, revlogv1, store
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   430
  
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   431
  beginning upgrade...
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   432
  repository locked and read-only
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   433
  creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   434
  (it is safe to interrupt this process any time before data migration completes)
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   435
  migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   436
  migrating 163 bytes in store; 160 bytes tracked data
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   437
  migrating 1 filelogs containing 1 revisions (42 bytes in store; 41 bytes tracked data)
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   438
  finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   439
  migrating 1 manifests containing 1 revisions (52 bytes in store; 51 bytes tracked data)
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   440
  finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   441
  migrating changelog containing 1 revisions (69 bytes in store; 68 bytes tracked data)
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   442
  finished migrating 1 changelog revisions; change in size: 0 bytes
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   443
  finished migrating 3 total revisions; total change in store size: 0 bytes
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   444
  copying phaseroots
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   445
  data fully migrated to temporary repository
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   446
  marking source repository as being upgraded; clients will be unable to read from repository
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   447
  starting in-place swap of repository data
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   448
  replaced files will be backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob)
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   449
  replacing store...
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   450
  store replacement complete; repository was inconsistent for 0.0s
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   451
  finalizing requirements file and making repository readable again
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   452
  removing temporary repository $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   453
  copy of old repository backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob)
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   454
  the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   455
  $ cat .hg/requires
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   456
  dotencode
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   457
  fncache
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   458
  generaldelta
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   459
  largefiles
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   460
  revlogv1
67b7e39b441b largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents: 31799
diff changeset
   461
  store