##// END OF EJS Templates
scmutil: add join method to opener to construct path relative to base...
Idan Kamara -
r16199:8181bd80 stable
parent child Browse files
Show More
@@ -211,7 +211,7 b' class opener(abstractopener):'
211 if r:
211 if r:
212 raise util.Abort("%s: %r" % (r, path))
212 raise util.Abort("%s: %r" % (r, path))
213 self.auditor(path)
213 self.auditor(path)
214 f = os.path.join(self.base, path)
214 f = self.join(path)
215
215
216 if not text and "b" not in mode:
216 if not text and "b" not in mode:
217 mode += "b" # for that other OS
217 mode += "b" # for that other OS
@@ -255,7 +255,7 b' class opener(abstractopener):'
255
255
256 def symlink(self, src, dst):
256 def symlink(self, src, dst):
257 self.auditor(dst)
257 self.auditor(dst)
258 linkname = os.path.join(self.base, dst)
258 linkname = self.join(dst)
259 try:
259 try:
260 os.unlink(linkname)
260 os.unlink(linkname)
261 except OSError:
261 except OSError:
@@ -280,6 +280,9 b' class opener(abstractopener):'
280 def audit(self, path):
280 def audit(self, path):
281 self.auditor(path)
281 self.auditor(path)
282
282
283 def join(self, path):
284 return os.path.join(self.base, path)
285
283 class filteropener(abstractopener):
286 class filteropener(abstractopener):
284 '''Wrapper opener for filtering filenames with a function.'''
287 '''Wrapper opener for filtering filenames with a function.'''
285
288
General Comments 0
You need to be logged in to leave comments. Login now