[PATCH] largefiles: adding a file of 2GB causes errors in dirstate (issue3063)

Matt Mackall mpm at selenic.com
Fri Jan 13 11:12:49 CST 2012


On Fri, 2012-01-13 at 10:59 +0100, Na'Tosha Bard wrote:
> 2012/1/12 Matt Mackall <mpm at selenic.com>
> 
> > On Wed, 2012-01-11 at 20:13 +0100, Na'Tosha Bard wrote:
> > > On Wed, Jan 11, 2012 at 7:17 PM, Idan Kamara <idankk86 at gmail.com> wrote:
> > >
> > > > On Wed, Jan 11, 2012 at 8:08 PM, Na'Tosha Bard <natosha at unity3d.com
> > >wrote:
> > > >
> > > >> # HG changeset patch
> > > >> # User Na'Tosha Bard <natosha at unity3d.com>
> > > >> # Date 1326305303 -3600
> > > >> # Node ID 6cbd00c7cee81db062e0a86d2ee63fb85fa9bab2
> > > >> # Parent  c47d69ce5208d5b5cfd2fb2f0f1d7a2b4795fbf5
> > > >> largefiles: adding a file of 2GB causes errors in dirstate (issue3063)
> > > >
> > > >
> > > > Not sure it's worth a resend but a small nit: I think it's more
> > telling if
> > > > the summary line
> > > > indicates the nature of the change, rather than the bug description,
> > i.e.:
> > > >
> > > > largefiles: abort when adding files larger than 2GB (issue3063)
> > > >
> > >
> > > OK, we'll see what Matt says.
> >
> > Observation: if we're going to add a size limit check, it probably
> > belongs in core.
> >
> 
> I am more than happy to add one into core, but we don't call into any of
> the core "add" functionality for largefiles themselves, so we'd probably
> need to add a utility function that both core and extensions can use.  Does
> that seem like an acceptable route?

Yes, but let's try the other approach first.

> Counterproposal: change dirstate so that it does size comparison modulo
> > 2G (ie with & 0x7fffffff). It's not bulletproof, but will accept
> > arbitrarily large files with a very low probability of innocent
> > false-negatives.
> >
> 
> I will think about this some.  It could be a better "global" solution to
> the problem.
> 
> Cheers,
> Na'Tosha
> 


-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list