comparison mercurial/localrepo.py @ 31148:3eaff87a0a89

localrepo: deprecate 'repo.opener' (API) The "new" 'repo.vfs' attribute have been around for almost 5 years. I think we can deprecate the old form now ;-)
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Fri, 05 Aug 2016 13:56:10 +0200
parents 11a97785f75c
children dd2364f5180a
comparison
equal deleted inserted replaced
31147:e04ab2a5bf90 31148:3eaff87a0a89
265 self.origroot = path 265 self.origroot = path
266 self.auditor = pathutil.pathauditor(self.root, self._checknested) 266 self.auditor = pathutil.pathauditor(self.root, self._checknested)
267 self.nofsauditor = pathutil.pathauditor(self.root, self._checknested, 267 self.nofsauditor = pathutil.pathauditor(self.root, self._checknested,
268 realfs=False) 268 realfs=False)
269 self.vfs = scmutil.vfs(self.path) 269 self.vfs = scmutil.vfs(self.path)
270 self.opener = self.vfs
271 self.baseui = baseui 270 self.baseui = baseui
272 self.ui = baseui.copy() 271 self.ui = baseui.copy()
273 self.ui.copy = baseui.copy # prevent copying repo configuration 272 self.ui.copy = baseui.copy # prevent copying repo configuration
274 # A list of callback to shape the phase if no data were found. 273 # A list of callback to shape the phase if no data were found.
275 # Callback are in the form: func(repo, roots) --> processed root. 274 # Callback are in the form: func(repo, roots) --> processed root.
381 380
382 @property 381 @property
383 def wopener(self): 382 def wopener(self):
384 self.ui.deprecwarn("use 'repo.wvfs' instead of 'repo.wopener'", '4.2') 383 self.ui.deprecwarn("use 'repo.wvfs' instead of 'repo.wopener'", '4.2')
385 return self.wvfs 384 return self.wvfs
385
386 @property
387 def opener(self):
388 self.ui.deprecwarn("use 'repo.vfs' instead of 'repo.opener'", '4.2')
389 return self.vfs
386 390
387 def close(self): 391 def close(self):
388 self._writecaches() 392 self._writecaches()
389 393
390 def _loadextensions(self): 394 def _loadextensions(self):