Mercurial > hg-stable
comparison mercurial/cmdutil.py @ 31247:1b08aca7870a
vfs: use 'vfs' module directly in 'mercurial.cmdutil'
Now that the 'vfs' classes moved in their own module, lets use the new module
directly. We update code iteratively to help with possible bisect needs in the
future.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Thu, 02 Mar 2017 13:30:47 +0100 |
parents | 21fa3d3688f3 |
children | 8908f985570c |
comparison
equal
deleted
inserted
replaced
31246:8a0687a2be75 | 31247:1b08aca7870a |
---|---|
43 scmutil, | 43 scmutil, |
44 smartset, | 44 smartset, |
45 templatekw, | 45 templatekw, |
46 templater, | 46 templater, |
47 util, | 47 util, |
48 vfs as vfsmod, | |
48 ) | 49 ) |
49 stringio = util.stringio | 50 stringio = util.stringio |
50 | 51 |
51 # special string such that everything below this line will be ingored in the | 52 # special string such that everything below this line will be ingored in the |
52 # editor text | 53 # editor text |
581 if not r: | 582 if not r: |
582 if not file_: | 583 if not file_: |
583 raise error.CommandError(cmd, _('invalid arguments')) | 584 raise error.CommandError(cmd, _('invalid arguments')) |
584 if not os.path.isfile(file_): | 585 if not os.path.isfile(file_): |
585 raise error.Abort(_("revlog '%s' not found") % file_) | 586 raise error.Abort(_("revlog '%s' not found") % file_) |
586 r = revlog.revlog(scmutil.vfs(pycompat.getcwd(), audit=False), | 587 r = revlog.revlog(vfsmod.vfs(pycompat.getcwd(), audit=False), |
587 file_[:-2] + ".i") | 588 file_[:-2] + ".i") |
588 return r | 589 return r |
589 | 590 |
590 def copy(ui, repo, pats, opts, rename=False): | 591 def copy(ui, repo, pats, opts, rename=False): |
591 # called with the repo lock held | 592 # called with the repo lock held |