Modify

Opened 7 years ago

Last modified 5 months ago

#2324 new defect

[Patch] Reposearch always reindexes repository

Reported by: Jirka.Vejrazka@… Owned by: anonymous
Priority: normal Component: RepoSearchPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

Hello,

I found out that reposearch plugin always reindexes the repository upon search query. A bit of digging in the source code revealed that function need_reindex() in indexer.py compares self.repo.youngest_rev (type Unicode) with int(self.meta.get('last-repo-rev', -1)). These never match, therefore reindexing is started.

Changing int(self.meta.get('last-repo-rev', -1)) to unicode(self.meta.get('last-repo-rev', -1)) seems to solve the problem.

I'm using Trac 0.10.3 on Debian, if that's of any relevance. Latest revision of RepoSearch Plugin (reposearchplugin-r2920.zip)

Thanks for the great plugin BTW!

Jirka Vejrazka

Attachments (0)

Change History (7)

comment:1 Changed 7 years ago by athomas

Ah yes, I think this must have broken during one of the versioncontrol changes to support VCS's with non-numeric changeset identifiers.

Thanks for the fix, I'll commit soon.

comment:2 Changed 7 years ago by anonymous

Any progress on this? It seems like the latest release still has this issue.

comment:3 Changed 6 years ago by grimsy

Thanks for the fix Jirka. I made the change on a local working copy, recompiled and it's working much better.

comment:4 Changed 5 years ago by rjollos

  • Owner changed from athomas to rjollos

Reassigning ticket after changing maintainer of plugin.

comment:5 Changed 5 years ago by rjollos

  • Summary changed from Reposearch always reindexes repository to [Patch] Reposearch always reindexes repository

See also #3634. I will look at applying this fix.

comment:6 Changed 3 years ago by rjollos

Hello,

I took over maintainership of this plugin from athomas some time ago. There is a significant amount of work to do on this plugin, and I don't foresee having the time to do it all.

helend has written the TracSuposePlugin, which seems like a much better solution. Rather than writing the repository search functionality from scratch, a Trac interface to an existing repository search tool has been created. Rather than throwing more effort at this plugin, I'd prefer to help helend with enhancements to the TracSuposePlugin, or spend my time on other Trac plugin projects altogether.

I'd like to get some feedback and hear if anyone knows of a compelling reason to continue this project rather than moving to the TracSuposePlugin. Is there functionality in this plugin that doesn't exist in the TracSuposePlugin? I'm open to hearing all opinions and suggestions.

I'll leave these tickets open for about a week, but in all likelihood will close all of them and deprecate the plugin.

Thanks for your time,

  • Ryan

comment:7 Changed 5 months ago by rjollos

  • Owner changed from rjollos to anonymous

Add Comment

Modify Ticket

Action
as new The owner will remain anonymous.
Author


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

 
Note: See TracTickets for help on using tickets.