equal
deleted
inserted
replaced
712 _("unknown repository format: requires features '%s' (upgrade " |
712 _("unknown repository format: requires features '%s' (upgrade " |
713 "Mercurial)") % "', '".join(missings)) |
713 "Mercurial)") % "', '".join(missings)) |
714 return requirements |
714 return requirements |
715 |
715 |
716 class filecacheentry(object): |
716 class filecacheentry(object): |
717 def __init__(self, path, stat=True): |
717 def __init__(self, path, stat): |
718 self.path = path |
718 self.path = path |
719 self.cachestat = None |
719 self.cachestat = None |
720 self._cacheable = None |
720 self._cacheable = None |
721 |
721 |
722 if stat: |
722 if stat: |
812 else: |
812 else: |
813 path = self.join(obj, self.path) |
813 path = self.join(obj, self.path) |
814 |
814 |
815 # We stat -before- creating the object so our cache doesn't lie if |
815 # We stat -before- creating the object so our cache doesn't lie if |
816 # a writer modified between the time we read and stat |
816 # a writer modified between the time we read and stat |
817 entry = filecacheentry(path) |
817 entry = filecacheentry(path, True) |
818 entry.obj = self.func(obj) |
818 entry.obj = self.func(obj) |
819 |
819 |
820 obj._filecache[self.name] = entry |
820 obj._filecache[self.name] = entry |
821 |
821 |
822 obj.__dict__[self.name] = entry.obj |
822 obj.__dict__[self.name] = entry.obj |