tests/test-copies-in-changeset.t
author Raphaël Gomès <rgomes@octobus.net>
Fri, 23 Jul 2021 10:47:12 +0200
branchstable
changeset 47805 6ec897345b87
parent 47328 a43d256c041a
child 48680 5d9ef794ea64
permissions -rw-r--r--
windows-ci: run Windows CI automatically alongside the others This will enable us to make Windows Python 3 a first-class citizen for the next 6.0 cycle. We will probably get some flaky tests and we're missing others that are skipped, but we'll turn them on it future patches. Differential Revision: https://phab.mercurial-scm.org/D11256
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
     1
#testcases extra sidedata
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
     2
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
     3
#if extra
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
     4
  $ cat >> $HGRCPATH << EOF
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
     5
  > [experimental]
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
     6
  > copies.write-to=changeset-only
42142
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
     7
  > copies.read-from=changeset-only
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
     8
  > [alias]
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
     9
  > changesetcopies = log -r . -T 'files: {files}
42425
f385ba70e4af changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42327
diff changeset
    10
  >   {extras % "{ifcontains("files", key, "{key}: {value}\n")}"}
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    11
  >   {extras % "{ifcontains("copies", key, "{key}: {value}\n")}"}'
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
    12
  > EOF
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
    13
#endif
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
    14
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
    15
#if sidedata
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
    16
  $ cat >> $HGRCPATH << EOF
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
    17
  > [format]
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
    18
  > exp-use-copies-side-data-changeset = yes
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
    19
  > EOF
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
    20
#endif
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
    21
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
    22
  $ cat >> $HGRCPATH << EOF
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
    23
  > [alias]
42142
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
    24
  > showcopies = log -r . -T '{file_copies % "{source} -> {name}\n"}'
42316
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
    25
  > [extensions]
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
    26
  > rebase =
42864
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42443
diff changeset
    27
  > split =
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    28
  > EOF
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    29
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    30
Check that copies are recorded correctly
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    31
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    32
  $ hg init repo
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    33
  $ cd repo
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
    34
#if sidedata
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
    35
  $ hg debugformat -v
44876
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
    36
  format-variant     repo config default
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
    37
  fncache:            yes    yes     yes
47328
a43d256c041a dirstate-v2: Add `hg debugupgraderepo` command support
Simon Sapin <simon.sapin@octobus.net>
parents: 47276
diff changeset
    38
  dirstate-v2:         no     no      no
44876
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
    39
  dotencode:          yes    yes     yes
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
    40
  generaldelta:       yes    yes     yes
46334
6e81446bf1d9 share: move share safe functionality out of experimental
Pulkit Goyal <7895pulkit@gmail.com>
parents: 46017
diff changeset
    41
  share-safe:          no     no      no
44876
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
    42
  sparserevlog:       yes    yes     yes
46884
cc3ad5c3af3b persistent-nodemap: enable the feature by default when using Rust
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46874
diff changeset
    43
  persistent-nodemap:  no     no      no (no-rust !)
cc3ad5c3af3b persistent-nodemap: enable the feature by default when using Rust
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46874
diff changeset
    44
  persistent-nodemap: yes    yes      no (rust !)
44876
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
    45
  copies-sdc:         yes    yes      no
47276
a07381751dc9 changelogv2: `copies-side-data` now implies `changelogv2`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47274
diff changeset
    46
  revlog-v2:           no     no      no
a07381751dc9 changelogv2: `copies-side-data` now implies `changelogv2`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47274
diff changeset
    47
  changelog-v2:       yes    yes      no
44876
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
    48
  plain-cl-delta:     yes    yes     yes
46874
84a93fa7ecfd revlog-compression: use zstd by default (if available)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46731
diff changeset
    49
  compression:        zlib   zlib    zlib (no-zstd !)
84a93fa7ecfd revlog-compression: use zstd by default (if available)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46731
diff changeset
    50
  compression:        zstd   zstd    zstd (zstd !)
44876
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
    51
  compression-level:  default default default
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
    52
#else
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
    53
  $ hg debugformat -v
44876
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
    54
  format-variant     repo config default
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
    55
  fncache:            yes    yes     yes
47328
a43d256c041a dirstate-v2: Add `hg debugupgraderepo` command support
Simon Sapin <simon.sapin@octobus.net>
parents: 47276
diff changeset
    56
  dirstate-v2:         no     no      no
44876
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
    57
  dotencode:          yes    yes     yes
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
    58
  generaldelta:       yes    yes     yes
46334
6e81446bf1d9 share: move share safe functionality out of experimental
Pulkit Goyal <7895pulkit@gmail.com>
parents: 46017
diff changeset
    59
  share-safe:          no     no      no
44876
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
    60
  sparserevlog:       yes    yes     yes
