Patchwork [1,of,5] statichttprepo: do not try to write caches

login
register
mail settings
Submitter Pierre-Yves David
Date Aug. 5, 2016, 11:02 p.m.
Message ID <4a7a67439e3effbf5701.1470438173@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/16143/
State Accepted
Headers show

Comments

Pierre-Yves David - Aug. 5, 2016, 11:02 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 4a7a67439e3effbf57012c841f7686e69422e8aa
# Parent  834b8ac4a7587562dccb527b28606ecf5532e883
# 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.
Yuya Nishihara - Aug. 7, 2016, 11:12 a.m.
On Sat, 06 Aug 2016 01:02:53 +0200, Pierre-Yves David 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 4a7a67439e3effbf57012c841f7686e69422e8aa
> # Parent  834b8ac4a7587562dccb527b28606ecf5532e883
> # 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.

Makes sense. Queued this patch, thanks.

Patch

diff -r 834b8ac4a758 -r 4a7a67439e3e 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 # statichttprepository are read only
+
 def instance(ui, path, create):
     if create:
         raise error.Abort(_('cannot create new static-http repository'))