##// END OF EJS Templates
hg: make cachedlocalrepo cache appropriate repoview object...
FUJIWARA Katsunori -
r28119:91a827e7 default
parent child Browse files
Show More
@@ -865,6 +865,7 b' class cachedlocalrepo(object):'
865 assert isinstance(repo, localrepo.localrepository)
865 assert isinstance(repo, localrepo.localrepository)
866 self._repo = repo
866 self._repo = repo
867 self._state, self.mtime = self._repostate()
867 self._state, self.mtime = self._repostate()
868 self._filtername = repo.filtername
868
869
869 def fetch(self):
870 def fetch(self):
870 """Refresh (if necessary) and return a repository.
871 """Refresh (if necessary) and return a repository.
@@ -884,7 +885,11 b' class cachedlocalrepo(object):'
884 if state == self._state:
885 if state == self._state:
885 return self._repo, False
886 return self._repo, False
886
887
887 self._repo = repository(self._repo.baseui, self._repo.url())
888 repo = repository(self._repo.baseui, self._repo.url())
889 if self._filtername:
890 self._repo = repo.filtered(self._filtername)
891 else:
892 self._repo = repo.unfiltered()
888 self._state = state
893 self._state = state
889 self.mtime = mtime
894 self.mtime = mtime
890
895
@@ -912,6 +917,10 b' class cachedlocalrepo(object):'
912 completely independent of the original.
917 completely independent of the original.
913 """
918 """
914 repo = repository(self._repo.baseui, self._repo.origroot)
919 repo = repository(self._repo.baseui, self._repo.origroot)
920 if self._filtername:
921 repo = repo.filtered(self._filtername)
922 else:
923 repo = repo.unfiltered()
915 c = cachedlocalrepo(repo)
924 c = cachedlocalrepo(repo)
916 c._state = self._state
925 c._state = self._state
917 c.mtime = self.mtime
926 c.mtime = self.mtime
General Comments 0
You need to be logged in to leave comments. Login now