46884
cc3ad5c3af3b persistent-nodemap: enable the feature by default when using Rust
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46874
diff changeset
    61
  persistent-nodemap:  no     no      no (no-rust !)
cc3ad5c3af3b persistent-nodemap: enable the feature by default when using Rust
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46874
diff changeset
    62
  persistent-nodemap: yes    yes      no (rust !)
44876
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
    63
  copies-sdc:          no     no      no
46718
fd55a9eb1507 revlogv2: allow upgrading to v2
Raphaël Gomès <rgomes@octobus.net>
parents: 46436
diff changeset
    64
  revlog-v2:           no     no      no
47274
6c84fc9c9a90 changelogv2: introduce a "changelogv2" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47238
diff changeset
    65
  changelog-v2:        no     no      no
44876
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
    66
  plain-cl-delta:     yes    yes     yes
46874
84a93fa7ecfd revlog-compression: use zstd by default (if available)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46731
diff changeset
    67
  compression:        zlib   zlib    zlib (no-zstd !)
84a93fa7ecfd revlog-compression: use zstd by default (if available)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46731
diff changeset
    68
  compression:        zstd   zstd    zstd (zstd !)
44876
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
    69
  compression-level:  default default default
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
    70
#endif
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    71
  $ echo a > a
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    72
  $ hg add a
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    73
  $ hg ci -m initial
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    74
  $ hg cp a b
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    75
  $ hg cp a c
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    76
  $ hg cp a d
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    77
  $ hg ci -m 'copy a to b, c, and d'
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
    78
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
    79
#if extra
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
    80
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    81
  $ hg changesetcopies
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    82
  files: b c d
42443
027f1567f97f copies: separate added/removed files by newline instead of null
Martin von Zweigbergk <martinvonz@google.com>
parents: 42442
diff changeset
    83
  filesadded: 0
027f1567f97f copies: separate added/removed files by newline instead of null
Martin von Zweigbergk <martinvonz@google.com>
parents: 42442
diff changeset
    84
  1
027f1567f97f copies: separate added/removed files by newline instead of null
Martin von Zweigbergk <martinvonz@google.com>
parents: 42442
diff changeset
    85
  2
42425
f385ba70e4af changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42327
diff changeset
    86
  
42442
a1f87294471f copies: also encode p[12]copies destination as index into "files" list
Martin von Zweigbergk <martinvonz@google.com>
parents: 42425
diff changeset
    87
  p1copies: 0\x00a (esc)
a1f87294471f copies: also encode p[12]copies destination as index into "files" list
Martin von Zweigbergk <martinvonz@google.com>
parents: 42425
diff changeset
    88
  1\x00a (esc)
a1f87294471f copies: also encode p[12]copies destination as index into "files" list
Martin von Zweigbergk <martinvonz@google.com>
parents: 42425
diff changeset
    89
  2\x00a (esc)
43142
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
    90
#else
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
    91
  $ hg debugsidedata -c -v -- -1
45636
9a6b409b8ebc changing-files: rework the way we store changed files in side-data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44876
diff changeset
    92
  1 sidedata entries
9a6b409b8ebc changing-files: rework the way we store changed files in side-data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44876
diff changeset
    93
   entry-0014 size 44
9a6b409b8ebc changing-files: rework the way we store changed files in side-data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44876
diff changeset
    94
    '\x00\x00\x00\x04\x00\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00\x06\x00\x00\x00\x03\x00\x00\x00\x00\x06\x00\x00\x00\x04\x00\x00\x00\x00abcd'
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
    95
#endif
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
    96
42142
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
    97
  $ hg showcopies
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
    98
  a -> b
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
    99
  a -> c
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
   100
  a -> d
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   101
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   102
#if extra
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   103
42142
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
   104
  $ hg showcopies --config experimental.copies.read-from=compatibility
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
   105
  a -> b
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
   106
  a -> c
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
   107
  a -> d
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
   108
  $ hg showcopies --config experimental.copies.read-from=filelog-only
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   109
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   110
#endif
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   111
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   112
Check that renames are recorded correctly
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   113
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   114
  $ hg mv b b2
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   115
  $ hg ci -m 'rename b to b2'
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   116
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   117
#if extra
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   118
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   119
  $ hg changesetcopies
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   120
  files: b b2
42425
f385ba70e4af changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42327
diff changeset
   121
  filesadded: 1
f385ba70e4af changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42327
diff changeset
   122
  filesremoved: 0
f385ba70e4af changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42327
diff changeset
   123
  
42442
a1f87294471f copies: also encode p[12]copies destination as index into "files" list
Martin von Zweigbergk <martinvonz@google.com>
parents: 42425
diff changeset
   124
  p1copies: 1\x00b (esc)
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   125
43142
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
   126
