Edgewall Software

Changes between Version 6 and Version 7 of 0.12/TracRepositoryAdmin


Ignore:
Timestamp:
Feb 3, 2010, 12:08:08 AM (14 years ago)
Author:
Remy Blank
Comment:

Added a migration section.

Legend:

Unmodified
Added
Removed
Modified
  • 0.12/TracRepositoryAdmin

    v6 v7  
    77 * Set up a call to `trac-admin $ENV changeset added $REPO $REV` in the post-commit hook of each repository. Additionally, add a call to `trac-admin $ENV changeset modified $REPO $REV` in the post-revprop-change hook of repositories allowing revision property changes.
    88 * Set the `[trac] repository_sync_per_request` option to an empty value to disable per-request syncing.
     9
    910
    1011== Specifying repositories ==
     
    2829
    2930The `name` attribute and one of `alias` or `dir` are mandatory. All others are optional.
     31
     32After adding a repository, the cache for that repository must be re-synchronized once with the `trac-admin $ENV repository resync` command.
     33
     34 `repository resync <repos>`::
     35   Re-synchronize Trac with a repository.
     36
    3037
    3138=== In `trac.ini` ===
     
    7077   Set the attribute `<key>` to `<value>` for the repository `<repos>`.
    7178
    72 Note that the default repository has an empty name, so it will likely need to be quoted when running `trac-admin` from a shell. Alternatively, the name `(default)` can be used instead, for example when running `trac-admin` in interactive mode.
     79Note that the default repository has an empty name, so it will likely need to be quoted when running `trac-admin` from a shell. Alternatively, the name "`(default)`" can be used instead, for example when running `trac-admin` in interactive mode.
     80
    7381
    7482== Repository synchronization
     
    8694The `<repos>` argument can be either a repository name (use "`(default)`" for the default repository) or the path to the repository.
    8795
    88 The following example is a complete post-commit script for Subversion on Unix. It should marked executable and placed in the `hooks` directory of the repository, with the file name `post-commit`.
     96The following examples are complete post-commit and post-revprop-change scripts for Subversion. They should be edited for the specific environment, marked executable (where applicable) and placed in the `hooks` directory of each repository. On Unix (`post-commit`):
    8997{{{
    9098#!sh
     
    98106}}}
    99107
    100 The post-revprop-change hook for Subversion is very similar. On Unix:
     108The post-revprop-change hook for Subversion is very similar. On Unix (`post-revprop-change`):
    101109{{{
    102110#!sh
     
    118126
    119127
     128== Migration from a single-repository setup ==
     129The following procedure illustrates a typical migration from a single-repository setup to multiple repositories.
     130
     131 1. Remove the default repository specification from the `[trac] repository_dir` option.
     132 1. Add the "main" repository as a named repository.
     133 1. Re-synchronize the main repository.
     134 1. Set up post-commit and post-revprop-change hooks on the main repository, and set `[trac] repository_sync_per_request` to an empty value.
     135 1. Add a hidden alias to the main repository as the default repository. This ensures that all links predating the migration still resolve to the main repository.
     136 1. Repeat steps 2, 3 and 4 to add other (named) repositories as needed.
     137
    120138{{{#!div style="background: #eee; padding: 1px 2em"
    121139=== Editing Notes ===