Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#8793 closed defect (fixed)

Repository search with SupoSE

Reported by: anonymous Owned by: anybody
Priority: normal Component: Request-a-Hack
Severity: normal Keywords:
Cc: Trac Release: 0.12


TracRepoSearch could be used to search repository. But this plugin can only search the head revision, and have to be reindex after a few days.

I just found SupoSE is a powerful tools to search repository. It would be wonderful if there is a plugin to integrate SupoSE with Trac.

Attachments (1) (1.9 KB) - added by Bangyou Zheng 7 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 7 years ago by Bangyou Zheng

Sorry, it's my ticket.

comment:2 Changed 7 years ago by Ryan J Ollos

There is also the ReposSearch package. Your point is a good one, utilizing an existing Subversion search package might be a much better way to go, rather than writing the search functionality as the RepoSearchPlugin has done.

Changed 7 years ago by Bangyou Zheng

Attachment: added

comment:3 Changed 7 years ago by Bangyou Zheng

I have wrote a suposeplugin based on RepoSearchPlugin last night. You can find the codes from here.

The idea is to call SupoSE in command line, then get information from SupoSE results, finally generate search results.

This plugin need two parameters in config file:

index = C:\path\to\index\folder
supose = C:\supose\bin\supose.bat

suposeplugin will scan whole repository, and add new parameter into config file when suposeplugin search is firstly run.

indexedrev = 2190

After first scan, suposeplugin will just scan the new submit, and change indexedrev every time.

This plugin is working on my computer (Windows XP, Trac 0.12.2, Python 2.6.6,Subversion 1.6.15)

But the problems is thousands of results will be returned if whole history of repository are searched for huge repository.

The best method would be to add a search box when browser the source codes to just search a folder or a specific file.

I am not a hacker of Trac, even this is my first time to write Python codes.

Do you have any suggestions about these questions?

  • How to add a search repository box on browser page?
  • How to get the path of current page?
  • How to let plugin know when search button is clicked?
  • Anything else?

comment:4 Changed 7 years ago by Bangyou Zheng

Resolution: fixed
Status: newclosed

A new hack TracSuposePlugin is created.

comment:5 Changed 7 years ago by Ryan J Ollos

Thanks for posting this! I'm hoping to find some time to look at it soon, and perhaps it is worth abandoning future efforts on RepoSearchPlugin and focusing effort on TracSuposePlugin.

I've added a link to to the RepoSearchPlugin page that points back to your plugin.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain anybody.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.