#else
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
   127
  $ hg debugsidedata -c -v -- -1
45636
9a6b409b8ebc changing-files: rework the way we store changed files in side-data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44876
diff changeset
   128
  1 sidedata entries
9a6b409b8ebc changing-files: rework the way we store changed files in side-data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44876
diff changeset
   129
   entry-0014 size 25
9a6b409b8ebc changing-files: rework the way we store changed files in side-data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44876
diff changeset
   130
    '\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x03\x00\x00\x00\x00bb2'
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   131
#endif
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   132
42142
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
   133
  $ hg showcopies
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
   134
  b -> b2
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   135
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   136
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   137
Rename onto existing file. This should get recorded in the changeset files list and in the extras,
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   138
even though there is no filelog entry.
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   139
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   140
  $ hg cp b2 c --force
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   141
  $ hg st --copies
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   142
  M c
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   143
    b2
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   144
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   145
#if extra
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   146
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   147
  $ hg debugindex c
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   148
     rev linkrev nodeid       p1           p2
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   149
       0       1 b789fdd96dc2 000000000000 000000000000
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   150
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   151
#else
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   152
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   153
  $ hg debugindex c
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   154
     rev linkrev nodeid       p1           p2
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   155
       0       1 37d9b5d994ea 000000000000 000000000000
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   156
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   157
#endif
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   158
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   159
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   160
  $ hg ci -m 'move b onto d'
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   161
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   162
#if extra
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   163
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   164
  $ hg changesetcopies
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   165
  files: c
42425
f385ba70e4af changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42327
diff changeset
   166
  
42442
a1f87294471f copies: also encode p[12]copies destination as index into "files" list
Martin von Zweigbergk <martinvonz@google.com>
parents: 42425
diff changeset
   167
  p1copies: 0\x00b2 (esc)
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   168
43142
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
   169
#else
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
   170
  $ hg debugsidedata -c -v -- -1
43231
30570a056fa8 sidedatacopies: only store an entry if it has values
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
   171
  1 sidedata entries
45636
9a6b409b8ebc changing-files: rework the way we store changed files in side-data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44876
diff changeset
   172
   entry-0014 size 25
