Mercurial > hg
comparison tests/test-copies-in-changeset.t @ 42300:278dcb24e535
copies: write empty entries in changeset when also writing to filelog
When writing to both changeset and filelog (during transition), we
don't want the reader to waste time by falling back to reading from
the filelog when there is no copy metadata. Let's write out empty copy
metadata instead (the read path is already prepared for this
case). Thanks to Greg for pointing this out.
Differential Revision: https://phab.mercurial-scm.org/D6306
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 23 Apr 2019 13:29:13 -0700 |
parents | a13b30555ffb |
children | f385ba70e4af |
comparison
equal
deleted
inserted
replaced
42299:80a213f9ed87 | 42300:278dcb24e535 |
---|---|
101 $ hg cp a j | 101 $ hg cp a j |
102 $ hg ci -m 'copy a to j' --config experimental.copies.write-to=compatibility | 102 $ hg ci -m 'copy a to j' --config experimental.copies.write-to=compatibility |
103 $ hg changesetcopies | 103 $ hg changesetcopies |
104 files: j | 104 files: j |
105 p1copies: j\x00a (esc) | 105 p1copies: j\x00a (esc) |
106 p2copies: | |
106 $ hg debugdata j 0 | 107 $ hg debugdata j 0 |
107 \x01 (esc) | 108 \x01 (esc) |
108 copy: a | 109 copy: a |
109 copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 | 110 copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 |
110 \x01 (esc) | 111 \x01 (esc) |
113 a -> j | 114 a -> j |
114 $ hg showcopies --config experimental.copies.read-from=compatibility | 115 $ hg showcopies --config experimental.copies.read-from=compatibility |
115 a -> j | 116 a -> j |
116 $ hg showcopies --config experimental.copies.read-from=filelog-only | 117 $ hg showcopies --config experimental.copies.read-from=filelog-only |
117 a -> j | 118 a -> j |
119 The entries should be written to extras even if they're empty (so the client | |
120 won't have to fall back to reading from filelogs) | |
121 $ echo x >> j | |
122 $ hg ci -m 'modify j' --config experimental.copies.write-to=compatibility | |
123 $ hg changesetcopies | |
124 files: j | |
125 p1copies: | |
126 p2copies: | |
118 | 127 |
119 Test writing only to filelog | 128 Test writing only to filelog |
120 | 129 |
121 $ hg cp a k | 130 $ hg cp a k |
122 $ hg ci -m 'copy a to k' --config experimental.copies.write-to=filelog-only | 131 $ hg ci -m 'copy a to k' --config experimental.copies.write-to=filelog-only |