[PATCH] largefiles: makes verify to work on local content by default (issue4242) (BC)
yuya at tcha.org
Mon Mar 14 09:15:27 EDT 2016
On Fri, 11 Mar 2016 13:56:56 +0100, Piotr Listkiewicz wrote:
> > Hmm it looks for me like this is the other bug in largefile, this would
> > mean that so far --lfc for remote repos didnt verify file contents but only
> > existence.
> > After applying this patch --lfc will use localstore.localstore which
> > verifies contents correctly (not just existence) but for remote repos it
> > will preserve current( for me it looks like bad) behaviour.
> I checked this once again and I was totally wrong about remotestore and
> "--lfc" and "--lfc --remote", Im sorry for that.
> First of all i made mistake of not changing help, for verify --lfc should
> "verify largefile contents, not just existence" , without remote it will
> check locally , with --remote it will check on remote server.
> After this patch 'hg verify --lfc' (without --remote) will be using
> localstore class (with self.remote object pointing to the same local
> repository as self.repo). This means that all checking will be done locally
> and checking file content will be working correctly(--large and --lfa also
> works only locally by default).
> As far as we concern local operations, everything is fine. Problem starts
> with --remote - that is the old implementation of largefiles verify. I have
> no idea how but it uses remotestore/wirestore object and connect to the
> other server with them but still verifies things locally.
> I have no idea how its working, maybe anybody have any suggestion?
I re-read the code, and it seems you get the point. Perhaps "local" has two
a) a repository alongside the current working directory
b) repositories that are stored in local filesystem (includes (a))
New "--remote" options switches (a), and "--lfc" seems to work only for (b).
So "--lfc" (without --remote) should always work. On the other hand,
"--lfc --remote" won't work if the peer repository is stored remotely.
Should we raise error in that case? I don't know...
More information about the Mercurial-devel