Mercurial > hg
diff tests/test-copies-in-changeset.t @ 43142:beed7ce61681
sidedatacopies: write copies information in sidedata when applicable
If the format of the repository indicate it stores copies information into
changeset's sidedata, then we actually write that information into sidedata at
commit time. It will be put to use in later changesets.
Currently, we store all field unconditionally, but that is likely to change in
the future for the sake of efficiency.
Differential Revision: https://phab.mercurial-scm.org/D6950
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 06 Oct 2019 23:36:51 -0400 |
parents | 52781d57313d |
children | 843da18386d5 |
line wrap: on
line diff
--- a/tests/test-copies-in-changeset.t Sun Oct 06 23:36:51 2019 -0400 +++ b/tests/test-copies-in-changeset.t Sun Oct 06 23:36:51 2019 -0400 @@ -75,7 +75,17 @@ p1copies: 0\x00a (esc) 1\x00a (esc) 2\x00a (esc) - +#else + $ hg debugsidedata -c -v -- -1 + 4 sidedata entries + entry-0010 size 11 + '0\x00a\n1\x00a\n2\x00a' + entry-0011 size 0 + '' + entry-0012 size 5 + '0\n1\n2' + entry-0013 size 0 + '' #endif $ hg showcopies @@ -107,6 +117,17 @@ p1copies: 1\x00b (esc) +#else + $ hg debugsidedata -c -v -- -1 + 4 sidedata entries + entry-0010 size 3 + '1\x00b' + entry-0011 size 0 + '' + entry-0012 size 1 + '1' + entry-0013 size 1 + '0' #endif $ hg showcopies @@ -145,6 +166,17 @@ p1copies: 0\x00b2 (esc) +#else + $ hg debugsidedata -c -v -- -1 + 4 sidedata entries + entry-0010 size 4 + '0\x00b2' + entry-0011 size 0 + '' + entry-0012 size 0 + '' + entry-0013 size 0 + '' #endif $ hg showcopies @@ -197,6 +229,17 @@ 2\x00f (esc) p2copies: 1\x00d (esc) +#else + $ hg debugsidedata -c -v -- -1 + 4 sidedata entries + entry-0010 size 7 + '0\x00a\n2\x00f' + entry-0011 size 3 + '1\x00d' + entry-0012 size 5 + '0\n1\n2' + entry-0013 size 0 + '' #endif $ hg showcopies @@ -218,6 +261,16 @@ p2copies: #else $ hg ci -m 'copy a to j' + $ hg debugsidedata -c -v -- -1 + 4 sidedata entries + entry-0010 size 3 + '0\x00a' + entry-0011 size 0 + '' + entry-0012 size 1 + '0' + entry-0013 size 0 + '' #endif $ hg debugdata j 0 \x01 (esc) @@ -243,6 +296,16 @@ #else $ hg ci --amend -m 'copy a to j, v2' saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-*-amend.hg (glob) + $ hg debugsidedata -c -v -- -1 + 4 sidedata entries + entry-0010 size 3 + '0\x00a' + entry-0011 size 0 + '' + entry-0012 size 1 + '0' + entry-0013 size 0 + '' #endif $ hg showcopies --config experimental.copies.read-from=filelog-only a -> j @@ -260,6 +323,16 @@ p2copies: #else $ hg ci -m 'modify j' + $ hg debugsidedata -c -v -- -1 + 4 sidedata entries + entry-0010 size 0 + '' + entry-0011 size 0 + '' + entry-0012 size 0 + '' + entry-0013 size 0 + '' #endif Test writing only to filelog @@ -273,6 +346,16 @@ #else $ hg ci -m 'copy a to k' + $ hg debugsidedata -c -v -- -1 + 4 sidedata entries + entry-0010 size 3 + '0\x00a' + entry-0011 size 0 + '' + entry-0012 size 1 + '0' + entry-0013 size 0 + '' #endif $ hg debugdata k 0