[PATCH] test-verify: add a testcase where the file has magic meta header

Yuya Nishihara yuya at tcha.org
Fri Mar 31 09:41:32 EDT 2017


On Thu, 30 Mar 2017 10:02:34 +0100, Ryan McElroy wrote:
> On 3/29/17 9:45 PM, Jun Wu wrote:
> > # HG changeset patch
> > # User Jun Wu <quark at fb.com>
> > # Date 1490820077 25200
> > #      Wed Mar 29 13:41:17 2017 -0700
> > # Node ID e9fda3b8614a8b701bd48041afa8b709e1227f27
> > # Parent  cda83a1bfb3ac3a23cfa158c407be93755c1018e
> > test-verify: add a testcase where the file has magic meta header
> >
> > We use a magic header "\1\n" to store metadata like renames. See filelog.py.
> > The patch adds tests about files with the special header.
> 
> Sure, but why? Just to prevent regressions of handling files with this 
> data that "looks like" metadata in them? What's the motivation for 
> adding this test? Just future safety or did you run into something?
> 
> I'm not against it -- adding this test seems like a good idea, but I'd 
> love more context on what led you to write it.

I remember I ran into a weird bug in production and fixed as 012b285cf643,
so I'm sure this test will avoid future bugs caused by '\1\n'.

Jun, can you resend it with more context, perhaps in your verify/rawsize
series? (There seem multiple threads related to this, but I don't follow
all of them.)


More information about the Mercurial-devel mailing list