9a6b409b8ebc changing-files: rework the way we store changed files in side-data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44876
diff changeset
   173
    '\x00\x00\x00\x02\x00\x00\x00\x00\x02\x00\x00\x00\x00\x16\x00\x00\x00\x03\x00\x00\x00\x00b2c'
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   174
#endif
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   175
42142
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
   176
  $ hg showcopies
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
   177
  b2 -> c
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   178
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   179
#if extra
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   180
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   181
  $ hg debugindex c
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   182
     rev linkrev nodeid       p1           p2
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   183
       0       1 b789fdd96dc2 000000000000 000000000000
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   184
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   185
#else
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   186
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   187
  $ hg debugindex c
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   188
     rev linkrev nodeid       p1           p2
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   189
       0       1 37d9b5d994ea 000000000000 000000000000
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   190
       1       3 029625640347 000000000000 000000000000
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   191
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   192
#endif
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   193
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   194
Create a merge commit with copying done during merge.
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   195
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   196
  $ hg co 0
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   197
  0 files updated, 0 files merged, 3 files removed, 0 files unresolved
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   198
  $ hg cp a e
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   199
  $ hg cp a f
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   200
  $ hg ci -m 'copy a to e and f'
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   201
  created new head
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   202
  $ hg merge 3
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   203
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   204
  (branch merge, don't forget to commit)
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   205
File 'a' exists on both sides, so 'g' could be recorded as being from p1 or p2, but we currently
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   206
always record it as being from p1
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   207
  $ hg cp a g
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   208
File 'd' exists only in p2, so 'h' should be from p2
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   209
  $ hg cp d h
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   210
File 'f' exists only in p1, so 'i' should be from p1
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   211
  $ hg cp f i
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   212
  $ hg ci -m 'merge'
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   213
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   214
#if extra
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   215
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   216
  $ hg changesetcopies
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   217
  files: g h i
42443
027f1567f97f copies: separate added/removed files by newline instead of null
Martin von Zweigbergk <martinvonz@google.com>
parents: 42442
diff changeset
   218
  filesadded: 0
027f1567f97f copies: separate added/removed files by newline instead of null
Martin von Zweigbergk <martinvonz@google.com>
parents: 42442
diff changeset
   219
  1
027f1567f97f copies: separate added/removed files by newline instead of null
Martin von Zweigbergk <martinvonz@google.com>
parents: 42442
diff changeset
   220
  2
42425
f385ba70e4af changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42327
diff changeset
   221
  
42442
a1f87294471f copies: also encode p[12]copies destination as index into "files" list
Martin von Zweigbergk <martinvonz@google.com>
parents: 42425
diff changeset
   222
  p1copies: 0\x00a (esc)
a1f87294471f copies: also encode p[12]copies destination as index into "files" list
Martin von Zweigbergk <martinvonz@google.com>
parents: 42425
diff changeset
   223
  2\x00f (esc)
a1f87294471f copies: also encode p[12]copies destination as index into "files" list
Martin von Zweigbergk <martinvonz@google.com>
parents: 42425
diff changeset
   224
  p2copies: 1\x00d (esc)
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   225
43142
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
   226
#else
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
   227
  $ hg debugsidedata -c -v -- -1
45636
9a6b409b8ebc changing-files: rework the way we store changed files in side-data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44876
diff changeset
   228
  1 sidedata entries
9a6b409b8ebc changing-files: rework the way we store changed files in side-data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44876
diff changeset
   229
   entry-0014 size 64
9a6b409b8ebc changing-files: rework the way we store changed files in side-data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44876
diff changeset
   230
    '\x00\x00\x00\x06\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x06\x00\x00\x00\x04\x00\x00\x00\x00\x07\x00\x00\x00\x05\x00\x00\x00\x01\x06\x00\x00\x00\x06\x00\x00\x00\x02adfghi'
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   231
#endif
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   232
42142
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
   233
  $ hg showcopies
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
   234
  a -> g
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
   235
  d -> h
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
   236
  f -> i
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   237
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   238
Test writing to both changeset and filelog
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   239
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   240
  $ hg cp a j
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   241
#if extra
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   242
  $ hg ci -m 'copy a to j' --config experimental.copies.write-to=compatibility
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   243
  $ hg changesetcopies
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   244
  files: j
42425
f385ba70e4af changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42327
diff changeset
   245
  filesadded: 0
f385ba70e4af changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42327
diff changeset
   246
  filesremoved: 
f385ba70e4af changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42327
diff changeset
   247
  
42442
a1f87294471f copies: also encode p[12]copies destination as index into "files" list
Martin von Zweigbergk <martinvonz@google.com>
parents: 42425
diff changeset
   248
  p1copies: 0\x00a (esc)
42327
278dcb24e535 copies: write empty entries in changeset when also writing to filelog
Martin von Zweigbergk <martinvonz@google.com>
parents: 42318
diff changeset
   249
  p2copies: 
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   250
#else
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   251
  $ hg ci -m 'copy a to j'
43142
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
   252
  $ hg debugsidedata -c -v -- -1
45636
9a6b409b8ebc changing-files: rework the way we store changed files in side-data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44876
diff changeset
   253
  1 sidedata entries
9a6b409b8ebc changing-files: rework the way we store changed files in side-data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44876
diff changeset
   254
   entry-0014 size 24
9a6b409b8ebc changing-files: rework the way we store changed files in side-data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44876
diff changeset
   255
    '\x00\x00\x00\x02\x00\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00aj'
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   256
#endif
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   257
  $ hg debugdata j 0
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   258
  \x01 (esc)
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   259
  copy: a
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   260
  copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   261
  \x01 (esc)
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   262
  a
42142
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
   263
  $ hg showcopies
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
   264
  a -> j
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
   265
  $ hg showcopies --config experimental.copies.read-from=compatibility
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
   266
  a -> j
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
   267
  $ hg showcopies --config experimental.copies.read-from=filelog-only
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
   268
  a -> j
42866
6f0273558c4b tests: show invalid copies when turning off copies-in-changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42865
diff changeset
   269
Existing copy information in the changeset gets removed on amend and writing
6f0273558c4b tests: show invalid copies when turning off copies-in-changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42865
diff changeset
   270
copy information on to the filelog
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   271
#if extra
42866
6f0273558c4b tests: show invalid copies when turning off copies-in-changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42865
diff changeset
   272
  $ hg ci --amend -m 'copy a to j, v2' \
6f0273558c4b tests: show invalid copies when turning off copies-in-changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42865
diff changeset
   273
  > --config experimental.copies.write-to=filelog-only
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   274
  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-*-amend.hg (glob)
42866
6f0273558c4b tests: show invalid copies when turning off copies-in-changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42865
diff changeset
   275
  $ hg changesetcopies
6f0273558c4b tests: show invalid copies when turning off copies-in-changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42865
diff changeset
   276
  files: j
6f0273558c4b tests: show invalid copies when turning off copies-in-changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42865
diff changeset
   277
  
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   278
#else
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   279
  $ hg ci --amend -m 'copy a to j, v2'
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   280
  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-*-amend.hg (glob)
43142
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
   281
  $ hg debugsidedata -c -v -- -1
46731
ba8e508a8e69 sidedata-exchange: rewrite sidedata on-the-fly whenever possible
Raphaël Gomès <rgomes@octobus.net>
parents: 46722
diff changeset
   282
  1 sidedata entries
ba8e508a8e69 sidedata-exchange: rewrite sidedata on-the-fly whenever possible
Raphaël Gomès <rgomes@octobus.net>
parents: 46722
diff changeset
   283
   entry-0014 size 24
ba8e508a8e69 sidedata-exchange: rewrite sidedata on-the-fly whenever possible
Raphaël Gomès <rgomes@octobus.net>
parents: 46722
diff changeset
   284
    '\x00\x00\x00\x02\x00\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00aj'
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   285
#endif
42866
6f0273558c4b tests: show invalid copies when turning off copies-in-changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42865
diff changeset
   286
  $ hg showcopies --config experimental.copies.read-from=filelog-only
46731
ba8e508a8e69 sidedata-exchange: rewrite sidedata on-the-fly whenever possible
Raphaël Gomès <rgomes@octobus.net>
parents: 46722
diff changeset
   287
  a -> j
42327
278dcb24e535 copies: write empty entries in changeset when also writing to filelog
Martin von Zweigbergk <martinvonz@google.com>
parents: 42318
diff changeset
   288
The entries should be written to extras even if they're empty (so the client
278dcb24e535 copies: write empty entries in changeset when also writing to filelog
Martin von Zweigbergk <martinvonz@google.com>
parents: 42318
diff changeset
   289
won't have to fall back to reading from filelogs)
278dcb24e535 copies: write empty entries in changeset when also writing to filelog
Martin von Zweigbergk <martinvonz@google.com>
parents: 42318
diff changeset
   290
  $ echo x >> j
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   291
#if extra
42327
278dcb24e535 copies: write empty entries in changeset when also writing to filelog
Martin von Zweigbergk <martinvonz@google.com>
parents: 42318
diff changeset
   292
  $ hg ci -m 'modify j' --config experimental.copies.write-to=compatibility
278dcb24e535 copies: write empty entries in changeset when also writing to filelog
Martin von Zweigbergk <martinvonz@google.com>
parents: 42318
diff changeset
   293
  $ hg changesetcopies
278dcb24e535 copies: write empty entries in changeset when also writing to filelog
Martin von Zweigbergk <martinvonz@google.com>
parents: 42318
diff changeset
   294
  files: j
42425
f385ba70e4af changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42327
diff changeset
   295
  filesadded: 
f385ba70e4af changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42327
diff changeset
   296
  filesremoved: 
f385ba70e4af changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42327
diff changeset
   297
  
42327
278dcb24e535 copies: write empty entries in changeset when also writing to filelog
Martin von Zweigbergk <martinvonz@google.com>
parents: 42318
diff changeset
   298
  p1copies: 
278dcb24e535 copies: write empty entries in changeset when also writing to filelog
Martin von Zweigbergk <martinvonz@google.com>
parents: 42318
diff changeset
   299
  p2copies: 
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   300
#else
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   301
  $ hg ci -m 'modify j'
43142
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
   302
  $ hg debugsidedata -c -v -- -1
45636
9a6b409b8ebc changing-files: rework the way we store changed files in side-data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44876
diff changeset
   303
  1 sidedata entries
9a6b409b8ebc changing-files: rework the way we store changed files in side-data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44876
diff changeset
   304
   entry-0014 size 14
9a6b409b8ebc changing-files: rework the way we store changed files in side-data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44876
diff changeset
   305
    '\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00j'
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   306
#endif
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   307
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   308
Test writing only to filelog
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   309
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   310
  $ hg cp a k
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   311
#if extra
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   312
  $ hg ci -m 'copy a to k' --config experimental.copies.write-to=filelog-only
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   313
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   314
  $ hg changesetcopies
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   315
  files: k
42425
f385ba70e4af changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42327
diff changeset
   316
  
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   317
#else
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   318
  $ hg ci -m 'copy a to k'
43142
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
   319
  $ hg debugsidedata -c -v -- -1
45636
9a6b409b8ebc changing-files: rework the way we store changed files in side-data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44876
diff changeset
   320
  1 sidedata entries
9a6b409b8ebc changing-files: rework the way we store changed files in side-data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44876
diff changeset
   321
   entry-0014 size 24
9a6b409b8ebc changing-files: rework the way we store changed files in side-data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44876
diff changeset
   322
    '\x00\x00\x00\x02\x00\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00ak'
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   323
#endif
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   324
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   325
  $ hg debugdata k 0
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   326
  \x01 (esc)
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   327
  copy: a
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   328
  copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   329
  \x01 (esc)
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   330
  a
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   331
#if extra
42142
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
   332
  $ hg showcopies
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   333
42142
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
   334
  $ hg showcopies --config experimental.copies.read-from=compatibility
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
   335
  a -> k
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
   336
  $ hg showcopies --config experimental.copies.read-from=filelog-only
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
   337
  a -> k
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   338
#else
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   339
  $ hg showcopies
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   340
  a -> k
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   341
#endif
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   342
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   343
  $ cd ..
42316
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
   344
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
   345
Test rebasing a commit with copy information
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
   346
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
   347
  $ hg init rebase-rename
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
   348
  $ cd rebase-rename
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
   349
  $ echo a > a
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
   350
  $ hg ci -Aqm 'add a'
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
   351
  $ echo a2 > a
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
   352
  $ hg ci -m 'modify a'
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
   353
  $ hg co -q 0
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
   354
  $ hg mv a b
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
   355
  $ hg ci -qm 'rename a to b'
46436
24a32dea6955 rebase: add a config knob for forcing in-memory rebasing
Augie Fackler <augie@google.com>
parents: 46334
diff changeset
   356
Not only do we want this to run in-memory, it shouldn't fall back to
24a32dea6955 rebase: add a config knob for forcing in-memory rebasing
Augie Fackler <augie@google.com>
parents: 46334
diff changeset
   357
on-disk merge (no conflicts), so we force it to be in-memory
24a32dea6955 rebase: add a config knob for forcing in-memory rebasing
Augie Fackler <augie@google.com>
parents: 46334
diff changeset
   358
with no fallback.
24a32dea6955 rebase: add a config knob for forcing in-memory rebasing
Augie Fackler <augie@google.com>
parents: 46334
diff changeset
   359
  $ hg rebase -d 1 --config rebase.experimental.inmemory=yes --config devel.rebase.force-in-memory-merge=yes
45794
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 45636
diff changeset
   360
  rebasing 2:* tip "rename a to b" (glob)
42316
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
   361
  merging a and b to b
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   362
  saved backup bundle to $TESTTMP/rebase-rename/.hg/strip-backup/*-*-rebase.hg (glob)
42316
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
   363
  $ hg st --change . --copies
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
   364
  A b
46731
ba8e508a8e69 sidedata-exchange: rewrite sidedata on-the-fly whenever possible
Raphaël Gomès <rgomes@octobus.net>
parents: 46722
diff changeset
   365
    a
42316
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
   366
  R a
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
   367
  $ cd ..
42864
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42443
diff changeset
   368
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42443
diff changeset
   369
Test splitting a commit
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42443
diff changeset
   370
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42443
diff changeset
   371
  $ hg init split
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42443
diff changeset
   372
  $ cd split
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42443
diff changeset
   373
  $ echo a > a
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42443
diff changeset
   374
  $ echo b > b
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42443
diff changeset
   375
  $ hg ci -Aqm 'add a and b'
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42443
diff changeset
   376
  $ echo a2 > a
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42443
diff changeset
   377
  $ hg mv b c
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42443
diff changeset
   378
  $ hg ci -m 'modify a, move b to c'
42865
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42864
diff changeset
   379
  $ hg --config ui.interactive=yes split <<EOF
42864
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42443
diff changeset
   380
  > y
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42443
diff changeset
   381
  > y
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42443
diff changeset
   382
  > n
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42443
diff changeset
   383
  > y
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42443
diff changeset
   384
  > EOF
42865
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42864
diff changeset
   385
  diff --git a/a b/a
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42864
diff changeset
   386
  1 hunks, 1 lines changed
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42864
diff changeset
   387
  examine changes to 'a'?
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42864
diff changeset
   388
  (enter ? for help) [Ynesfdaq?] y
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42864
diff changeset
   389
  
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42864
diff changeset
   390
  @@ -1,1 +1,1 @@
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42864
diff changeset
   391
  -a
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42864
diff changeset
   392
  +a2
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42864
diff changeset
   393
  record this change to 'a'?
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42864
diff changeset
   394
  (enter ? for help) [Ynesfdaq?] y
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42864
diff changeset
   395
  
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42864
diff changeset
   396
  diff --git a/b b/c
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42864
diff changeset
   397
  rename from b
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42864
diff changeset
   398
  rename to c
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42864
diff changeset
   399
  examine changes to 'b' and 'c'?
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42864
diff changeset
   400
  (enter ? for help) [Ynesfdaq?] n
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42864
diff changeset
   401
  
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42864
diff changeset
   402
  created new head
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42864
diff changeset
   403
  diff --git a/b b/c
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42864
diff changeset
   404
  rename from b
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42864
diff changeset
   405
  rename to c
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42864
diff changeset
   406
  examine changes to 'b' and 'c'?
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42864
diff changeset
   407
  (enter ? for help) [Ynesfdaq?] y
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42864
diff changeset
   408
  
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42867
diff changeset
   409
  saved backup bundle to $TESTTMP/split/.hg/strip-backup/*-*-split.hg (glob)
42864
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42443
diff changeset
   410
  $ cd ..
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42443
diff changeset
   411
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42443
diff changeset
   412
Test committing half a rename
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42443
diff changeset
   413
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42443
diff changeset
   414
  $ hg init partial
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42443
diff changeset
   415
  $ cd partial
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42443
diff changeset
   416
  $ echo a > a
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42443
diff changeset
   417
  $ hg ci -Aqm 'add a'
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42443
diff changeset
   418
  $ hg mv a b
42865
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42864
diff changeset
   419
  $ hg ci -m 'remove a' a
43148
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   420
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   421
#if sidedata
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   422
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   423
Test upgrading/downgrading to sidedata storage
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   424
==============================================
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   425
47098
27f1191b1305 sidedata: replace sidedata upgrade mechanism with the new one
Raphaël Gomès <rgomes@octobus.net>
parents: 46884
diff changeset
   426
downgrading
43148
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   427
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   428
  $ hg debugformat -v
44876
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
   429
  format-variant     repo config default
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
   430
  fncache:            yes    yes     yes
47328
a43d256c041a dirstate-v2: Add `hg debugupgraderepo` command support
Simon Sapin <simon.sapin@octobus.net>
parents: 47276
diff changeset
   431
  dirstate-v2:         no     no      no
44876
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
   432
  dotencode:          yes    yes     yes
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
   433
  generaldelta:       yes    yes     yes
46334
6e81446bf1d9 share: move share safe functionality out of experimental
Pulkit Goyal <7895pulkit@gmail.com>
parents: 46017
diff changeset
   434
  share-safe:          no     no      no
44876
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
   435
  sparserevlog:       yes    yes     yes
46884
cc3ad5c3af3b persistent-nodemap: enable the feature by default when using Rust
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46874
diff changeset
   436
  persistent-nodemap:  no     no      no (no-rust !)
cc3ad5c3af3b persistent-nodemap: enable the feature by default when using Rust
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46874
diff changeset
   437
  persistent-nodemap: yes    yes      no (rust !)
44876
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
   438
  copies-sdc:         yes    yes      no
47276
a07381751dc9 changelogv2: `copies-side-data` now implies `changelogv2`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47274
diff changeset
   439
  revlog-v2:           no     no      no
a07381751dc9 changelogv2: `copies-side-data` now implies `changelogv2`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47274
diff changeset
   440
  changelog-v2:       yes    yes      no
44876
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
   441
  plain-cl-delta:     yes    yes     yes
46874
84a93fa7ecfd revlog-compression: use zstd by default (if available)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46731
diff changeset
   442
  compression:        zlib   zlib    zlib (no-zstd !)
84a93fa7ecfd revlog-compression: use zstd by default (if available)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46731
diff changeset
   443
  compression:        zstd   zstd    zstd (zstd !)
44876
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
   444
  compression-level:  default default default
43148
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   445
  $ hg debugsidedata -c -- 0
43231
30570a056fa8 sidedatacopies: only store an entry if it has values
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
   446
  1 sidedata entries
45636
9a6b409b8ebc changing-files: rework the way we store changed files in side-data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44876
diff changeset
   447
   entry-0014 size 14
43148
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   448
  $ hg debugsidedata -c -- 1
43231
30570a056fa8 sidedatacopies: only store an entry if it has values
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
   449
  1 sidedata entries
45636
9a6b409b8ebc changing-files: rework the way we store changed files in side-data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44876
diff changeset
   450
   entry-0014 size 14
43148
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   451
  $ hg debugsidedata -m -- 0
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   452
  $ cat << EOF > .hg/hgrc
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   453
  > [format]
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   454
  > exp-use-copies-side-data-changeset = no
47238
0dedd3d063b0 test: no longer directly use the sidedata config and requirements
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47098
diff changeset
   455
  > [experimental]
0dedd3d063b0 test: no longer directly use the sidedata config and requirements
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47098
diff changeset
   456
  > revlogv2 = enable-unstable-format-and-corrupt-my-data
43148
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   457
  > EOF
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   458
  $ hg debugupgraderepo --run --quiet --no-backup > /dev/null
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   459
  $ hg debugformat -v
44876
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
   460
  format-variant     repo config default
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
   461
  fncache:            yes    yes     yes
47328
a43d256c041a dirstate-v2: Add `hg debugupgraderepo` command support
Simon Sapin <simon.sapin@octobus.net>
parents: 47276
diff changeset
   462
  dirstate-v2:         no     no      no
44876
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
   463
  dotencode:          yes    yes     yes
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
   464
  generaldelta:       yes    yes     yes
46334
6e81446bf1d9 share: move share safe functionality out of experimental
Pulkit Goyal <7895pulkit@gmail.com>
parents: 46017
diff changeset
   465
  share-safe:          no     no      no
44876
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
   466
  sparserevlog:       yes    yes     yes
46884
cc3ad5c3af3b persistent-nodemap: enable the feature by default when using Rust
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46874
diff changeset
   467
  persistent-nodemap:  no     no      no (no-rust !)
cc3ad5c3af3b persistent-nodemap: enable the feature by default when using Rust
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46874
diff changeset
   468
  persistent-nodemap: yes    yes      no (rust !)
44876
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
   469
  copies-sdc:          no     no      no
46718
fd55a9eb1507 revlogv2: allow upgrading to v2
Raphaël Gomès <rgomes@octobus.net>
parents: 46436
diff changeset
   470
  revlog-v2:          yes    yes      no
47274
6c84fc9c9a90 changelogv2: introduce a "changelogv2" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47238
diff changeset
   471
  changelog-v2:        no     no      no
44876
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
   472
  plain-cl-delta:     yes    yes     yes
46874
84a93fa7ecfd revlog-compression: use zstd by default (if available)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46731
diff changeset
   473
  compression:        zlib   zlib    zlib (no-zstd !)
84a93fa7ecfd revlog-compression: use zstd by default (if available)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46731
diff changeset
   474
  compression:        zstd   zstd    zstd (zstd !)
44876
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
   475
  compression-level:  default default default
43148
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   476
  $ hg debugsidedata -c -- 0
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   477
  $ hg debugsidedata -c -- 1
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   478
  $ hg debugsidedata -m -- 0
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   479
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   480
upgrading
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   481
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   482
  $ cat << EOF > .hg/hgrc
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   483
  > [format]
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   484
  > exp-use-copies-side-data-changeset = yes
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   485
  > EOF
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   486
  $ hg debugupgraderepo --run --quiet --no-backup > /dev/null
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   487
  $ hg debugformat -v
44876
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
   488
  format-variant     repo config default
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
   489
  fncache:            yes    yes     yes
47328
a43d256c041a dirstate-v2: Add `hg debugupgraderepo` command support
Simon Sapin <simon.sapin@octobus.net>
parents: 47276
diff changeset
   490
  dirstate-v2:         no     no      no
44876
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
   491
  dotencode:          yes    yes     yes
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
   492
  generaldelta:       yes    yes     yes
46334
6e81446bf1d9 share: move share safe functionality out of experimental
Pulkit Goyal <7895pulkit@gmail.com>
parents: 46017
diff changeset
   493
  share-safe:          no     no      no
44876
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
   494
  sparserevlog:       yes    yes     yes
46884
cc3ad5c3af3b persistent-nodemap: enable the feature by default when using Rust
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46874
diff changeset
   495
  persistent-nodemap:  no     no      no (no-rust !)
cc3ad5c3af3b persistent-nodemap: enable the feature by default when using Rust
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46874
diff changeset
   496
  persistent-nodemap: yes    yes      no (rust !)
44876
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
   497
  copies-sdc:         yes    yes      no
47276
a07381751dc9 changelogv2: `copies-side-data` now implies `changelogv2`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47274
diff changeset
   498
  revlog-v2:           no     no      no
a07381751dc9 changelogv2: `copies-side-data` now implies `changelogv2`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47274
diff changeset
   499
  changelog-v2:       yes    yes      no
44876
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
   500
  plain-cl-delta:     yes    yes     yes
46874
84a93fa7ecfd revlog-compression: use zstd by default (if available)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46731
diff changeset
   501
  compression:        zlib   zlib    zlib (no-zstd !)
84a93fa7ecfd revlog-compression: use zstd by default (if available)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46731
diff changeset
   502
  compression:        zstd   zstd    zstd (zstd !)
44876
ea9563e9e65a nodemap: teach `hg debugformat` about the persistent nodemap option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43231
diff changeset
   503
  compression-level:  default default default
43148
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   504
  $ hg debugsidedata -c -- 0
43231
30570a056fa8 sidedatacopies: only store an entry if it has values
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
   505
  1 sidedata entries
45636
9a6b409b8ebc changing-files: rework the way we store changed files in side-data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44876
diff changeset
   506
   entry-0014 size 14
43148
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   507
  $ hg debugsidedata -c -- 1
43231
30570a056fa8 sidedatacopies: only store an entry if it has values
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43167
diff changeset
   508
  1 sidedata entries
45636
9a6b409b8ebc changing-files: rework the way we store changed files in side-data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44876
diff changeset
   509
   entry-0014 size 14
43148
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   510
  $ hg debugsidedata -m -- 0
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   511
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   512
#endif
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
   513
42864
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42443
diff changeset
   514
  $ cd ..