Getting started with a content filter

Martin Pool mbp at canonical.com
Thu Jul 28 01:15:16 UTC 2011


On 28 July 2011 02:44, Anteru <newsgroups at catchall.shelter13.net> wrote:
> Hi,
>
>> You can look up per-branch configuration options if you want to let
>> users control what is stored or where.  But based on the previous
>> discussion it seemed to me that you'd probably want to have a file in
>> .bzrmeta that gives some additional files that ought to be checked
>> out, and the places to put them at?
> the main problem is how to distinguish between files with the same path.
> I.e. the user might to
>
> bzr add-large foo.png && bzr ci
> // mark foo.png as large
> bzr rm foo.png && bzr ci
> bzr add foo.png && bzr ci
> // foo.png is a small file now, and shouldn't be tracked any more

bzr adds files with a unique id (file_id), so you can distinguish
these cases.  However, I think it's perhaps jumping ahead a bit to
assume this is the way that users want to deal with very large files.

I think storing files outside of the repository is essentially a bit
of a hack and if we're going to do that, perhaps we should just do the
simplest thing that would possibly help.  To me, that's something like
just having a post-wt-update hook that reads a file with a list of
URLs and paths, and downloads the relevant files.

There's another possible path, which is to tune the in-repository code
to handle very large files efficiently: probably putting them into
their own groupcompress packs, not compressing them against anything
else, being careful to use streaming interfaces, never doing text
diffs on them.  It's not impossible and the foundations are there but
it will take some work; probably mostly just iterating to see where
each problem is.  If you want a totally smooth "works just like small
files" experience, I think this is the way to go.

m



More information about the bazaar mailing list