|Version 26 (modified by gibbs, 6 years ago) (diff)|
Perforce Plugin for Trac
Table of Contents
(See Trac ticket [trac-ticket:257 #257] for more information)
The plugin now supports most of the features that the Subversion backend supports and should be able to handle reasonably large Perforce repositories.
In particular the plugin so far supports:
- Browsing source code in a Perforce repository via the TracBrowser
- Specifying revisions using change number, file revision, date or label
- Viewing the change history of a file or directory using TracRevisionLog
- Performing diffs between any two files or two directories
- Displaying submitted changes in the TracTimeline
- Caching TracChangeset information in Trac's database
- Using the TracSearch page to search change descriptions
- Unicode enabled Perforce servers
- Displaying Perforce file attributes (an undocumented Perforce feature similar to Subversion properties)
- Efficient handling of large repository files.
- Multi-threaded web servers (eg Apache with mod_python on Windows)
For a list of features that still need to be implemented see this list.
The plugin has recently undergone a major reworking by Lewis Baker to try to improve handling of large repositories and large files. The plugin was also ported to use PyPerforce to take advantage of its support for Python's unicode strings, multi-threading and streaming of results.
The latest version (0.4.3) can be found here (for Trac 0.11 only).
- Python 2.4 or later
- PyPerforce 0.3a1 or later
- PyProtocols 0.9.3 or later
- setuptools 0.6c1 or later
- Recent version of Trac 0.10dev trunk
- A working Trac installation (see TracInstall for general information)
- A Perforce server
The PerforcePlugin has been tested against Perforce 2002.2, 2005.1 and 2005.2 servers.
- Download and install the requirements (see above).
- Build the .egg file (if building from source)
$ python setup.py bdist_egg
- Install the .egg file
- For per-project installation copy the .egg file to the <TRAC_ENV>/plugins directory.
- For a global installation
$ easy_install path/to/TracPerforce-0.4.3-py2.4.eggOr:
$ python setup.py install
You need to edit your <TRAC_ENV>/conf/trac.ini file.
In the [trac] section you need to add:
[trac] repository_type = perforce repository_dir = p4://user:password@perforce:1666/path_of_depot?unicode=0 or 1
One recommended Perforce configuration is to add a user with read access and a login with no expiry, then setup your Trac configuration with this user and use the Perforce ticket as the password.
If you installed trac globally you also need to enable the PerforcePlugin in the [components] section:
[components] p4trac.* = enabled
Finally, restart your Trac web server.
Loading a page that uses the plugin for the first time can take
a long time while the plugin populates the initial changeset cache,
depending on the size of the Perforce repository.
See #630 for more info.
If you have an issues, create a new ticket.
This is a brief list of some of the future work that needs to be done.
- Replication of Trac tickets to Perforce jobs (ala P4DTI) (#625)
- Add support for Trac 0.11 (#2338)
- Add a 'fixes' property to changesets that lists tickets/jobs fixed by that change. (#628)
- Detect 'move' file actions (ie 'copy' and 'delete' of same file) (#626)
- Detect 'move' and 'copy' of entire directories (#627)
- Add an 'integrations' property to changesets/files that lists integrated revisions merged in that revision (#629)
- Fix 'created_rev' to report the revision of last 'edit', skipping 'copy' or 'move' revisions (#633)
- Better support for detecting modified change descriptions and updating changeset cache (use "p4 logger"?).
- Per-user authentication and authorisation (#635)
- Auto-detection of Unicode Perforce servers (#634)
-  by ttressieres on 2010-04-16 16:55:36
to delete directory trac-0.11 (must be in sub-directory branches)
-  by ttressieres on 2010-04-16 16:51:49
misplaced trac-0.11 branch
-  by ttressieres on 2010-04-16 16:48:03
Branch PerforcePlugin trunk to branches/trac-0.11 for 0.11 maintenance.
Trunk is being updated for 0.12.
(24.3 KB) -
added by ttressieres 9 years ago.
first version of plugin
- pyprotocols-0.9.3-py2.7-win32.egg (82.1 KB) - added by anonymous 21 months ago.
- PyPerforce-0.4-py2.7-win32.egg (400.8 KB) - added by anonymous 21 months ago.
- TracPerforce-0.5dev-py2.7.egg (51.1 KB) - added by anonymous 21 months ago.
Download all attachments as: .zip