Opened 4 years ago

Closed 4 years ago

#10320 closed defect (duplicate)

Deleted repos break search

Reported by: ejucovy Owned by: ejucovy
Priority: high Component: MultiRepoSearchPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12


If a repository's contents have been cached by the sqlindexer component, and the repository is subsequently removed from Trac, future searches will continue to return that repository's contents, resulting in an error like AttributeError: 'NoneType' object has no attribute 'get_node'.

Attachments (0)

Change History (2)

comment:1 Changed 4 years ago by ejucovy

Here's a workaround:

  • multireposearch/

    diff --git a/multireposearch/ b/multireposearch/
    index 9609ad5..7e8a3de 100644
    a b class MultiRepoSearchPlugin(Component): 
    8787        for filename, reponame in self.search_backend.find_words(query):
    8888            repo = self.env.get_repository(reponame=reponame, authname=req.authname)
     89            if repo is None:
     90                continue
    8991            node = repo.get_node(filename)
    9193            if node.kind == Node.DIRECTORY:

comment:2 Changed 4 years ago by ejucovy

  • Resolution set to duplicate
  • Status changed from new to closed

Whoops, I just duplicated this ticket as #10792. I decided that the "workaround" is actually the correct fix, and implemented it. Fixed in version 0.4 which I just released.

Add Comment

Modify Ticket

as closed The owner will remain ejucovy.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.