[PATCH] largefiles: fix symlink handling, with testcase

Carter, Eli Eli.Carter at tektronix.com
Thu Oct 27 15:35:17 CDT 2011


> -----Original Message-----
> From: gerg.ward at gmail.com [mailto:gerg.ward at gmail.com] On Behalf Of
> Greg Ward
> Sent: Wednesday, October 26, 2011 8:26 PM
> To: Carter, Eli; Mercurial-devel
> Subject: Re: [PATCH] largefiles: fix symlink handling, with testcase
> 
> On Wed, Oct 26, 2011 at 2:50 PM, Carter, Eli <Eli.Carter at tektronix.com>
> wrote:
> > +Symlink to a large largefile should behave the same as a symlink to a
> normal file
> > +  $ hg init largesymlink
> > +  $ cd largesymlink
> > +  $ dd if=/dev/zero bs=1k count=10k of=largefile 2>/dev/null
> 
> 1) do you really need a separate repo for this test case? test-largefiles.t
>    has a perfectly good repo that it uses many times

I generally try to keep testcases independent so that what is going on is clearer, and changes to earlier testcases don't cascade through the entire set of tests.  Look at the testcases for the subversion subrepo support for an example of tests that reuse a repo and wind up being hard to understand.  I'd like to avoid that situation for largefiles.

> 2) do you really need a 10 MB file to test this? As long as it's bigger than
>    largefiles.minsize or --lfsize, it should test the bug.

A 2+MB file, given the config in the tests should be sufficient.  I keep using 10MiB because it's a "round number" and  10e6 bytes is a boundary that Mercurial cares about.

Eli


More information about the Mercurial-devel mailing list