diff 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
line wrap: on
line diff
--- a/tests/test-copies-in-changeset.t	Mon May 13 14:19:36 2019 -0400
+++ b/tests/test-copies-in-changeset.t	Tue Apr 23 13:29:13 2019 -0700
@@ -103,6 +103,7 @@
   $ hg changesetcopies
   files: j
   p1copies: j\x00a (esc)
+  p2copies: 
   $ hg debugdata j 0
   \x01 (esc)
   copy: a
@@ -115,6 +116,14 @@
   a -> j
   $ hg showcopies --config experimental.copies.read-from=filelog-only
   a -> j
+The entries should be written to extras even if they're empty (so the client
+won't have to fall back to reading from filelogs)
+  $ echo x >> j
+  $ hg ci -m 'modify j' --config experimental.copies.write-to=compatibility
+  $ hg changesetcopies
+  files: j
+  p1copies: 
+  p2copies: 
 
 Test writing only to filelog