comparison mercurial/store.py @ 6897:faea0d27e38f

statichttp: use store class This lets us nix store.encodefn.
author Matt Mackall <mpm@selenic.com>
date Wed, 13 Aug 2008 20:18:43 -0500
parents 40690d614ce6
children 69aeaaaf6e07
comparison
equal deleted inserted replaced
6896:40690d614ce6 6897:faea0d27e38f
117 reporterror(_("cannot decode filename '%s'") % f) 117 reporterror(_("cannot decode filename '%s'") % f)
118 118
119 def join(self, f): 119 def join(self, f):
120 return os.path.join(self.path, self.encodefn(f)) 120 return os.path.join(self.path, self.encodefn(f))
121 121
122 def encodefn(requirements):
123 if 'store' not in requirements:
124 return lambda x: x
125 else:
126 return encodefilename
127
128 def store(requirements, path, opener): 122 def store(requirements, path, opener):
129 if 'store' not in requirements: 123 if 'store' not in requirements:
130 return directstore(path, opener) 124 return directstore(path, opener)
131 else: 125 else:
132 return encodedstore(path, opener) 126 return encodedstore(path, opener)