source: tracdarcs/README.rst @ 190

Revision 190, 3.6 KB checked in by lele@…, 3 years ago (diff)

Split out the internals note from the README.rst, now used as the long_description of the package

RevLine 
[143]1========================
2 Darcs backend for Trac
3========================
[1]4
[143]5This package implements a darcs backend for Trac supporting the new
[188]6`multirepository feature`__, that has been merged in the current
7`Trac 0.12`__.
[143]8
9__ http://trac.edgewall.org/wiki/MultipleRepositorySupport
10__ http://trac.edgewall.org/milestone/0.12
11
[188]12It used to work on 0.11, and even with 0.10, at least up to version
130.8 of the backend... No time to even try, so no guarantee, sorry!
[1]14
[93]15To use the module you can either install it or make an egg and copy
16it in the right place.
[1]17
[93]18Installation
[143]19============
[1]20
[93]21You can install the module the usual way::
[1]22
[93]23  $ python setup.py install [--prefix /usr/local]
[1]24
[93]25Otherwise you can make an egg::
26
27  $ python setup.py bdist_egg
28
29and either install it globally with::
30
31  $ easy_install dist/TracDarcs-someversion.egg
32
33or manually copy the egg from the "dist" subdir into the environment's
34"plugins" subdirectory
35
36In general, follow the directions in TracPlugins.
[129]37
[188]38Specific configuration options
39------------------------------
40
41Some feature can be altered by using the following trac+darcs specific
42options in the ``[darcs]`` section of the configuration:
43
44command : string
45  This is the effective `darcs` executable that will be used. By
46  default its ``darcs``, but you could set it to
47  ``/usr/local/bin/darcs`` to use a newer version...
48
49dont_escape_8bit : boolean
50  False by default, maps to the `darcs` ``$DARCS_DONT_ESCAPE_8BIT``
51  behaviour.
52
53possible_encodings : string
54  By default 'utf-8,iso8859-1', its a comma-separated-value list of
55  possible string encodings to try one after the other, should a
56  decode error occur while parsing darcs changesets.
57
58max_concurrent_darcses : integer
59  By default 0 to mean no limits, otherwise it is the maximum number
60  of concurrent running darcs processes at the same time.
61
62eager_annotations : boolean
63  False by default, when true the content and the annotation cache of
64  each modified file get computed immediately after a changeset gets
65  added. This will move the heavy computation at pull time, rather
66  than at first visit time. Of course, it will also enlarge the
67  trac database...
68
69Using a postcommit hook
70-----------------------
71
[189]72The `recommended way`__ to trigger the sync between the repository and
73the Trac instance is by using a darcs `post hook`__ on its ``apply``:
74in this way the database will be updated as soon as darcs finish
75applying any new changeset.
[188]76
77This can be accomplished by putting something like the following
78setting into the repository ``_darcs/prefs/defaults`` file::
79
[189]80  apply posthook trac-admin TRAC_ENV changeset added $(pwd) $(python -m tracdarcs.changesparser)
[188]81  apply run-posthook
82
83where of course you should replace `TRAC_ENV` with the full path of
84the related trac instance.
85
[189]86.. note:: ``python -m tracdarcs.changesparser`` is just a quick way of
87   extracting the list of changeset hashes from the the ``darcs
88   changes --xml`` format: it accepts the input either as the
89   ``$DARCS_PATCHES_XML`` or from standard input::
[188]90
[189]91    $ darcs changes --xml | python -m tracdarcs.changesparser | head -3
92    20100611081300-97f81-bc5c1f7acf0c168bbfa9fb911e3cc2a4e71d5eef
93    20100610150339-97f81-cd1b73f2ba1b1d98c28542ecbd1d5e2bd9052056
94    20100512164420-97f81-de3fbc73d7c401fb92503ef1b25e19e0f48d2ad1
[188]95
[189]96At that point, you could deactivate the per request sync that Trac
97still does by default, by setting ``repository_sync_per_request`` to
98an empty value in the ``[trac]`` section of the configuration.
[188]99
[189]100__ http://trac.edgewall.org/wiki/0.12/TracRepositoryAdmin#ExplicitSync
[188]101__ http://darcs.net/manual/node7.html#SECTION00712000000000000000
Note: See TracBrowser for help on using the repository browser.