Edgewall Software

Changes between Version 103 and Version 104 of TracMercurial


Ignore:
Timestamp:
Dec 8, 2015, 12:03:13 PM (8 years ago)
Author:
figaro
Comment:

Cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • TracMercurial

    v103 v104  
    11[[PageOutline(2-3)]]
    22
    3 = Mercurial Plugin for Trac (#1847)
    4 
    5 This a plugin for Trac which enables [http://www.selenic.com/mercurial Mercurial] to be used as the VersionControlSystem for Trac.
     3= Mercurial Plugin for Trac
     4
     5This a plugin for Trac which enables [http://www.selenic.com/mercurial Mercurial] to be used as the VersionControlSystem for Trac. It was originally developed under #1847.
    66
    77Please use a recent version of the plugin before reporting issues.
     
    8383   python setup.py bdist_egg
    8484   }}}
    85  - Install it in the current Python (or [http://pypi.python.org/pypi/virtualenv virtualenv]) installation:
     85 - Install it in the current Python (or [pypi:virtualenv virtualenv]) installation:
    8686   {{{#!sh
    8787   python setup.py install
     
    100100==== Windows
    101101
    102 On Windows, it looks like it's possible to re-use the Mercurial library coming from the [Mercurial:BinaryPackages installer],
    103 see [http://selenic.com/pipermail/mercurial/2007-July/013827.html this mail].
     102On Windows, it looks like it is possible to re-use the Mercurial library coming from the [Mercurial:BinaryPackages installer], see [http://selenic.com/pipermail/mercurial/2007-July/013827.html this mail].
    104103However, it is not possible to achieve this using PYTHONPATH and PATH: it fails with `ImportError: No module named handlers` due to library.zip coming in the sys.path before the standard library.
    105104
     
    117116=== Setting up the Mercurial plugin
    118117
    119 The TracMercurial plugin egg should be added to the `plugins` folder of the environment, or it can be globally installed:  `python setup.py install` or a `python setup.py develop`. For general instructions about plugins, see also TracPlugins.
    120 
    121 If you installed the egg globally and you're modifying an existing Trac environment to use the Mercurial backend, then you have to explicitly ''enable'' the plugin in TracIni.
     118The TracMercurial plugin egg should be added to the `plugins` folder of the environment, or it can be globally installed: `python setup.py install` or a `python setup.py develop`. For general instructions about plugins, see also TracPlugins.
     119
     120If you installed the egg globally and you're modifying an existing Trac environment to use the Mercurial backend, then you have to explicitly '''enable''' the plugin in TracIni.
    122121
    123122Since the version 0.11 of the plugin, the package has been renamed to `tracext`:
     
    161160{{{#!ini
    162161[hooks]
    163 ; If mercurial-plugin is installed globally
     162# If mercurial-plugin is installed globally
    164163commit = python:tracext.hg.hooks.add_changesets
    165164changegroup = python:tracext.hg.hooks.add_changesets
    166165
    167 ; If mercurial-plugin is installed in a Trac plugins directory
     166# If mercurial-plugin is installed in a Trac plugins directory
    168167commit = python:/path/to/hooks.py:add_changesets
    169168changegroup = python:/path/to/hooks.py:add_changesets
     
    185184== Features
    186185
    187 Mercurial support is basic, but works well. I've tested that on the Mercurial repository itself and the performance is acceptable, even if there's currently ''no'' caching in the database, see #8417.
     186Mercurial support is basic, but works well and has been tested on the Mercurial repository itself. The performance is acceptable, even if there is currently no caching in the database, see #8417.
    188187
    189188For those used to Subversion in general and Subversion repository browsing in Trac in particular, there are a few differences worth noting.
     
    214213=== TracBrowser changes in [milestone:0.11]
    215214
    216 The TracBrowser ''View revision'' form has been extended with pulldown menus for jumping to a given tag or branch. In Mercurial, a branch within a repository corresponds to a head, i.e. a changeset without children:
     215The TracBrowser ''View revision'' form has been extended with pulldown menus for jumping to a given tag or branch. In Mercurial, a branch within a repository corresponds to a head, ie a changeset without children:
    217216
    218217[[Image(hg-plugin-browser.png,width=666px,align=center)]]
     
    224223=== Mercurial Queue
    225224
    226 Since r6443, the MQ extension is supported. If you happen to have applied mq patches in your repository, Trac will show the corresponding patch names as '''Tags:''' in the changeset view.
    227 
    228 Also, with the 0.12 branch of the plugin (and the MultipleRepositorySupport branch of Trac), you can browse jointly the main repository and the repository for the associated Mercurial queue, if any (i.e. if you versioned your patch queue using `hg qinit -c` and `hg qcommit`). Furthermore, if you declare such a mercurial repository to be a MQ repository, then all the patches will be correctly rendered as patches, regardless of the patch name (see r6462 for details).
     225Since r6443, the MQ extension is supported. If you have applied mq patches in your repository, Trac will show the corresponding patch names as '''Tags:''' in the changeset view.
     226
     227Also, with the 0.12 branch of the plugin (and the MultipleRepositorySupport branch of Trac), you can browse jointly the main repository and the repository for the associated Mercurial queue, if any, ie if you versioned your patch queue using `hg qinit -c` and `hg qcommit`. Furthermore, if you declare such a Mercurial repository to be a MQ repository, then all the patches will be correctly rendered as patches, regardless of the patch name (see r6462 for details).
    229228
    230229==== Visualize branches and merges
     
    232231There should be a way to show graphically the branch and merge points within the revision log view. Not something as fancy as `hgk`, but nonetheless something that will make the changeset relationships immediately obvious.
    233232
    234 ''Starting with Trac [milestone:0.13], we show a graphical overview of the branch graph when viewing the log of the repository root (#1492)''
    235 
    236 Also, there is [http://trac-hacks.org/wiki/RevtreePlugin RevtreePlugin].
     233Starting with Trac [milestone:0.13], we show a graphical overview of the branch graph when viewing the log of the repository root (#1492).
     234
     235Also, there is the [th:RevtreePlugin].
    237236
    238237==== Search over the source
     
    257256Since it needs a bit more flexibile templating (in regards with the lookup/url's) this is hacked around node.path at the moment. Some (small/large?) issues remain but most of it is working.
    258257
    259  ''Note that with the MultipleRepositorySupport branch of Trac, it should be possible to implement an IRepositoryProvider component knowing about the `forest` extension and adding besides the repository for the forest itself, the managed repositories as well.''
     258Note that with the MultipleRepositorySupport branch of Trac, it should be possible to implement an IRepositoryProvider component knowing about the `forest` extension and adding besides the repository for the forest itself, the managed repositories as well.
    260259
    261260==== Add your requested feature here
     
    279278=== Troubleshooting
    280279
    281 ==== "unsupported version control system hg"
     280==== "Unsupported version control system hg"
    282281
    283282If you get this message try the following two basic checks first:
     
    286285  {{{#!pycon
    287286>>> from mercurial import ui, hg
    288 >>> repo = hg.repository(ui.ui(), '/path/to/a/mercurial/repo')
     287>>> repo = hg.repository(ui.ui(), '/path/to/mercurial/repo')
    289288>>> len(repo)
    290289234
    291290  }}}
    292   You can also look at the `hg.__file__` attribute to verify you're loading the expected Mercurial library.
     291  You can also look at the `hg.__file__` attribute to verify you are loading the expected Mercurial library.
    293292
    294293 * Log in as an user with `TRAC_ADMIN` permission, and look in the `Admin` pages, `General / Plugins`. Do you see the entry for the !TracMercurial plugin there? If yes, is the !MercurialConnector component enabled?
     
    307306I'm interested in feedback concerning the code, in particular concerning Mercurial. I'm pretty sure I did things in a sub-optimal way, as I was discovering the guts of hg while writing the plugin.  Therefore, I'll be pleased to get tips for improvements.
    308307
    309 '' -- ChristianBoos ''
     308 -- ChristianBoos