Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 31216:21fa3d3688f3
vfs: replace 'scmutil.opener' usage with 'scmutil.vfs'
The 'vfs' class is the first class citizen for years. We remove all usages of
the older API. This will let us remove the old API eventually.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Thu, 02 Mar 2017 03:52:36 +0100 |
parents | 3af9a9628ecf |
children | 1b08aca7870a |
comparison
equal
deleted
inserted
replaced
31215:15c998528c36 | 31216:21fa3d3688f3 |
---|---|
581 if not r: | 581 if not r: |
582 if not file_: | 582 if not file_: |
583 raise error.CommandError(cmd, _('invalid arguments')) | 583 raise error.CommandError(cmd, _('invalid arguments')) |
584 if not os.path.isfile(file_): | 584 if not os.path.isfile(file_): |
585 raise error.Abort(_("revlog '%s' not found") % file_) | 585 raise error.Abort(_("revlog '%s' not found") % file_) |
586 r = revlog.revlog(scmutil.opener(pycompat.getcwd(), audit=False), | 586 r = revlog.revlog(scmutil.vfs(pycompat.getcwd(), audit=False), |
587 file_[:-2] + ".i") | 587 file_[:-2] + ".i") |
588 return r | 588 return r |
589 | 589 |
590 def copy(ui, repo, pats, opts, rename=False): | 590 def copy(ui, repo, pats, opts, rename=False): |
591 # called with the repo lock held | 591 # called with the repo lock held |