comparison tests/test-copies-in-changeset.t @ 42426:a1f87294471f

copies: also encode p[12]copies destination as index into "files" list This is mostly for consistency with the filesaddes/filesremoved fields, but it should also save a bit of space. Differential Revision: https://phab.mercurial-scm.org/D6431
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 22 May 2019 09:54:00 -0700
parents f385ba70e4af
children 027f1567f97f
comparison
equal deleted inserted replaced
42425:b9ff059fd194 42426:a1f87294471f
25 $ hg ci -m 'copy a to b, c, and d' 25 $ hg ci -m 'copy a to b, c, and d'
26 $ hg changesetcopies 26 $ hg changesetcopies
27 files: b c d 27 files: b c d
28 filesadded: 0\x001\x002 (esc) 28 filesadded: 0\x001\x002 (esc)
29 29
30 p1copies: b\x00a (esc) 30 p1copies: 0\x00a (esc)
31 c\x00a (esc) 31 1\x00a (esc)
32 d\x00a (esc) 32 2\x00a (esc)
33 $ hg showcopies 33 $ hg showcopies
34 a -> b 34 a -> b
35 a -> c 35 a -> c
36 a -> d 36 a -> d
37 $ hg showcopies --config experimental.copies.read-from=compatibility 37 $ hg showcopies --config experimental.copies.read-from=compatibility
47 $ hg changesetcopies 47 $ hg changesetcopies
48 files: b b2 48 files: b b2
49 filesadded: 1 49 filesadded: 1
50 filesremoved: 0 50 filesremoved: 0
51 51
52 p1copies: b2\x00b (esc) 52 p1copies: 1\x00b (esc)
53 $ hg showcopies 53 $ hg showcopies
54 b -> b2 54 b -> b2
55 55
56 Rename onto existing file. This should get recorded in the changeset files list and in the extras, 56 Rename onto existing file. This should get recorded in the changeset files list and in the extras,
57 even though there is no filelog entry. 57 even though there is no filelog entry.
65 0 1 b789fdd96dc2 000000000000 000000000000 65 0 1 b789fdd96dc2 000000000000 000000000000
66 $ hg ci -m 'move b onto d' 66 $ hg ci -m 'move b onto d'
67 $ hg changesetcopies 67 $ hg changesetcopies
68 files: c 68 files: c
69 69
70 p1copies: c\x00b2 (esc) 70 p1copies: 0\x00b2 (esc)
71 $ hg showcopies 71 $ hg showcopies
72 b2 -> c 72 b2 -> c
73 $ hg debugindex c 73 $ hg debugindex c
74 rev linkrev nodeid p1 p2 74 rev linkrev nodeid p1 p2
75 0 1 b789fdd96dc2 000000000000 000000000000 75 0 1 b789fdd96dc2 000000000000 000000000000
95 $ hg ci -m 'merge' 95 $ hg ci -m 'merge'
96 $ hg changesetcopies 96 $ hg changesetcopies
97 files: g h i 97 files: g h i
98 filesadded: 0\x001\x002 (esc) 98 filesadded: 0\x001\x002 (esc)
99 99
100 p1copies: g\x00a (esc) 100 p1copies: 0\x00a (esc)
101 i\x00f (esc) 101 2\x00f (esc)
102 p2copies: h\x00d (esc) 102 p2copies: 1\x00d (esc)
103 $ hg showcopies 103 $ hg showcopies
104 a -> g 104 a -> g
105 d -> h 105 d -> h
106 f -> i 106 f -> i
107 107
112 $ hg changesetcopies 112 $ hg changesetcopies
113 files: j 113 files: j
114 filesadded: 0 114 filesadded: 0
115 filesremoved: 115 filesremoved:
116 116
117 p1copies: j\x00a (esc) 117 p1copies: 0\x00a (esc)
118 p2copies: 118 p2copies:
119 $ hg debugdata j 0 119 $ hg debugdata j 0
120 \x01 (esc) 120 \x01 (esc)
121 copy: a 121 copy: a
122 copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 122 copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
171 $ hg ci -m 'modify a' 171 $ hg ci -m 'modify a'
172 $ hg co -q 0 172 $ hg co -q 0
173 $ hg mv a b 173 $ hg mv a b
174 $ hg ci -qm 'rename a to b' 174 $ hg ci -qm 'rename a to b'
175 $ hg rebase -d 1 --config rebase.experimental.inmemory=yes 175 $ hg rebase -d 1 --config rebase.experimental.inmemory=yes
176 rebasing 2:acfc33f3aa6d "rename a to b" (tip) 176 rebasing 2:fc7287ac5b9b "rename a to b" (tip)
177 merging a and b to b 177 merging a and b to b
178 saved backup bundle to $TESTTMP/rebase-rename/.hg/strip-backup/acfc33f3aa6d-81d0180d-rebase.hg 178 saved backup bundle to $TESTTMP/rebase-rename/.hg/strip-backup/fc7287ac5b9b-8f2a95ec-rebase.hg
179 $ hg st --change . --copies 179 $ hg st --change . --copies
180 A b 180 A b
181 a 181 a
182 R a 182 R a
183 $ cd .. 183 $ cd ..