Mercurial > hg
comparison mercurial/unionrepo.py @ 31242:854f9188e354
vfs: use 'vfs' module directly in 'mercurial.unionrepo'
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 14:49:50 +0100 |
parents | 2df983125d37 |
children | f1e0446e804c |
comparison
equal
deleted
inserted
replaced
31241:591fda751c6b | 31242:854f9188e354 |
---|---|
25 manifest, | 25 manifest, |
26 mdiff, | 26 mdiff, |
27 pathutil, | 27 pathutil, |
28 pycompat, | 28 pycompat, |
29 revlog, | 29 revlog, |
30 scmutil, | |
31 util, | 30 util, |
31 vfs as vfsmod, | |
32 ) | 32 ) |
33 | 33 |
34 class unionrevlog(revlog.revlog): | 34 class unionrevlog(revlog.revlog): |
35 def __init__(self, opener, indexfile, revlog2, linkmapper): | 35 def __init__(self, opener, indexfile, revlog2, linkmapper): |
36 # How it works: | 36 # How it works: |
37 # To retrieve a revision, we just need to know the node id so we can | 37 # To retrieve a revision, we just need to know the node id so we can |
38 # look it up in revlog2. | 38 # look it up in revlog2. |
39 # | 39 # |
40 # To differentiate a rev in the second revlog from a rev in the revlog, | 40 # To differentiate a rev in the second revlog from a rev in the revlog, |
41 # we check revision against repotiprev. | 41 # we check revision against repotiprev. |
42 opener = scmutil.readonlyvfs(opener) | 42 opener = vfsmod.readonlyvfs(opener) |
43 revlog.revlog.__init__(self, opener, indexfile) | 43 revlog.revlog.__init__(self, opener, indexfile) |
44 self.revlog2 = revlog2 | 44 self.revlog2 = revlog2 |
45 | 45 |
46 n = len(self) | 46 n = len(self) |
47 self.repotiprev = n - 1 | 47 self.repotiprev = n - 1 |