Changes between Version 12 and Version 13 of TracGit
- Timestamp:
- Aug 22, 2014, 5:24:38 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracGit
v12 v13 1 1 [[PageOutline(2-3)]] 2 = Git support in Trac (#10594) =2 = Git support in Trac (#10594) 3 3 4 4 Starting with version [milestone:1.0], Trac features built-in support … … 10 10 repositories should be handled reasonably well, however. 11 11 12 == Features ==12 == Features 13 13 14 14 * Browsing source code in a Git repository via the TracBrowser … … 22 22 * Interpretation of 40-character wide hex-strings as sha1 commit checksums 23 23 24 == Git ==25 === Download and Installation ===24 == Git 25 === Download and Installation 26 26 27 27 You need to have the `git` command line tools installed. You can download Git itself from … … 31 31 up to the latest. Better use a recent version however. 32 32 33 === Configuration ===33 === Configuration 34 34 35 35 The configuration has to be done mainly on the Trac side, … … 42 42 repository is not already local, simply `git clone` it). 43 43 44 == Trac ==44 == Trac 45 45 46 46 The Trac Git support is included with Trac since 1.0 as an optional component: `tracopt.versioncontrol.git`. 47 47 48 48 You simply have to explicitly ''enable'' the plugin in TracIni: 49 {{{ 49 {{{#!ini 50 50 [components] 51 51 tracopt.versioncontrol.git.* = enabled … … 55 55 using the //General / Plugins// panel. 56 56 57 === Setting up a Trac environment ===57 === Setting up a Trac environment 58 58 59 59 You can either reuse an existing Trac environment, … … 70 70 Your [wiki:TracIni <trac_environment>/conf/trac.ini] configuration file 71 71 should have a `[trac]` section similar to the following: 72 {{{ 72 {{{#!ini 73 73 [trac] 74 74 repository_type = git … … 76 76 }}} 77 77 Also in there, make sure you specify the location of the `git` executable, in case it's not the default `/usr/bin/git`. As an example, for Windows: 78 {{{ 78 {{{#!ini 79 79 [git] 80 80 git_bin = C:/Dev/msysgit/bin/git.exe … … 105 105 106 106 107 === Setting up post-receive hooks ===#hooks107 === Setting up post-receive hooks #hooks 108 108 109 109 If you want to benefit from some advanced features for your repository, … … 119 119 You can then enable the CommitTicketUpdater functionality in your `trac.ini` by adding: 120 120 121 {{{ 121 {{{#!ini 122 122 tracopt.ticket.commit_updater.* = enabled 123 123 }}} … … 127 127 == Troubleshooting 128 128 129 * `repository_dir` in the configuration section 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 (#11297).130 * Wrong permissions may also be the cause of the error `GitError: GIT control files not found, maybe wrong directory?`. Make sure the `repository_dir` argumentis accessible via git by the `tracd` process.129 * For Trac < 1.0.2, the `repository_dir` in the configuration section 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 (#11297). However, a `bare` repository will have these control files in the top-level directory and will not contain a `.git` directory. 130 * Wrong permissions may also be the cause of the error `GitError: GIT control files not found, maybe wrong directory?`. Make sure the repository path is accessible via git by the `tracd` process. 131 131 * If you are noticing a slow down in trac with a repository above 500 commits, try disabling the caching. It seems to bog things down as a repo grows(!) 132 132 * Don't forget to enable the plugin: 133 {{{ 133 {{{#!ini 134 134 [components] 135 135 tracopt.versioncontrol.git.* = enabled 136 136 }}} 137 * If you don't see the `shortrev` and `commit` branch, you probably have caching enabled (`cached_repository = true ,persistent_cache = true`). Set those to false.138 * The source browser can throw an error when trying to kill a git log process; it's not clear why it should be an error for the process to have completed. This problem manifests as a stack trace with terminate_nix at the end (#10958).137 * If you don't see the `shortrev` and `commit` branch, you probably have caching enabled (`cached_repository = true`, `persistent_cache = true`). Set those to false. 138 * For Trac < 1.0.2, the source browser can throw an error when trying to kill a git log process; it's not clear why it should be an error for the process to have completed. This problem manifests as a stack trace with terminate_nix at the end (#10958). 139 139 140 140 == Known Issues