Patchwork [3,of,7] statichttprepo: do not try to write caches

login
register
mail settings
Submitter Pierre-Yves David
Date Aug. 5, 2016, 1:59 p.m.
Message ID <c35e9b9c8de2bde1b16c.1470405556@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/16114/
State Superseded
Headers show

Comments

Pierre-Yves David - Aug. 5, 2016, 1:59 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
# Date 1470404889 -7200
#      Fri Aug 05 15:48:09 2016 +0200
# Node ID c35e9b9c8de2bde1b16c470f6d92ae5b2c258aad
# Parent  9677e36d339bc11d8223aadd9473eb7218b8b6cb
# EXP-Topic vfsward
statichttprepo: do not try to write caches

The static http repository are read only, there is no hope in any cache
writing attempt.
Gregory Szorc - Aug. 5, 2016, 2:23 p.m.
> On Aug 5, 2016, at 06:59, Pierre-Yves David <pierre-yves.david@ens-lyon.org> wrote:
> 
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
> # Date 1470404889 -7200
> #      Fri Aug 05 15:48:09 2016 +0200
> # Node ID c35e9b9c8de2bde1b16c470f6d92ae5b2c258aad
> # Parent  9677e36d339bc11d8223aadd9473eb7218b8b6cb
> # EXP-Topic vfsward
> statichttprepo: do not try to write caches
> 
> The static http repository are read only, there is no hope in any cache
> writing attempt.

I think that deserves an inline comment. I could see the empty method confusing people.

> 
> diff -r 9677e36d339b -r c35e9b9c8de2 mercurial/statichttprepo.py
> --- a/mercurial/statichttprepo.py    Fri Aug 05 13:44:17 2016 +0200
> +++ b/mercurial/statichttprepo.py    Fri Aug 05 15:48:09 2016 +0200
> @@ -181,6 +181,9 @@ class statichttprepository(localrepo.loc
>     def lock(self, wait=True):
>         raise error.Abort(_('cannot lock static-http repository'))
> 
> +    def _writecaches(self):
> +        pass
> +
> def instance(ui, path, create):
>     if create:
>         raise error.Abort(_('cannot create new static-http repository'))
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Augie Fackler - Aug. 5, 2016, 6:25 p.m.
On Fri, Aug 05, 2016 at 07:23:28AM -0700, Gregory Szorc wrote:
>
>
> > On Aug 5, 2016, at 06:59, Pierre-Yves David <pierre-yves.david@ens-lyon.org> wrote:
> >
> > # HG changeset patch
> > # User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
> > # Date 1470404889 -7200
> > #      Fri Aug 05 15:48:09 2016 +0200
> > # Node ID c35e9b9c8de2bde1b16c470f6d92ae5b2c258aad
> > # Parent  9677e36d339bc11d8223aadd9473eb7218b8b6cb
> > # EXP-Topic vfsward
> > statichttprepo: do not try to write caches
> >
> > The static http repository are read only, there is no hope in any cache
> > writing attempt.
>
> I think that deserves an inline comment. I could see the empty method confusing people.

+1

>
> >
> > diff -r 9677e36d339b -r c35e9b9c8de2 mercurial/statichttprepo.py
> > --- a/mercurial/statichttprepo.py    Fri Aug 05 13:44:17 2016 +0200
> > +++ b/mercurial/statichttprepo.py    Fri Aug 05 15:48:09 2016 +0200
> > @@ -181,6 +181,9 @@ class statichttprepository(localrepo.loc
> >     def lock(self, wait=True):
> >         raise error.Abort(_('cannot lock static-http repository'))
> >
> > +    def _writecaches(self):
> > +        pass
> > +
> > def instance(ui, path, create):
> >     if create:
> >         raise error.Abort(_('cannot create new static-http repository'))
> > _______________________________________________
> > Mercurial-devel mailing list
> > Mercurial-devel@mercurial-scm.org
> > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff -r 9677e36d339b -r c35e9b9c8de2 mercurial/statichttprepo.py
--- a/mercurial/statichttprepo.py	Fri Aug 05 13:44:17 2016 +0200
+++ b/mercurial/statichttprepo.py	Fri Aug 05 15:48:09 2016 +0200
@@ -181,6 +181,9 @@  class statichttprepository(localrepo.loc
     def lock(self, wait=True):
         raise error.Abort(_('cannot lock static-http repository'))
 
+    def _writecaches(self):
+        pass
+
 def instance(ui, path, create):
     if create:
         raise error.Abort(_('cannot create new static-http repository'))