[PATCH 1 of 6] statichttprepo: update profile of __call__ in mock vfs object

Mads Kiilerich mads at kiilerich.com
Sun Dec 14 18:34:20 UTC 2014


# HG changeset patch
# User Mads Kiilerich <madski at unity3d.com>
# Date 1418581678 -3600
#      Sun Dec 14 19:27:58 2014 +0100
# Node ID d35c8e8e2c7f980853fc4da0f0e251f8ca197d43
# Parent  495bc1b65d25872324a0220354f048b220304bd1
statichttprepo: update profile of __call__ in mock vfs object

New code paths could fail because the old statichttprepo profile couldn't
handle the usual parameters.

Instead, reuse a more generic profile also used in readonlyvfs.

diff --git a/mercurial/statichttprepo.py b/mercurial/statichttprepo.py
--- a/mercurial/statichttprepo.py
+++ b/mercurial/statichttprepo.py
@@ -70,7 +70,7 @@
         def __init__(self, base):
             self.base = base
 
-        def __call__(self, path, mode="r", atomictemp=None):
+        def __call__(self, path, mode='r', *args, **kw):
             if mode not in ('r', 'rb'):
                 raise IOError('Permission denied')
             f = "/".join((self.base, urllib.quote(path)))


More information about the Mercurial-devel mailing list