Mercurial > hg > trac > jungle > src > mercurial-plugin
annotate README @ 32:96c854b89f5c 1.0 tip
1.0.0.3dev: Add implementation for `get_path_history`, which will be an abstract method of the `Repository` base class in a future release of Trac.
author | rjollos <ryan.j.ollos@gmail.com> |
---|---|
date | Sat, 31 May 2014 09:37:41 -0700 |
parents | 28d2535d682f |
children |
rev | line source |
---|---|
0
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
1 = Mercurial Plugin for Trac (#1847) = |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
2 |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
3 Please see the online Wiki page for this extension: |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
4 |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
5 http://trac.edgewall.org/wiki/TracMercurial |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
6 |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
7 == Minimal Installation Instructions == |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
8 |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
9 === Trac === |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
10 |
9
28d2535d682f
New version 1.0.0.1 (1.0 == base Trac version needed, .0 == default branch for the plugin, .1 == incremental version for the plugin)
cboos
parents:
1
diff
changeset
|
11 This plugin works with Trac 1.0.x. |
28d2535d682f
New version 1.0.0.1 (1.0 == base Trac version needed, .0 == default branch for the plugin, .1 == incremental version for the plugin)
cboos
parents:
1
diff
changeset
|
12 |
28d2535d682f
New version 1.0.0.1 (1.0 == base Trac version needed, .0 == default branch for the plugin, .1 == incremental version for the plugin)
cboos
parents:
1
diff
changeset
|
13 You can also use the trunk version (1.1.x): |
0
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
14 {{{ |
1
b30690538379
initialize branch:0.13 from svn
Christian Boos <christian.boos@free.fr>
parents:
0
diff
changeset
|
15 svn co http://svn.edgewall.org/repos/trac/trunk |
0
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
16 }}} |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
17 |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
18 and install from there: |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
19 {{{ |
1
b30690538379
initialize branch:0.13 from svn
Christian Boos <christian.boos@free.fr>
parents:
0
diff
changeset
|
20 $ cd trunk |
0
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
21 $ python setup.py egg_info |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
22 $ python setup.py install |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
23 }}} |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
24 |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
25 === TracMercurial === |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
26 |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
27 Go into the working copy root (i.e. the folder containing this README file), |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
28 then: |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
29 - either do `python setup.py bdist_egg`, which creates |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
30 an .egg file in the `dist` subfolder. Copy that .egg file in the |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
31 `plugins` subfolder of your Trac environment |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
32 - or do `python setup.py install`, which creates the .egg and install it |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
33 below the site-packages folder of your Python installation. |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
34 You'll then need to enable the plugin in the `[components]` section of |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
35 your trac.ini file, see below. |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
36 |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
37 |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
38 == Configuration == |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
39 |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
40 The configuration has to be done on the Trac side, |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
41 there's nothing to do on the Mercurial repository side, |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
42 except for the fact that the repository should be made |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
43 accessible as a local repository. |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
44 Thanks to the distributed nature of Mercurial, that's |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
45 always possible (if the repository is not already local, |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
46 simply `hg clone` it). |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
47 |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
48 |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
49 === Setting up the mercurial plugin === |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
50 |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
51 For general instructions about plugins, see also TracPlugins. |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
52 |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
53 If you installed the egg globally and you're modifying an |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
54 existing Trac environment to use the Mercurial backend, |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
55 then you have to explicitely ''enable'' the plugin in TracIni: |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
56 {{{ |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
57 [components] |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
58 tracext.hg.* = enabled |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
59 }}} |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
60 |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
61 |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
62 === Setting up a Trac environment === |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
63 |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
64 It is now recommended to use the new set of trac-admin commands |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
65 `repository ...` to create, delete and rename references to repositories |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
66 (note that Trac will never do anything to the actual Mercurial repositories |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
67 beyond accessing them for read operations). |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
68 |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
69 The old default settings for defining the default repository are still |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
70 supported but deprecated (use an empty repository name or create an empty |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
71 alias, see `trac-admin help repository alias`). |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
72 |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
73 (Old-style) the trac.ini file contains `[trac]` section similar to the |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
74 following: |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
75 {{{ |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
76 [trac] |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
77 repository_type = hg |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
78 repository_dir = /path/to/my/hg/repository |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
79 }}} |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
80 |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
81 There's also a few Mercurial specific settings in TracIni: |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
82 {{{ |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
83 [hg] |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
84 # -- Show revision number in addition to the changeset hash |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
85 show_rev = yes |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
86 |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
87 # -- Changeset hash format |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
88 node_format = short |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
89 # hex: Show the full SHA1 hash |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
90 # short: Show a shortened hash for the changesets |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
91 }}} |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
92 |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
93 |
a97b17f1bac7
TracMercurial: started new Mercurial repository
Christian Boos <christian.boos@free.fr>
parents:
diff
changeset
|
94 '' -- ChristianBoos '' |