##// END OF EJS Templates
revlog-index: add `replace_sidedata_info` method...
revlog-index: add `replace_sidedata_info` method During a `pull` operation where the server does not provide sidedata, the client that requires it should generate them on-the-fly. In the generic case, we need to wait for the changelog + manifests + filelogs to be added, since we don't know what the sidedata computers might need: this means rewriting the sidedata of index entries from within the pull transaction (and no further back) right after we've added them. Both Python and C implementations only allow for rewriting the sidedata offset and length for revs within the transaction where they were created. Differential Revision: https://phab.mercurial-scm.org/D10031

File last commit:

r47443:3d740058 default
r47451:502e795b default
Show More
test-copies-in-changeset.t
499 lines | 12.1 KiB | text/troff | Tads3Lexer
/ tests / test-copies-in-changeset.t
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411 #testcases extra sidedata
Martin von Zweigbergk
copies: add config option for writing copy metadata to file and/or changset...
r42317
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411 #if extra
Martin von Zweigbergk
copies: add config option for writing copy metadata to file and/or changset...
r42317 $ cat >> $HGRCPATH << EOF
> [experimental]
> copies.write-to=changeset-only
Martin von Zweigbergk
changelog: parse copy metadata if available in extras...
r42318 > copies.read-from=changeset-only
Martin von Zweigbergk
copies: add config option for writing copy metadata to file and/or changset...
r42317 > [alias]
> changesetcopies = log -r . -T 'files: {files}
Martin von Zweigbergk
changelog: optionally store added and removed files in changeset extras...
r42598 > {extras % "{ifcontains("files", key, "{key}: {value}\n")}"}
Martin von Zweigbergk
copies: add config option for writing copy metadata to file and/or changset...
r42317 > {extras % "{ifcontains("copies", key, "{key}: {value}\n")}"}'
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411 > EOF
#endif
#if sidedata
$ cat >> $HGRCPATH << EOF
> [format]
> exp-use-copies-side-data-changeset = yes
> EOF
#endif
$ cat >> $HGRCPATH << EOF
> [alias]
Martin von Zweigbergk
changelog: parse copy metadata if available in extras...
r42318 > showcopies = log -r . -T '{file_copies % "{source} -> {name}\n"}'
Martin von Zweigbergk
tests: demonstrate loss of changeset copy metadata on rebase...
r42475 > [extensions]
> rebase =
Martin von Zweigbergk
tests: demonstrate crash when committing subset of copies to changeset...
r43124 > split =
Martin von Zweigbergk
copies: add config option for writing copy metadata to file and/or changset...
r42317 > EOF
Check that copies are recorded correctly
$ hg init repo
$ cd repo
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411 #if sidedata
$ hg debugformat -v
nodemap: teach `hg debugformat` about the persistent nodemap option...
r45303 format-variant repo config default
fncache: yes yes yes
dotencode: yes yes yes
generaldelta: yes yes yes
Pulkit Goyal
share: move share safe functionality out of experimental...
r47052 share-safe: no no no
nodemap: teach `hg debugformat` about the persistent nodemap option...
r45303 sparserevlog: yes yes yes
persistent-nodemap: no no no
copies-sdc: yes yes no
Raphaël Gomès
revlogv2: allow upgrading to v2...
r47439 revlog-v2: yes yes no
nodemap: teach `hg debugformat` about the persistent nodemap option...
r45303 plain-cl-delta: yes yes yes
compression: zlib zlib zlib
compression-level: default default default
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411 #else
$ hg debugformat -v
nodemap: teach `hg debugformat` about the persistent nodemap option...
r45303 format-variant repo config default
fncache: yes yes yes
dotencode: yes yes yes
generaldelta: yes yes yes
Pulkit Goyal
share: move share safe functionality out of experimental...
r47052 share-safe: no no no
nodemap: teach `hg debugformat` about the persistent nodemap option...
r45303 sparserevlog: yes yes yes
persistent-nodemap: no no no
copies-sdc: no no no
Raphaël Gomès
revlogv2: allow upgrading to v2...
r47439 revlog-v2: no no no
nodemap: teach `hg debugformat` about the persistent nodemap option...
r45303 plain-cl-delta: yes yes yes
compression: zlib zlib zlib
compression-level: default default default
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411 #endif
Martin von Zweigbergk
copies: add config option for writing copy metadata to file and/or changset...
r42317 $ echo a > a
$ hg add a
$ hg ci -m initial
$ hg cp a b
$ hg cp a c
$ hg cp a d
$ hg ci -m 'copy a to b, c, and d'
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411
#if extra
Martin von Zweigbergk
copies: add config option for writing copy metadata to file and/or changset...
r42317 $ hg changesetcopies
files: b c d
Martin von Zweigbergk
copies: separate added/removed files by newline instead of null...
r42620 filesadded: 0
1
2
Martin von Zweigbergk
changelog: optionally store added and removed files in changeset extras...
r42598
Martin von Zweigbergk
copies: also encode p[12]copies destination as index into "files" list...
r42619 p1copies: 0\x00a (esc)
1\x00a (esc)
2\x00a (esc)
sidedatacopies: write copies information in sidedata when applicable...
r43412 #else
$ hg debugsidedata -c -v -- -1
changing-files: rework the way we store changed files in side-data...
r46211 1 sidedata entries
entry-0014 size 44
'\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'
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411 #endif
Martin von Zweigbergk
changelog: parse copy metadata if available in extras...
r42318 $ hg showcopies
a -> b
a -> c
a -> d
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411
#if extra
Martin von Zweigbergk
changelog: parse copy metadata if available in extras...
r42318 $ hg showcopies --config experimental.copies.read-from=compatibility
a -> b
a -> c
a -> d
$ hg showcopies --config experimental.copies.read-from=filelog-only
Martin von Zweigbergk
copies: add config option for writing copy metadata to file and/or changset...
r42317
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411 #endif
Martin von Zweigbergk
copies: add config option for writing copy metadata to file and/or changset...
r42317 Check that renames are recorded correctly
$ hg mv b b2
$ hg ci -m 'rename b to b2'
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411
#if extra
Martin von Zweigbergk
copies: add config option for writing copy metadata to file and/or changset...
r42317 $ hg changesetcopies
files: b b2
Martin von Zweigbergk
changelog: optionally store added and removed files in changeset extras...
r42598 filesadded: 1
filesremoved: 0
Martin von Zweigbergk
copies: also encode p[12]copies destination as index into "files" list...
r42619 p1copies: 1\x00b (esc)
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411
sidedatacopies: write copies information in sidedata when applicable...
r43412 #else
$ hg debugsidedata -c -v -- -1
changing-files: rework the way we store changed files in side-data...
r46211 1 sidedata entries
entry-0014 size 25
'\x00\x00\x00\x02\x0c\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x03\x00\x00\x00\x00bb2'
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411 #endif
Martin von Zweigbergk
changelog: parse copy metadata if available in extras...
r42318 $ hg showcopies
b -> b2
Martin von Zweigbergk
copies: add config option for writing copy metadata to file and/or changset...
r42317
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411
Martin von Zweigbergk
copies: add config option for writing copy metadata to file and/or changset...
r42317 Rename onto existing file. This should get recorded in the changeset files list and in the extras,
even though there is no filelog entry.
$ hg cp b2 c --force
$ hg st --copies
M c
b2
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411
#if extra
Martin von Zweigbergk
copies: add config option for writing copy metadata to file and/or changset...
r42317 $ hg debugindex c
rev linkrev nodeid p1 p2
0 1 b789fdd96dc2 000000000000 000000000000
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411
#else
$ hg debugindex c
rev linkrev nodeid p1 p2
0 1 37d9b5d994ea 000000000000 000000000000
#endif
Martin von Zweigbergk
copies: add config option for writing copy metadata to file and/or changset...
r42317 $ hg ci -m 'move b onto d'
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411
#if extra
Martin von Zweigbergk
copies: add config option for writing copy metadata to file and/or changset...
r42317 $ hg changesetcopies
files: c
Martin von Zweigbergk
changelog: optionally store added and removed files in changeset extras...
r42598
Martin von Zweigbergk
copies: also encode p[12]copies destination as index into "files" list...
r42619 p1copies: 0\x00b2 (esc)
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411
sidedatacopies: write copies information in sidedata when applicable...
r43412 #else
$ hg debugsidedata -c -v -- -1
sidedatacopies: only store an entry if it has values...
r43505 1 sidedata entries
changing-files: rework the way we store changed files in side-data...
r46211 entry-0014 size 25
'\x00\x00\x00\x02\x00\x00\x00\x00\x02\x00\x00\x00\x00\x16\x00\x00\x00\x03\x00\x00\x00\x00b2c'
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411 #endif
Martin von Zweigbergk
changelog: parse copy metadata if available in extras...
r42318 $ hg showcopies
b2 -> c
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411
#if extra
Martin von Zweigbergk
copies: add config option for writing copy metadata to file and/or changset...
r42317 $ hg debugindex c
rev linkrev nodeid p1 p2
0 1 b789fdd96dc2 000000000000 000000000000
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411 #else
$ hg debugindex c
rev linkrev nodeid p1 p2
0 1 37d9b5d994ea 000000000000 000000000000
1 3 029625640347 000000000000 000000000000
#endif
Martin von Zweigbergk
copies: add config option for writing copy metadata to file and/or changset...
r42317 Create a merge commit with copying done during merge.
$ hg co 0
0 files updated, 0 files merged, 3 files removed, 0 files unresolved
$ hg cp a e
$ hg cp a f
$ hg ci -m 'copy a to e and f'
created new head
$ hg merge 3
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
File 'a' exists on both sides, so 'g' could be recorded as being from p1 or p2, but we currently
always record it as being from p1
$ hg cp a g
File 'd' exists only in p2, so 'h' should be from p2
$ hg cp d h
File 'f' exists only in p1, so 'i' should be from p1
$ hg cp f i
$ hg ci -m 'merge'
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411
#if extra
Martin von Zweigbergk
copies: add config option for writing copy metadata to file and/or changset...
r42317 $ hg changesetcopies
files: g h i
Martin von Zweigbergk
copies: separate added/removed files by newline instead of null...
r42620 filesadded: 0
1
2
Martin von Zweigbergk
changelog: optionally store added and removed files in changeset extras...
r42598
Martin von Zweigbergk
copies: also encode p[12]copies destination as index into "files" list...
r42619 p1copies: 0\x00a (esc)
2\x00f (esc)
p2copies: 1\x00d (esc)
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411
sidedatacopies: write copies information in sidedata when applicable...
r43412 #else
$ hg debugsidedata -c -v -- -1
changing-files: rework the way we store changed files in side-data...
r46211 1 sidedata entries
entry-0014 size 64
'\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'
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411 #endif
Martin von Zweigbergk
changelog: parse copy metadata if available in extras...
r42318 $ hg showcopies
a -> g
d -> h
f -> i
Martin von Zweigbergk
copies: add config option for writing copy metadata to file and/or changset...
r42317
Test writing to both changeset and filelog
$ hg cp a j
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411 #if extra
Martin von Zweigbergk
copies: add config option for writing copy metadata to file and/or changset...
r42317 $ hg ci -m 'copy a to j' --config experimental.copies.write-to=compatibility
$ hg changesetcopies
files: j
Martin von Zweigbergk
changelog: optionally store added and removed files in changeset extras...
r42598 filesadded: 0
filesremoved:
Martin von Zweigbergk
copies: also encode p[12]copies destination as index into "files" list...
r42619 p1copies: 0\x00a (esc)
Martin von Zweigbergk
copies: write empty entries in changeset when also writing to filelog...
r42486 p2copies:
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411 #else
$ hg ci -m 'copy a to j'
sidedatacopies: write copies information in sidedata when applicable...
r43412 $ hg debugsidedata -c -v -- -1
changing-files: rework the way we store changed files in side-data...
r46211 1 sidedata entries
entry-0014 size 24
'\x00\x00\x00\x02\x00\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00aj'
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411 #endif
Martin von Zweigbergk
copies: add config option for writing copy metadata to file and/or changset...
r42317 $ hg debugdata j 0
\x01 (esc)
copy: a
copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
\x01 (esc)
a
Martin von Zweigbergk
changelog: parse copy metadata if available in extras...
r42318 $ hg showcopies
a -> j
$ hg showcopies --config experimental.copies.read-from=compatibility
a -> j
$ hg showcopies --config experimental.copies.read-from=filelog-only
a -> j
Martin von Zweigbergk
tests: show invalid copies when turning off copies-in-changeset...
r43126 Existing copy information in the changeset gets removed on amend and writing
copy information on to the filelog
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411 #if extra
Martin von Zweigbergk
tests: show invalid copies when turning off copies-in-changeset...
r43126 $ hg ci --amend -m 'copy a to j, v2' \
> --config experimental.copies.write-to=filelog-only
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-*-amend.hg (glob)
Martin von Zweigbergk
tests: show invalid copies when turning off copies-in-changeset...
r43126 $ hg changesetcopies
files: j
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411 #else
$ hg ci --amend -m 'copy a to j, v2'
saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-*-amend.hg (glob)
sidedatacopies: write copies information in sidedata when applicable...
r43412 $ hg debugsidedata -c -v -- -1
Raphaël Gomès
sidedata: move to new sidedata storage in revlogv2...
r47443 1 sidedata entries (missing-correct-output !)
entry-0014 size 24 (missing-correct-output !)
'\x00\x00\x00\x02\x00\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00aj' (missing-correct-output !)
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411 #endif
Martin von Zweigbergk
tests: show invalid copies when turning off copies-in-changeset...
r43126 $ hg showcopies --config experimental.copies.read-from=filelog-only
Raphaël Gomès
sidedata: move to new sidedata storage in revlogv2...
r47443 a -> j (sidedata missing-correct-output !)
a -> j (no-sidedata !)
Martin von Zweigbergk
copies: write empty entries in changeset when also writing to filelog...
r42486 The entries should be written to extras even if they're empty (so the client
won't have to fall back to reading from filelogs)
$ echo x >> j
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411 #if extra
Martin von Zweigbergk
copies: write empty entries in changeset when also writing to filelog...
r42486 $ hg ci -m 'modify j' --config experimental.copies.write-to=compatibility
$ hg changesetcopies
files: j
Martin von Zweigbergk
changelog: optionally store added and removed files in changeset extras...
r42598 filesadded:
filesremoved:
Martin von Zweigbergk
copies: write empty entries in changeset when also writing to filelog...
r42486 p1copies:
p2copies:
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411 #else
$ hg ci -m 'modify j'
sidedatacopies: write copies information in sidedata when applicable...
r43412 $ hg debugsidedata -c -v -- -1
changing-files: rework the way we store changed files in side-data...
r46211 1 sidedata entries
entry-0014 size 14
'\x00\x00\x00\x01\x14\x00\x00\x00\x01\x00\x00\x00\x00j'
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411 #endif
Martin von Zweigbergk
copies: add config option for writing copy metadata to file and/or changset...
r42317
Test writing only to filelog
$ hg cp a k
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411 #if extra
Martin von Zweigbergk
copies: add config option for writing copy metadata to file and/or changset...
r42317 $ hg ci -m 'copy a to k' --config experimental.copies.write-to=filelog-only
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411
Martin von Zweigbergk
copies: add config option for writing copy metadata to file and/or changset...
r42317 $ hg changesetcopies
files: k
Martin von Zweigbergk
changelog: optionally store added and removed files in changeset extras...
r42598
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411 #else
$ hg ci -m 'copy a to k'
sidedatacopies: write copies information in sidedata when applicable...
r43412 $ hg debugsidedata -c -v -- -1
changing-files: rework the way we store changed files in side-data...
r46211 1 sidedata entries
entry-0014 size 24
'\x00\x00\x00\x02\x00\x00\x00\x00\x01\x00\x00\x00\x00\x06\x00\x00\x00\x02\x00\x00\x00\x00ak'
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411 #endif
Martin von Zweigbergk
copies: add config option for writing copy metadata to file and/or changset...
r42317 $ hg debugdata k 0
\x01 (esc)
copy: a
copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
\x01 (esc)
a
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411 #if extra
Martin von Zweigbergk
changelog: parse copy metadata if available in extras...
r42318 $ hg showcopies
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411
Martin von Zweigbergk
changelog: parse copy metadata if available in extras...
r42318 $ hg showcopies --config experimental.copies.read-from=compatibility
a -> k
$ hg showcopies --config experimental.copies.read-from=filelog-only
a -> k
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411 #else
$ hg showcopies
a -> k
#endif
Martin von Zweigbergk
copies: add config option for writing copy metadata to file and/or changset...
r42317
$ cd ..
Martin von Zweigbergk
tests: demonstrate loss of changeset copy metadata on rebase...
r42475
Test rebasing a commit with copy information
$ hg init rebase-rename
$ cd rebase-rename
$ echo a > a
$ hg ci -Aqm 'add a'
$ echo a2 > a
$ hg ci -m 'modify a'
$ hg co -q 0
$ hg mv a b
$ hg ci -qm 'rename a to b'
Augie Fackler
rebase: add a config knob for forcing in-memory rebasing...
r47071 Not only do we want this to run in-memory, it shouldn't fall back to
on-disk merge (no conflicts), so we force it to be in-memory
with no fallback.
$ hg rebase -d 1 --config rebase.experimental.inmemory=yes --config devel.rebase.force-in-memory-merge=yes
Martin von Zweigbergk
rebase: change and standarize template for rebase's one-line summary...
r46356 rebasing 2:* tip "rename a to b" (glob)
Martin von Zweigbergk
tests: demonstrate loss of changeset copy metadata on rebase...
r42475 merging a and b to b
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411 saved backup bundle to $TESTTMP/rebase-rename/.hg/strip-backup/*-*-rebase.hg (glob)
Martin von Zweigbergk
tests: demonstrate loss of changeset copy metadata on rebase...
r42475 $ hg st --change . --copies
A b
Raphaël Gomès
sidedata: move to new sidedata storage in revlogv2...
r47443 a (sidedata missing-correct-output !)
a (no-sidedata !)
Martin von Zweigbergk
tests: demonstrate loss of changeset copy metadata on rebase...
r42475 R a
$ cd ..
Martin von Zweigbergk
tests: demonstrate crash when committing subset of copies to changeset...
r43124
Test splitting a commit
$ hg init split
$ cd split
$ echo a > a
$ echo b > b
$ hg ci -Aqm 'add a and b'
$ echo a2 > a
$ hg mv b c
$ hg ci -m 'modify a, move b to c'
Martin von Zweigbergk
context: filter out invalid copies from workingctx.p[12]copies()...
r43125 $ hg --config ui.interactive=yes split <<EOF
Martin von Zweigbergk
tests: demonstrate crash when committing subset of copies to changeset...
r43124 > y
> y
> n
> y
> EOF
Martin von Zweigbergk
context: filter out invalid copies from workingctx.p[12]copies()...
r43125 diff --git a/a b/a
1 hunks, 1 lines changed
examine changes to 'a'?
(enter ? for help) [Ynesfdaq?] y
@@ -1,1 +1,1 @@
-a
+a2
record this change to 'a'?
(enter ? for help) [Ynesfdaq?] y
diff --git a/b b/c
rename from b
rename to c
examine changes to 'b' and 'c'?
(enter ? for help) [Ynesfdaq?] n
created new head
diff --git a/b b/c
rename from b
rename to c
examine changes to 'b' and 'c'?
(enter ? for help) [Ynesfdaq?] y
sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t...
r43411 saved backup bundle to $TESTTMP/split/.hg/strip-backup/*-*-split.hg (glob)
Martin von Zweigbergk
tests: demonstrate crash when committing subset of copies to changeset...
r43124 $ cd ..
Test committing half a rename
$ hg init partial
$ cd partial
$ echo a > a
$ hg ci -Aqm 'add a'
$ hg mv a b
Martin von Zweigbergk
context: filter out invalid copies from workingctx.p[12]copies()...
r43125 $ hg ci -m 'remove a' a
sidedatacopies: deal with upgrading and downgrading to that format...
r43418
#if sidedata
Test upgrading/downgrading to sidedata storage
==============================================
downgrading (keeping some sidedata)
$ hg debugformat -v
nodemap: teach `hg debugformat` about the persistent nodemap option...
r45303 format-variant repo config default
fncache: yes yes yes
dotencode: yes yes yes
generaldelta: yes yes yes
Pulkit Goyal
share: move share safe functionality out of experimental...
r47052 share-safe: no no no
nodemap: teach `hg debugformat` about the persistent nodemap option...
r45303 sparserevlog: yes yes yes
persistent-nodemap: no no no
copies-sdc: yes yes no
Raphaël Gomès
revlogv2: allow upgrading to v2...
r47439 revlog-v2: yes yes no
nodemap: teach `hg debugformat` about the persistent nodemap option...
r45303 plain-cl-delta: yes yes yes
compression: zlib zlib zlib
compression-level: default default default
sidedatacopies: deal with upgrading and downgrading to that format...
r43418 $ hg debugsidedata -c -- 0
sidedatacopies: only store an entry if it has values...
r43505 1 sidedata entries
changing-files: rework the way we store changed files in side-data...
r46211 entry-0014 size 14
sidedatacopies: deal with upgrading and downgrading to that format...
r43418 $ hg debugsidedata -c -- 1
sidedatacopies: only store an entry if it has values...
r43505 1 sidedata entries
changing-files: rework the way we store changed files in side-data...
r46211 entry-0014 size 14
sidedatacopies: deal with upgrading and downgrading to that format...
r43418 $ hg debugsidedata -m -- 0
$ cat << EOF > .hg/hgrc
> [format]
sidedata: rename the configuration option to `exp-use-side-data`...
r43437 > exp-use-side-data = yes
sidedatacopies: deal with upgrading and downgrading to that format...
r43418 > exp-use-copies-side-data-changeset = no
> EOF
$ hg debugupgraderepo --run --quiet --no-backup > /dev/null
$ hg debugformat -v
nodemap: teach `hg debugformat` about the persistent nodemap option...
r45303 format-variant repo config default
fncache: yes yes yes
dotencode: yes yes yes
generaldelta: yes yes yes
Pulkit Goyal
share: move share safe functionality out of experimental...
r47052 share-safe: no no no
nodemap: teach `hg debugformat` about the persistent nodemap option...
r45303 sparserevlog: yes yes yes
persistent-nodemap: no no no
copies-sdc: no no no
Raphaël Gomès
revlogv2: allow upgrading to v2...
r47439 revlog-v2: yes yes no
nodemap: teach `hg debugformat` about the persistent nodemap option...
r45303 plain-cl-delta: yes yes yes
compression: zlib zlib zlib
compression-level: default default default
sidedatacopies: deal with upgrading and downgrading to that format...
r43418 $ hg debugsidedata -c -- 0
changing-files: rework the way we store changed files in side-data...
r46211 1 sidedata entries
entry-0014 size 14
sidedatacopies: deal with upgrading and downgrading to that format...
r43418 $ hg debugsidedata -c -- 1
changing-files: rework the way we store changed files in side-data...
r46211 1 sidedata entries
entry-0014 size 14
sidedatacopies: deal with upgrading and downgrading to that format...
r43418 $ hg debugsidedata -m -- 0
upgrading
$ cat << EOF > .hg/hgrc
> [format]
> exp-use-copies-side-data-changeset = yes
> EOF
$ hg debugupgraderepo --run --quiet --no-backup > /dev/null
$ hg debugformat -v
nodemap: teach `hg debugformat` about the persistent nodemap option...
r45303 format-variant repo config default
fncache: yes yes yes
dotencode: yes yes yes
generaldelta: yes yes yes
Pulkit Goyal
share: move share safe functionality out of experimental...
r47052 share-safe: no no no
nodemap: teach `hg debugformat` about the persistent nodemap option...
r45303 sparserevlog: yes yes yes
persistent-nodemap: no no no
copies-sdc: yes yes no
Raphaël Gomès
revlogv2: allow upgrading to v2...
r47439 revlog-v2: yes yes no
nodemap: teach `hg debugformat` about the persistent nodemap option...
r45303 plain-cl-delta: yes yes yes
compression: zlib zlib zlib
compression-level: default default default
sidedatacopies: deal with upgrading and downgrading to that format...
r43418 $ hg debugsidedata -c -- 0
sidedatacopies: only store an entry if it has values...
r43505 1 sidedata entries
changing-files: rework the way we store changed files in side-data...
r46211 entry-0014 size 14
sidedatacopies: deal with upgrading and downgrading to that format...
r43418 $ hg debugsidedata -c -- 1
sidedatacopies: only store an entry if it has values...
r43505 1 sidedata entries
changing-files: rework the way we store changed files in side-data...
r46211 entry-0014 size 14
sidedatacopies: deal with upgrading and downgrading to that format...
r43418 $ hg debugsidedata -m -- 0
#endif
Martin von Zweigbergk
tests: demonstrate crash when committing subset of copies to changeset...
r43124 $ cd ..