Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 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

Description

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)

suposeplugin.zip (1.9 KB) - added by helend 3 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 3 years ago by helend

Sorry, it's my ticket.

comment:2 Changed 3 years ago by rjollos

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 3 years ago by helend

comment:3 Changed 3 years ago by helend

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:

[supose]
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 3 years ago by helend

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

A new hack TracSuposePlugin is created.

comment:5 Changed 3 years ago by rjollos

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.

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 anybody. 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.