Changes between Version 103 and Version 104 of TracMercurial
- Timestamp:
- Dec 8, 2015, 12:03:13 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracMercurial
v103 v104 1 1 [[PageOutline(2-3)]] 2 2 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 5 This 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. 6 6 7 7 Please use a recent version of the plugin before reporting issues. … … 83 83 python setup.py bdist_egg 84 84 }}} 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: 86 86 {{{#!sh 87 87 python setup.py install … … 100 100 ==== Windows 101 101 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]. 102 On 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]. 104 103 However, 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. 105 104 … … 117 116 === Setting up the Mercurial plugin 118 117 119 The TracMercurial plugin egg should be added to the `plugins` folder of the environment, or it can be globally installed: 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.118 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. 119 120 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. 122 121 123 122 Since the version 0.11 of the plugin, the package has been renamed to `tracext`: … … 161 160 {{{#!ini 162 161 [hooks] 163 ;If mercurial-plugin is installed globally162 # If mercurial-plugin is installed globally 164 163 commit = python:tracext.hg.hooks.add_changesets 165 164 changegroup = python:tracext.hg.hooks.add_changesets 166 165 167 ;If mercurial-plugin is installed in a Trac plugins directory166 # If mercurial-plugin is installed in a Trac plugins directory 168 167 commit = python:/path/to/hooks.py:add_changesets 169 168 changegroup = python:/path/to/hooks.py:add_changesets … … 185 184 == Features 186 185 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.186 Mercurial 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. 188 187 189 188 For those used to Subversion in general and Subversion repository browsing in Trac in particular, there are a few differences worth noting. … … 214 213 === TracBrowser changes in [milestone:0.11] 215 214 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:215 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, ie a changeset without children: 217 216 218 217 [[Image(hg-plugin-browser.png,width=666px,align=center)]] … … 224 223 === Mercurial Queue 225 224 226 Since r6443, the MQ extension is supported. If you ha ppen 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).225 Since 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 227 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, 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). 229 228 230 229 ==== Visualize branches and merges … … 232 231 There 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. 233 232 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/RevtreePluginRevtreePlugin].233 Starting with Trac [milestone:0.13], we show a graphical overview of the branch graph when viewing the log of the repository root (#1492). 234 235 Also, there is the [th:RevtreePlugin]. 237 236 238 237 ==== Search over the source … … 257 256 Since 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. 258 257 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.'' 258 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. 260 259 261 260 ==== Add your requested feature here … … 279 278 === Troubleshooting 280 279 281 ==== " unsupported version control system hg"280 ==== "Unsupported version control system hg" 282 281 283 282 If you get this message try the following two basic checks first: … … 286 285 {{{#!pycon 287 286 >>> 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') 289 288 >>> len(repo) 290 289 234 291 290 }}} 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. 293 292 294 293 * 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? … … 307 306 I'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. 308 307 309 '' -- ChristianBoos '' 308 -- ChristianBoos