##// END OF EJS Templates
subrepo: add wvfs field to access the working directory via vfs...
FUJIWARA Katsunori -
r24672:dd0b86f7 default
parent child Browse files
Show More
@@ -552,6 +552,12 b' class abstractsubrepo(object):'
552 def shortid(self, revid):
552 def shortid(self, revid):
553 return revid
553 return revid
554
554
555 @propertycache
556 def wvfs(self):
557 """return vfs to access the working directory of this subrepository
558 """
559 return scmutil.vfs(self._ctx.repo().wvfs.join(self._path))
560
555 class hgsubrepo(abstractsubrepo):
561 class hgsubrepo(abstractsubrepo):
556 def __init__(self, ctx, path, state):
562 def __init__(self, ctx, path, state):
557 super(hgsubrepo, self).__init__(ctx, path)
563 super(hgsubrepo, self).__init__(ctx, path)
@@ -944,6 +950,12 b' class hgsubrepo(abstractsubrepo):'
944 def shortid(self, revid):
950 def shortid(self, revid):
945 return revid[:12]
951 return revid[:12]
946
952
953 @propertycache
954 def wvfs(self):
955 """return own wvfs for efficiency and consitency
956 """
957 return self._repo.wvfs
958
947 class svnsubrepo(abstractsubrepo):
959 class svnsubrepo(abstractsubrepo):
948 def __init__(self, ctx, path, state):
960 def __init__(self, ctx, path, state):
949 super(svnsubrepo, self).__init__(ctx, path)
961 super(svnsubrepo, self).__init__(ctx, path)
General Comments 0
You need to be logged in to leave comments. Login now