Edgewall Software

Changes between Version 12 and Version 13 of TracGit


Ignore:
Timestamp:
Aug 22, 2014, 5:24:38 AM (10 years ago)
Author:
Ryan J Ollos
Comment:

Mention versions in which two issues have been fixed. Use repository path rather than repository_dir, because the option is deprecated and will be removed soon.

Legend:

Unmodified
Added
Removed
Modified
  • TracGit

    v12 v13  
    11[[PageOutline(2-3)]]
    2 = Git support in Trac (#10594) =
     2= Git support in Trac (#10594)
    33
    44Starting with version [milestone:1.0], Trac features built-in support
     
    1010repositories should be handled reasonably well, however.
    1111
    12 == Features ==
     12== Features
    1313
    1414* Browsing source code in a Git repository via the TracBrowser
     
    2222* Interpretation of 40-character wide hex-strings as sha1 commit checksums
    2323
    24 == Git ==
    25 === Download and Installation ===
     24== Git
     25=== Download and Installation
    2626
    2727You need to have the `git` command line tools installed. You can download Git itself from
     
    3131up to the latest. Better use a recent version however.
    3232
    33 === Configuration ===
     33=== Configuration
    3434
    3535The configuration has to be done mainly on the Trac side,
     
    4242repository is not already local, simply `git clone` it).
    4343
    44 == Trac ==
     44== Trac
    4545
    4646The Trac Git support is included with Trac since 1.0 as an optional component: `tracopt.versioncontrol.git`.
    4747
    4848You simply have to explicitly ''enable'' the plugin in TracIni:
    49 {{{
     49{{{#!ini
    5050[components]
    5151tracopt.versioncontrol.git.* = enabled
     
    5555using the //General / Plugins// panel.
    5656
    57 === Setting up a Trac environment ===
     57=== Setting up a Trac environment
    5858
    5959You can either reuse an existing Trac environment,
     
    7070Your [wiki:TracIni <trac_environment>/conf/trac.ini] configuration file
    7171should have a `[trac]` section similar to the following:
    72 {{{
     72{{{#!ini
    7373[trac]
    7474repository_type = git
     
    7676}}}
    7777Also 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
    7979[git]
    8080git_bin = C:/Dev/msysgit/bin/git.exe
     
    105105
    106106
    107 === Setting up post-receive hooks === #hooks
     107=== Setting up post-receive hooks #hooks
    108108
    109109If you want to benefit from some advanced features for your repository,
     
    119119You can then enable the CommitTicketUpdater functionality in your `trac.ini` by adding:
    120120
    121 {{{
     121{{{#!ini
    122122tracopt.ticket.commit_updater.* = enabled
    123123}}}
     
    127127== Troubleshooting
    128128
    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` argument is 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.
    131131* 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(!)
    132132* Don't forget to enable the plugin:
    133   {{{
     133  {{{#!ini
    134134  [components]
    135135  tracopt.versioncontrol.git.* = enabled
    136136  }}}
    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).
    139139
    140140== Known Issues