annotate tests/test-copies-in-changeset.t @ 43198:c16fe77e340a

pathcopies: give up any optimization based on `introrev` Between 8a0136f69027 and d98fb3f42f33, we sped up the search for the introduction revision during path copies. However, further checking show that finding the introduction revision is still expensive and that we are better off without it. So we simply drop it and only rely on the linkrev optimisation. I ran `perfpathcopies` on 6989 pair of revision in the pypy repository (`hg perfhelper-pathcopies`. The result is massively in favor of dropping this condition. The result of the copy tracing are unchanged. Attempt to use a smaller changes preserving linkrev usage were unsuccessful, it can return wrong result. The following changesets broke test-mv-cp-st-diff.t - if not f.isintroducedafter(limit): + if limit >= 0 and f.linkrev() < limit: return None Here are various numbers (before this changeset/after this changesets) source destination before after saved-time ratio worth cases e66f24650daf 695dfb0f493b 1.062843 1.246369 -0.183526 1.172675 c979853a3b6a 8d60fe293e79 1.036985 1.196414 -0.159429 1.153743 22349fa2fc33 fbb1c9fd86c0 0.879926 1.038682 -0.158756 1.180420 682b98f3e672 a4878080a536 0.909952 1.063801 -0.153849 1.169074 5adabc9b9848 920958a93997 0.993622 1.147452 -0.153830 1.154817 worse 1% dbfbfcf077e9 aea8f2fd3593 1.016595 1.082999 -0.066404 1.065320 worse 5% c95f1ced15f2 7d29d5e39734 0.453694 0.471156 -0.017462 1.038488 worse 10% 3e144ed1d5b7 2aef0e942480 0.035140 0.037535 -0.002395 1.068156 worse 25% 321fc60db035 801748ba582a 0.009267 0.009325 -0.000058 1.006259 median 2088ce763fc2 e6991321d78b 0.000665 0.000651 0.000014 0.978947 best 25% 915631a97de6 385b31354be6 0.040743 0.040363 0.000380 0.990673 best 10% ad495c36a765 19c10384d3e7 0.431658 0.411490 0.020168 0.953278 best 5% d13ae7d283ae 813c99f810ac 1.141404 1.075346 0.066058 0.942126 best 1% 81593cb4a496 99ae11866969 1.833297 0.063823 1.769474 0.034813 best cases c3b14617fbd7 743a0fcaa4eb 1101.811740 2.735970 1099.075770 0.002483 c3b14617fbd7 9ba6ab77fd29 1116.753953 2.800729 1113.953224 0.002508 058b99d6e81f 57e249b7a3ea 1246.128485 3.042762 1243.085723 0.002442 9a8c361aab49 0354a250d371 1253.111894 3.085796 1250.026098 0.002463 442dbbc53c68 3ec1002a818c 1261.786294 3.138607 1258.647687 0.002487 As one can see, the average case is not really impacted. However, the worth case we get after this changeset are much better than the one we had before it. We have 30 pairs where improvements are above 10 minutes. This reflect in the combined time for all pairs before: 26256s after: 1300s (-95%) If we remove these pathological 30 cases, we still see a significant improvements: before: 1631s after: 1245s (-24%)
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 10 Oct 2019 03:49:33 +0200
parents bca9d1a6c4c5
children 30570a056fa8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
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: 42861
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}
42406
f385ba70e4af changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42300
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: 42861
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: 42861
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: 42861
diff changeset
14
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
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: 42861
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: 42861
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: 42861
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: 42861
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: 42861
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: 42861
diff changeset
21
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
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: 42861
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"}'
42289
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 =
42858
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42427
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: 42861
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: 42861
diff changeset
35 $ hg debugformat -v
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
36 format-variant repo config default
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
37 fncache: yes yes yes
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
38 dotencode: yes yes yes
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
39 generaldelta: yes yes yes
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
40 sparserevlog: yes yes yes
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
41 sidedata: yes yes no
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
42 copies-sdc: yes yes no
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
43 plain-cl-delta: yes yes yes
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
44 compression: zlib zlib zlib
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
45 compression-level: default default default
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
46 #else
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
47 $ hg debugformat -v
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
48 format-variant repo config default
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
49 fncache: yes yes yes
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
50 dotencode: yes yes yes
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
51 generaldelta: yes yes yes
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
52 sparserevlog: yes yes yes
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
53 sidedata: no no no
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
54 copies-sdc: no no no
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
55 plain-cl-delta: yes yes yes
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
56 compression: zlib zlib zlib
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
57 compression-level: default default default
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
58 #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
59 $ 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
60 $ 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
61 $ 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
62 $ 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
63 $ 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
64 $ 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
65 $ 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: 42861
diff changeset
66
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
67 #if extra
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
68
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
69 $ 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
70 files: b c d
42427
027f1567f97f copies: separate added/removed files by newline instead of null
Martin von Zweigbergk <martinvonz@google.com>
parents: 42426
diff changeset
71 filesadded: 0
027f1567f97f copies: separate added/removed files by newline instead of null
Martin von Zweigbergk <martinvonz@google.com>
parents: 42426
diff changeset
72 1
027f1567f97f copies: separate added/removed files by newline instead of null
Martin von Zweigbergk <martinvonz@google.com>
parents: 42426
diff changeset
73 2
42406
f385ba70e4af changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42300
diff changeset
74
42426
a1f87294471f copies: also encode p[12]copies destination as index into "files" list
Martin von Zweigbergk <martinvonz@google.com>
parents: 42406
diff changeset
75 p1copies: 0\x00a (esc)
a1f87294471f copies: also encode p[12]copies destination as index into "files" list
Martin von Zweigbergk <martinvonz@google.com>
parents: 42406
diff changeset
76 1\x00a (esc)
a1f87294471f copies: also encode p[12]copies destination as index into "files" list
Martin von Zweigbergk <martinvonz@google.com>
parents: 42406
diff changeset
77 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
78 #else
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
79 $ hg debugsidedata -c -v -- -1
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
80 4 sidedata entries
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
81 entry-0010 size 11
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
82 '0\x00a\n1\x00a\n2\x00a'
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
83 entry-0011 size 0
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
84 ''
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
85 entry-0012 size 5
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
86 '0\n1\n2'
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
87 entry-0013 size 0
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
88 ''
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
89 #endif
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
90
42142
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
91 $ hg showcopies
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
92 a -> b
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
93 a -> c
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
94 a -> d
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
95
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
96 #if extra
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
97
42142
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
98 $ 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
99 a -> b
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
100 a -> c
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
101 a -> d
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
102 $ 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
103
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
104 #endif
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
105
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
106 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
107
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
108 $ 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
109 $ 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: 42861
diff changeset
110
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
111 #if extra
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
112
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
113 $ 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
114 files: b b2
42406
f385ba70e4af changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42300
diff changeset
115 filesadded: 1
f385ba70e4af changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42300
diff changeset
116 filesremoved: 0
f385ba70e4af changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42300
diff changeset
117
42426
a1f87294471f copies: also encode p[12]copies destination as index into "files" list
Martin von Zweigbergk <martinvonz@google.com>
parents: 42406
diff changeset
118 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: 42861
diff changeset
119
43142
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
120 #else
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
121 $ hg debugsidedata -c -v -- -1
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
122 4 sidedata entries
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
123 entry-0010 size 3
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
124 '1\x00b'
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
125 entry-0011 size 0
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
126 ''
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
127 entry-0012 size 1
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
128 '1'
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
129 entry-0013 size 1
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
130 '0'
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
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: 42861
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: 42861
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: 42861
diff changeset
144
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
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: 42861
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: 42861
diff changeset
150
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
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: 42861
diff changeset
152
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
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: 42861
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: 42861
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: 42861
diff changeset
156
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
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: 42861
diff changeset
158
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
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: 42861
diff changeset
161
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
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: 42861
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
42406
f385ba70e4af changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42300
diff changeset
166
42426
a1f87294471f copies: also encode p[12]copies destination as index into "files" list
Martin von Zweigbergk <martinvonz@google.com>
parents: 42406
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: 42861
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
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
171 4 sidedata entries
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
172 entry-0010 size 4
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
173 '0\x00b2'
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
174 entry-0011 size 0
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
175 ''
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
176 entry-0012 size 0
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
177 ''
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
178 entry-0013 size 0
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
179 ''
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
180 #endif
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
181
42142
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
182 $ hg showcopies
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
183 b2 -> c
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
184
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
185 #if extra
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
186
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
187 $ 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
188 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
189 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
190
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
191 #else
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
192
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
193 $ hg debugindex c
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
194 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: 42861
diff changeset
195 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: 42861
diff changeset
196 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: 42861
diff changeset
197
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
198 #endif
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
199
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
200 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
201
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 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
203 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
204 $ 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
205 $ 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
206 $ 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
207 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
208 $ 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
209 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
210 (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
211 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
212 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
213 $ 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
214 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
215 $ 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
216 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
217 $ 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
218 $ 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: 42861
diff changeset
219
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
220 #if extra
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
221
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
222 $ 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
223 files: g h i
42427
027f1567f97f copies: separate added/removed files by newline instead of null
Martin von Zweigbergk <martinvonz@google.com>
parents: 42426
diff changeset
224 filesadded: 0
027f1567f97f copies: separate added/removed files by newline instead of null
Martin von Zweigbergk <martinvonz@google.com>
parents: 42426
diff changeset
225 1
027f1567f97f copies: separate added/removed files by newline instead of null
Martin von Zweigbergk <martinvonz@google.com>
parents: 42426
diff changeset
226 2
42406
f385ba70e4af changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42300
diff changeset
227
42426
a1f87294471f copies: also encode p[12]copies destination as index into "files" list
Martin von Zweigbergk <martinvonz@google.com>
parents: 42406
diff changeset
228 p1copies: 0\x00a (esc)
a1f87294471f copies: also encode p[12]copies destination as index into "files" list
Martin von Zweigbergk <martinvonz@google.com>
parents: 42406
diff changeset
229 2\x00f (esc)
a1f87294471f copies: also encode p[12]copies destination as index into "files" list
Martin von Zweigbergk <martinvonz@google.com>
parents: 42406
diff changeset
230 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: 42861
diff changeset
231
43142
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
232 #else
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
233 $ hg debugsidedata -c -v -- -1
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
234 4 sidedata entries
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
235 entry-0010 size 7
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
236 '0\x00a\n2\x00f'
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
237 entry-0011 size 3
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
238 '1\x00d'
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
239 entry-0012 size 5
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
240 '0\n1\n2'
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
241 entry-0013 size 0
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
242 ''
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
243 #endif
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
244
42142
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
245 $ hg showcopies
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
246 a -> g
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
247 d -> h
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
248 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
249
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
250 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
251
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
252 $ 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: 42861
diff changeset
253 #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
254 $ 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
255 $ 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
256 files: j
42406
f385ba70e4af changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42300
diff changeset
257 filesadded: 0
f385ba70e4af changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42300
diff changeset
258 filesremoved:
f385ba70e4af changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42300
diff changeset
259
42426
a1f87294471f copies: also encode p[12]copies destination as index into "files" list
Martin von Zweigbergk <martinvonz@google.com>
parents: 42406
diff changeset
260 p1copies: 0\x00a (esc)
42300
278dcb24e535 copies: write empty entries in changeset when also writing to filelog
Martin von Zweigbergk <martinvonz@google.com>
parents: 42291
diff changeset
261 p2copies:
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
262 #else
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
263 $ 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
264 $ hg debugsidedata -c -v -- -1
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
265 4 sidedata entries
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
266 entry-0010 size 3
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
267 '0\x00a'
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
268 entry-0011 size 0
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
269 ''
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
270 entry-0012 size 1
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
271 '0'
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
272 entry-0013 size 0
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
273 ''
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
274 #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
275 $ 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
276 \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
277 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
278 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
279 \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
280 a
42142
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
281 $ hg showcopies
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
282 a -> j
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
283 $ 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
284 a -> j
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
285 $ 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
286 a -> j
42860
6f0273558c4b tests: show invalid copies when turning off copies-in-changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42859
diff changeset
287 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: 42859
diff changeset
288 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: 42861
diff changeset
289 #if extra
42860
6f0273558c4b tests: show invalid copies when turning off copies-in-changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42859
diff changeset
290 $ 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: 42859
diff changeset
291 > --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: 42861
diff changeset
292 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-*-amend.hg (glob)
42860
6f0273558c4b tests: show invalid copies when turning off copies-in-changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42859
diff changeset
293 $ hg changesetcopies
6f0273558c4b tests: show invalid copies when turning off copies-in-changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42859
diff changeset
294 files: j
6f0273558c4b tests: show invalid copies when turning off copies-in-changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42859
diff changeset
295
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
296 #else
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
297 $ 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: 42861
diff changeset
298 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
299 $ hg debugsidedata -c -v -- -1
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
300 4 sidedata entries
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
301 entry-0010 size 3
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
302 '0\x00a'
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
303 entry-0011 size 0
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
304 ''
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
305 entry-0012 size 1
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
306 '0'
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
307 entry-0013 size 0
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
308 ''
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
309 #endif
42860
6f0273558c4b tests: show invalid copies when turning off copies-in-changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42859
diff changeset
310 $ hg showcopies --config experimental.copies.read-from=filelog-only
6f0273558c4b tests: show invalid copies when turning off copies-in-changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42859
diff changeset
311 a -> j
42300
278dcb24e535 copies: write empty entries in changeset when also writing to filelog
Martin von Zweigbergk <martinvonz@google.com>
parents: 42291
diff changeset
312 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: 42291
diff changeset
313 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: 42291
diff changeset
314 $ 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: 42861
diff changeset
315 #if extra
42300
278dcb24e535 copies: write empty entries in changeset when also writing to filelog
Martin von Zweigbergk <martinvonz@google.com>
parents: 42291
diff changeset
316 $ 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: 42291
diff changeset
317 $ hg changesetcopies
278dcb24e535 copies: write empty entries in changeset when also writing to filelog
Martin von Zweigbergk <martinvonz@google.com>
parents: 42291
diff changeset
318 files: j
42406
f385ba70e4af changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42300
diff changeset
319 filesadded:
f385ba70e4af changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42300
diff changeset
320 filesremoved:
f385ba70e4af changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42300
diff changeset
321
42300
278dcb24e535 copies: write empty entries in changeset when also writing to filelog
Martin von Zweigbergk <martinvonz@google.com>
parents: 42291
diff changeset
322 p1copies:
278dcb24e535 copies: write empty entries in changeset when also writing to filelog
Martin von Zweigbergk <martinvonz@google.com>
parents: 42291
diff changeset
323 p2copies:
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
324 #else
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
325 $ 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
326 $ hg debugsidedata -c -v -- -1
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
327 4 sidedata entries
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
328 entry-0010 size 0
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
329 ''
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
330 entry-0011 size 0
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
331 ''
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
332 entry-0012 size 0
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
333 ''
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
334 entry-0013 size 0
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
335 ''
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
336 #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
337
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
338 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
339
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
340 $ 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: 42861
diff changeset
341 #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
342 $ 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: 42861
diff changeset
343
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
344 $ 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
345 files: k
42406
f385ba70e4af changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42300
diff changeset
346
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
347 #else
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
348 $ 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
349 $ hg debugsidedata -c -v -- -1
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
350 4 sidedata entries
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
351 entry-0010 size 3
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
352 '0\x00a'
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
353 entry-0011 size 0
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
354 ''
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
355 entry-0012 size 1
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
356 '0'
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
357 entry-0013 size 0
beed7ce61681 sidedatacopies: write copies information in sidedata when applicable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43141
diff changeset
358 ''
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
359 #endif
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
360
42141
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
361 $ 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
362 \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
363 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
364 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
365 \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
366 a
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
367 #if extra
42142
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
368 $ hg showcopies
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
369
42142
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
370 $ 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
371 a -> k
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 42141
diff changeset
372 $ 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
373 a -> k
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
374 #else
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
375 $ hg showcopies
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
376 a -> k
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
377 #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
378
0e41f40b01cc copies: add config option for writing copy metadata to file and/or changset
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
379 $ cd ..
42289
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
380
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
381 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
382
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
383 $ hg init rebase-rename
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
384 $ cd rebase-rename
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
385 $ echo a > a
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
386 $ 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
387 $ echo a2 > a
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
388 $ 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
389 $ hg co -q 0
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
390 $ hg mv a b
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
391 $ hg ci -qm 'rename a to b'
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
392 $ hg rebase -d 1 --config rebase.experimental.inmemory=yes
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
393 rebasing 2:* "rename a to b" (tip) (glob)
42289
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
394 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: 42861
diff changeset
395 saved backup bundle to $TESTTMP/rebase-rename/.hg/strip-backup/*-*-rebase.hg (glob)
42289
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
396 $ hg st --change . --copies
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
397 A b
42291
a13b30555ffb context: reuse changectx._copies() in all but workingctx
Martin von Zweigbergk <martinvonz@google.com>
parents: 42289
diff changeset
398 a
42289
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
399 R a
83b225fbd788 tests: demonstrate loss of changeset copy metadata on rebase
Martin von Zweigbergk <martinvonz@google.com>
parents: 42142
diff changeset
400 $ cd ..
42858
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42427
diff changeset
401
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42427
diff changeset
402 Test splitting a commit
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42427
diff changeset
403
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42427
diff changeset
404 $ hg init split
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42427
diff changeset
405 $ cd split
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42427
diff changeset
406 $ echo a > a
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42427
diff changeset
407 $ echo b > b
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42427
diff changeset
408 $ 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: 42427
diff changeset
409 $ echo a2 > a
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42427
diff changeset
410 $ hg mv b c
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42427
diff changeset
411 $ hg ci -m 'modify a, move b to c'
42859
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42858
diff changeset
412 $ hg --config ui.interactive=yes split <<EOF
42858
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42427
diff changeset
413 > y
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42427
diff changeset
414 > y
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42427
diff changeset
415 > n
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42427
diff changeset
416 > y
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42427
diff changeset
417 > EOF
42859
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42858
diff changeset
418 diff --git a/a b/a
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42858
diff changeset
419 1 hunks, 1 lines changed
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42858
diff changeset
420 examine changes to 'a'?
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42858
diff changeset
421 (enter ? for help) [Ynesfdaq?] y
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42858
diff changeset
422
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42858
diff changeset
423 @@ -1,1 +1,1 @@
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42858
diff changeset
424 -a
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42858
diff changeset
425 +a2
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42858
diff changeset
426 record this change to 'a'?
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42858
diff changeset
427 (enter ? for help) [Ynesfdaq?] y
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42858
diff changeset
428
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42858
diff changeset
429 diff --git a/b b/c
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42858
diff changeset
430 rename from b
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42858
diff changeset
431 rename to c
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42858
diff changeset
432 examine changes to 'b' and 'c'?
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42858
diff changeset
433 (enter ? for help) [Ynesfdaq?] n
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42858
diff changeset
434
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42858
diff changeset
435 created new head
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42858
diff changeset
436 diff --git a/b b/c
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42858
diff changeset
437 rename from b
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42858
diff changeset
438 rename to c
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42858
diff changeset
439 examine changes to 'b' and 'c'?
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42858
diff changeset
440 (enter ? for help) [Ynesfdaq?] y
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42858
diff changeset
441
43141
52781d57313d sidedatacopies: introduce a sidedata testcase for test-copies-in-changeset.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42861
diff changeset
442 saved backup bundle to $TESTTMP/split/.hg/strip-backup/*-*-split.hg (glob)
42858
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42427
diff changeset
443 $ cd ..
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42427
diff changeset
444
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42427
diff changeset
445 Test committing half a rename
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42427
diff changeset
446
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42427
diff changeset
447 $ hg init partial
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42427
diff changeset
448 $ cd partial
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42427
diff changeset
449 $ echo a > a
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42427
diff changeset
450 $ hg ci -Aqm 'add a'
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42427
diff changeset
451 $ hg mv a b
42859
2b869a515ba6 context: filter out invalid copies from workingctx.p[12]copies()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42858
diff changeset
452 $ 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
453
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
454 #if sidedata
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
455
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
456 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
457 ==============================================
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
458
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
459 downgrading (keeping some sidedata)
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
460
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
461 $ hg debugformat -v
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
462 format-variant repo config default
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
463 fncache: yes yes yes
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
464 dotencode: yes yes yes
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
465 generaldelta: yes yes yes
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
466 sparserevlog: yes yes yes
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
467 sidedata: yes yes no
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
468 copies-sdc: yes yes no
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
469 plain-cl-delta: yes yes yes
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
470 compression: zlib zlib zlib
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
471 compression-level: default default default
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
472 $ 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
473 4 sidedata entries
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
474 entry-0010 size 0
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
475 entry-0011 size 0
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
476 entry-0012 size 1
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
477 entry-0013 size 0
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 -c -- 1
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
479 4 sidedata entries
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
480 entry-0010 size 0
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
481 entry-0011 size 0
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
482 entry-0012 size 0
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
483 entry-0013 size 1
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
484 $ 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
485 $ 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
486 > [format]
43167
bca9d1a6c4c5 sidedata: rename the configuration option to `exp-use-side-data`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43148
diff changeset
487 > exp-use-side-data = yes
43148
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
488 > exp-use-copies-side-data-changeset = no
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
489 > EOF
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
490 $ 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
491 $ hg debugformat -v
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
492 format-variant repo config default
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
493 fncache: yes yes yes
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
494 dotencode: yes yes yes
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
495 generaldelta: yes yes yes
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
496 sparserevlog: yes yes yes
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
497 sidedata: yes yes no
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
498 copies-sdc: no no no
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
499 plain-cl-delta: yes yes yes
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
500 compression: zlib zlib zlib
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
501 compression-level: default default default
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
502 $ 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
503 $ 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
504 $ 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
505
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
506 upgrading
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
507
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
508 $ 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
509 > [format]
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
510 > 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
511 > EOF
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
512 $ 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
513 $ hg debugformat -v
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
514 format-variant repo config default
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
515 fncache: yes yes yes
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
516 dotencode: yes yes yes
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
517 generaldelta: yes yes yes
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
518 sparserevlog: yes yes yes
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
519 sidedata: yes yes no
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
520 copies-sdc: yes yes no
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
521 plain-cl-delta: yes yes yes
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
522 compression: zlib zlib zlib
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
523 compression-level: default default default
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
524 $ 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
525 4 sidedata entries
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
526 entry-0010 size 0
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
527 entry-0011 size 0
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
528 entry-0012 size 1
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
529 entry-0013 size 0
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
530 $ 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
531 4 sidedata entries
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
532 entry-0010 size 0
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
533 entry-0011 size 0
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
534 entry-0012 size 0
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
535 entry-0013 size 1
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
536 $ 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
537
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
538 #endif
843da18386d5 sidedatacopies: deal with upgrading and downgrading to that format
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43142
diff changeset
539
42858
170b070ec6a5 tests: demonstrate crash when committing subset of copies to changeset
Martin von Zweigbergk <martinvonz@google.com>
parents: 42427
diff changeset
540 $ cd ..