comparison tests/test-copies-in-changeset.t @ 42860:6f0273558c4b

tests: show invalid copies when turning off copies-in-changeset If you turn on copies in changesets and write a commit with a copy, then turn it off and amend the commit while undoing the copy, the invalid copy information will remain. The read path doesn't crash in invalid copy data, but it seems better to not produce the invalid data. Differential Revision: https://phab.mercurial-scm.org/D6751
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 16 Jul 2019 21:15:35 -0700
parents 2b869a515ba6
children 57ea0a81a65c
comparison
equal deleted inserted replaced
42859:2b869a515ba6 42860:6f0273558c4b
131 a -> j 131 a -> j
132 $ hg showcopies --config experimental.copies.read-from=compatibility 132 $ hg showcopies --config experimental.copies.read-from=compatibility
133 a -> j 133 a -> j
134 $ hg showcopies --config experimental.copies.read-from=filelog-only 134 $ hg showcopies --config experimental.copies.read-from=filelog-only
135 a -> j 135 a -> j
136 Existing copy information in the changeset gets removed on amend and writing
137 copy information on to the filelog
138 $ hg ci --amend -m 'copy a to j, v2' \
139 > --config experimental.copies.write-to=filelog-only
140 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/dd7bb9581359-a6e6b6d2-amend.hg
141 $ hg changesetcopies
142 files: j
143 filesadded: 0
144 filesremoved:
145
146 p1copies: 0\x00a (esc)
147 p2copies:
148 $ hg showcopies --config experimental.copies.read-from=filelog-only
149 a -> j
136 The entries should be written to extras even if they're empty (so the client 150 The entries should be written to extras even if they're empty (so the client
137 won't have to fall back to reading from filelogs) 151 won't have to fall back to reading from filelogs)
138 $ echo x >> j 152 $ echo x >> j
139 $ hg ci -m 'modify j' --config experimental.copies.write-to=compatibility 153 $ hg ci -m 'modify j' --config experimental.copies.write-to=compatibility
140 $ hg changesetcopies 154 $ hg changesetcopies