Edgewall Software

Changes between Version 39 and Version 40 of MultipleRepositorySupport


Ignore:
Timestamp:
Jul 8, 2010, 12:13:55 PM (14 years ago)
Author:
vincent@…
Comment:

Updated Mercurial procedure

Legend:

Unmodified
Added
Removed
Modified
  • MultipleRepositorySupport

    v39 v40  
    4949svn co http://svn.edgewall.com/repos/trac/plugins/multirepos/mercurial-plugin
    5050}}}
    51  2. build the mercurial plugin.  From within the checked-out directory, build the egg file (it will end up in the dist subdirectory):
     51 2. Build the mercurial plugin.  From within the checked-out directory, build the egg file (it will end up in the dist subdirectory):
    5252{{{
    5353python setup.py bdist_egg
    5454}}}
    55  3. Check out the multirepos branch:
    56 {{{
    57 svn co http://svn.edgewall.com/repos/trac/sandbox/multirepos
    58 }}}
    59  4. Install the multirepos version of trac (from within the multirepos directory, as root):
    60 {{{
    61 python setup.py install
    62 }}}
    63  5. Create your trac environment directory
     55 3. Get Trac 0.12 or later. ~~Check out the multirepos branch: {{{svn co http://svn.edgewall.com/repos/trac/sandbox/multirepos}}}~~
     56 4. Install Trac; see TracInstall. ~~Install the multirepos version of trac (from within the multirepos directory, as root): {{{python setup.py install}}}~~
     57 5. Create your trac environment directory.
    6458
    65  6. Copy the mercurial plugin egg file to the <trac-env>/plugins directory
     59 6. Copy the mercurial plugin egg file to the <trac-env>/plugins directory, or use {{{easy_install <plugin.egg>}}} for global installation.
    6660
    67  7. make sure the following is somewhere in <trac-env>/conf/trac.ini:
     61 7. Make sure the following is somewhere in <trac-env>/conf/trac.ini:
    6862{{{
    6963[components]
    7064tracext.hg.* = enabled
    7165}}}
     66 or use the 'Admin' panel  in the browser to enable the plugin.
    7267 8. Add all your repositories in the ''Repositories'' admin panel. Alternatively, you can add the repositories to the `[repositories]` section of `trac.ini`, but note that this has some restrictions on the repository names (i.e. lowercase, no '.'):
    7368{{{
     
    8479   Note that when the repository `.type` is not specified, the value of `[trac] repository_type` is used. [[br]]
    8580   In the above example, this means that `my_repo_a` and `my_repo_b` are Mercurial (hg) repositories. [[br]]
    86  9. Synchronize all your repositories:
     81 9. Synchronize all your repositories, either with a wildcard:
     82{{{
     83trac-admin <trac-env> repository resync '*'
     84}}}
     85 or, if you want, explicitly:
    8786{{{
    8887trac-admin <trac-env> repository resync "(default)"
     
    9190trac-admin <trac-env> repository resync my_repo_c
    9291}}}
    93  10. Install post-commit hooks for all your repositories, and have them call `trac-admin <trac-env> changeset added` for every new changeset:
    94 {{{
    95 trac-admin <trac-env> changeset added my_repo_c $REV
    96 }}}
     92 10. Please note that at the time of writing, no initial resynchronization or any hooks are necessary for Mercurial repositories - see #9485 for more information. However, if you wish, you can install post-commit hooks for all your repositories, and have them call `trac-admin <trac-env> changeset added` for every new changeset: {{{trac-admin <trac-env> changeset added my_repo_c $REV}}}
     93 However, why you would want to do this in a normal 0.12 installation is beyond me.
    9794 11. Cross your fingers, and hope it works :)
    9895   [[br]] ''It really should or it's a bug ;-)''
     96   [[br]] Mercurial works fine without hooks and resynchronization.
    9997
    10098To make links to the non-default repository, just add a slash and the alias name after the revision identifier, for example: "![changeset:cffd9e480266/my_repos_b a changeset]".
     
    126124   }}}
    127125   This should be documented in TracMercurial, though. OTOH, for Windows we will need a Python hook anyway, so we could as well create a generic one.
     126   - Mercurial Repositories
     127Please note that at the time of writing, no initial resynchronization or any hooks are necessary for Mercurial repositories - see #9485 for more information.
    128128
    129129=== Major ===