|Version 3 (modified by athomas, 8 years ago) (diff)|
Perforce Plugin for Trac
(See Trac ticket [trac-ticket:257 #257] for more information)
The plugin being experimental, expect some rough edges and a somewhat instable set of features/documentation...
Download and Installation
The plugin needs a slightly modified version of Trac 0.9, which offers support for pluggable SCM backends. This version can be found in vc-refactoring.
The plugin itself will be available soon...
The plugin has been tested with Perforce 2005.1 from http://www.perforce.com).
You can try Perforce from Perforce::Download.
The configuration has to be done on the Trac side, there's nothing to do on the Perforce repository side, except that it should be made available locally.
Setting up a Trac environment
You can either reuse an existing Trac environment, or create a brand new one.
For general instructions, see TracInstall.
The TracAdmin initenv command has been slightly modified in the vc-refactoring code base: in addition to the repository directory, it's also needed to specify the repository type.
For the repository type, specify p4 instead of the default svn. For the repository directory, the plugin doesn't use this entry.
In all case, you <trac_environment>/conf/trac.ini configuration file should have a [trac] section similar to the following:
[trac] repository_type = p4 repository_dir = <anything>
Also, currently you still need to explicitely disable the SVN components and enable p4trac
[components] trac.versioncontrol.svn_fs.* = disabled p4trac.* = enabled
Note: that constraint will most certainly be lifted in the future
to specify Perforce user and password you must add a [p4] section in trac.ini
[p4] port = server:1666 user = ttressieres client = my_workspace passwd = 200DA71E463444DA246E94F69633C9DE max_changes = 1000
Setting up the perforce plugin
The TracPerforce-0.1 plugin egg should be added to the plugins folder of the environment.
For general instructions about plugins, see also TracPlugins.
The Perforce support is pretty basic, but works well. I've tested that on the Perforce repository itself and the performance is quite good, even if there's currently no caching in the database (I'm still not decided if that's a feature or a bug).
For those used to Subversion in general and Subversion repository browsing in Trac in particular, there are very minor differences.
Bugs and Limitations
There are still a lot of things that can be improved.
Features that Trac+svn has but not currently implemented for Trac+p4
to be written
Add your cool feature here...
I'm interested in feedback concerning the code, in particular:
- concerning Perforce, I'm pretty sure I did things in a sub-optimal way, as I was discovering the guts of p4 and Python while writing the plugin. Therefore, I'll be pleased to get tips for improvements.
-- ThomasTressieres ttressieres
(24.3 KB) -
added by ttressieres 8 years ago.
first version of plugin
- pyprotocols-0.9.3-py2.7-win32.egg (82.1 KB) - added by anonymous 14 months ago.
- PyPerforce-0.4-py2.7-win32.egg (400.8 KB) - added by anonymous 14 months ago.
- TracPerforce-0.5dev-py2.7.egg (51.1 KB) - added by anonymous 14 months ago.
Download all attachments as: .zip