Opened 9 years ago
Closed 8 years ago
#12631 closed defect (fixed)
TracSvnPoliciesPlugin and Trac 1.0
Reported by: | Owned by: | Ryan J Ollos | |
---|---|---|---|
Priority: | normal | Component: | TracSvnPoliciesPlugin |
Severity: | critical | Keywords: | |
Cc: | Trac Release: | 1.0 |
Description (last modified by )
This plugin is not compatible with Trac 1.0: it causes an error when submitting its main web-form. After reading the code, I discover that the problem lies in the _get_svn_hook_path function, because the repository_type and repository_dir fields are no longer in the [trac]
section but in the [repositories]
section, moreover with new names since Trac 1.0 allows multiple repositories.
Here is a new definition assuming there is a default SVN repository declared with .alias
in the [repositories]
section:
def _get_svn_hook_path(self): """ This method returns the path on the system where the svn server expects the hook file to be present. The trac configuration file provides the svn repository information. @return: String If a error ocurs in the process of getting the path the method returns None. """ return None try : rep_type = self.config.get('trac', 'repository_type') repository = self.config.get('trac', 'repository_dir') if (rep_type == 'svn') and path.isdir(repository) : return str(repository) + os.path.sep +'hooks' else : proj = self.config.get('repositories', '.alias') rep_type = self.config.get('repositories', proj + '.type') repository = self.config.get('repositories', proj + '.dir') if (rep_type == 'svn') and path.isdir(repository) : return str(repository) + os.path.sep +'hooks' except Exception, e: self.log.error(traceback.format_exc()) self.log.error(e) return None
Does anyone has rights to commit the proposed definition ? However, this plugin should be rewritten more drastically to fully handle multiple projects. Is is still maintained ?
Attachments (0)
Change History (5)
comment:1 Changed 9 years ago by
Owner: | Robert Corsaro deleted |
---|
comment:2 Changed 8 years ago by
Description: | modified (diff) |
---|
comment:3 Changed 8 years ago by
Replying to esj@…:
This plugin is not compatible with Trac 1.0: it causes an error when submitting its main web-form. After reading the code, I discover that the problem lies in the _get_svn_hook_path function, because the repository_type and repository_dir fields are no longer in the
[trac]
section but in the[repositories]
section, moreover with new names since Trac 1.0 allows multiple repositories.
Your patch was applied in r15259. I'll commit some modifications that will support the case of a repository defined in a DbRepositoryProvider
.
I won't address multi-repository support now. If anyone really needs it, please open a new ticket.
comment:4 Changed 8 years ago by
Owner: | set to Ryan J Ollos |
---|---|
Status: | new → accepted |
Replying to esj@…:
The plugin author is no longer involved with Trac development. I've added the needsadoption tag to the project page.