equal
deleted
inserted
replaced
33 pathutil, |
33 pathutil, |
34 phases, |
34 phases, |
35 pycompat, |
35 pycompat, |
36 scmutil, |
36 scmutil, |
37 util, |
37 util, |
|
38 vfs as vfsmod, |
38 ) |
39 ) |
39 |
40 |
40 hg = None |
41 hg = None |
41 propertycache = util.propertycache |
42 propertycache = util.propertycache |
42 |
43 |
613 |
614 |
614 @propertycache |
615 @propertycache |
615 def wvfs(self): |
616 def wvfs(self): |
616 """return vfs to access the working directory of this subrepository |
617 """return vfs to access the working directory of this subrepository |
617 """ |
618 """ |
618 return scmutil.vfs(self._ctx.repo().wvfs.join(self._path)) |
619 return vfsmod.vfs(self._ctx.repo().wvfs.join(self._path)) |
619 |
620 |
620 @propertycache |
621 @propertycache |
621 def _relpath(self): |
622 def _relpath(self): |
622 """return path to this subrepository as seen from outermost repository |
623 """return path to this subrepository as seen from outermost repository |
623 """ |
624 """ |
675 filehash = hashlib.sha1(vfs.tryread(relname)).hexdigest() |
676 filehash = hashlib.sha1(vfs.tryread(relname)).hexdigest() |
676 yield '%s = %s\n' % (relname, filehash) |
677 yield '%s = %s\n' % (relname, filehash) |
677 |
678 |
678 @propertycache |
679 @propertycache |
679 def _cachestorehashvfs(self): |
680 def _cachestorehashvfs(self): |
680 return scmutil.vfs(self._repo.join('cache/storehash')) |
681 return vfsmod.vfs(self._repo.join('cache/storehash')) |
681 |
682 |
682 def _readstorehashcache(self, remotepath): |
683 def _readstorehashcache(self, remotepath): |
683 '''read the store hash cache for a given remote repository''' |
684 '''read the store hash cache for a given remote repository''' |
684 cachefile = _getstorehashcachename(remotepath) |
685 cachefile = _getstorehashcachename(remotepath) |
685 return self._cachestorehashvfs.tryreadlines(cachefile, 'r') |
686 return self._cachestorehashvfs.tryreadlines(cachefile, 'r') |