code: def __clearRepositoryCache(self, duplicate=None):
          
  
          for node in list(self.entries.values()):
              if node != self.dir:
                  if node != self and isinstance(node, Dir):
                      node.__clearRepositoryCache(duplicate)
                  else:
                      node.clear()
                      try:
                          del node._srcreps
                      except AttributeError:
                          pass
                      if duplicate is not None:
                          node.duplicate=duplicate
docs: Called when we change the repository(ies) for a directory.
          This clears any cached information that is invalidated by changing
          the repository.