Modify

#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

Description

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 23 months ago by ejucovy

Here's a workaround:

  • multireposearch/search.py

    diff --git a/multireposearch/search.py b/multireposearch/search.py
    index 9609ad5..7e8a3de 100644
    a b class MultiRepoSearchPlugin(Component): 
    8686 
    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) 
    9092 
    9193            if node.kind == Node.DIRECTORY: 

comment:2 Changed 19 months 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

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from ejucovy. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.