Version 19 (modified by 16 years ago) (diff) | ,
---|
Git Plugin for Trac
Description
This is yet another plugin for Trac 0.10/0.11 which enables GIT to be used instead of Subversion for the trac:VersioningSystemBackend
Features
- Browsing source code in a Git repository via the TracBrowser
- Viewing the change history of a file or directory using TracRevisionLog
- Performing [TracDiff diffs] between any two files or two directories
- Displaying submitted changes in the TracTimeline (0.11)
- (Optionally) caching TracChangeset information in Trac's database (0.11)
- Caching Git commit relation graph in memory (0.11)
- Using the TracSearch page to search change descriptions (0.11)
- Interpretation of 40-character wide hex-strings as sha1 commit checksums
- ...
Example(s)
See nanosleep.org's GitPlugin branch
Bugs/Feature Requests
As this is for now just a proof of concept implementation, it has quite some deficiencies, some of which exist as tickets already:
No results
...and other potential issues which aren't ticket-tracked yet:
does not highlight sha1sums automatically- will only work with filenames not containing newlines
- ...
Existing bugs and feature requests for GitPlugin are here.
If you have any issues, create a new ticket.
Download
Download the zipped source from [download:gitplugin here].
Source
You can check out GitPlugin from here using Subversion, or browse the source with Trac.
(An experimental branch of this plugin with a hacky caching feature and some bug fixes is available from here.)
Configuration
Simply point your Trac instance to a local git repository:
[trac] repository_dir = /var/git/Test.git repository_type = git ## the following is only for the 0.11 branch [git] ## let Trac cache meta-data via CachedRepository wrapper cached_repository = true ## disable automatic garbage collection for in-memory commit-tree cache persistent_cache = true
/!\ NOTE: "Test.git" needs to be the .git
repository directory (i.e. the one containing the file HEAD
and config
), not the working tree directory that holds the .git/
folder.
If installed globally, don't forget to enable the plugin:
[components] gitplugin.* = enabled
Recent Changes
Author/Contributors
Author: Herbert Valerio Riedel
Contributors: Hans Petter Jansson
Attachments (7)
-
trac-post-receive-hook.py (7.2 KB) - added by 15 years ago.
post-receive hook for closing and referencing tickets
-
trac-post-receive-hook.2.py (7.3 KB) - added by 15 years ago.
post-receive hook for closing and referencing tickets
-
trac-post-receive-hook.3.py (7.5 KB) - added by 15 years ago.
post-receive hook for closing and referencing tickets - now auto-creating git_seen table
-
trac-post-receive-hook-0.12-only-master.py (895 bytes) - added by 13 years ago.
Old example from main site
-
trac-post-receive-hook-0.12-new-commits-from-all-branches.py (2.2 KB) - added by 13 years ago.
Add commits from all branches, but only those that are new to the repository. Properly handles many branches in one push. Added version number.
-
trac-post-receive-hook-0.12-new-commits-from-all-branches-with-logfile.py (2.5 KB) - added by 12 years ago.
Correction of the previous version, and add log file to detect errors.
-
trac-post-receive-hook.4.py (7.5 KB) - added by 11 years ago.
post-receive hook for closing and referencing tickets - updated to trac 1.0; fixed syntax; removed unused imports
Download all attachments as: .zip