Changeset 188 in tracdarcs for README.rst


Ignore:
Timestamp:
06/11/10 16:10:48 (3 years ago)
Author:
lele@…
Hash name:
20100611141048-97f81-15e92245fe097de02019726e7d7adcc4c981033b
Message:

Documentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • README.rst

    r143 r188  
    44 
    55This package implements a darcs backend for Trac supporting the new 
    6 `multirepository feature`__, that will be released in the forthcoming 
    7 `Trac 0.12`__ (as I write this, still in the sandbox__). 
     6`multirepository feature`__, that has been merged in the current 
     7`Trac 0.12`__. 
    88 
    99__ http://trac.edgewall.org/wiki/MultipleRepositorySupport 
     
    1111__ http://trac.edgewall.org/browser/sandbox/multirepos 
    1212 
    13 It should work well enough also with current (at the time of writing) 
    14 0.11 and even with 0.10. No guarantee! 
     13It used to work on 0.11, and even with 0.10, at least up to version 
     140.8 of the backend... No time to even try, so no guarantee, sorry! 
    1515 
    1616To use the module you can either install it or make an egg and copy 
     
    3636 
    3737In general, follow the directions in TracPlugins. 
     38 
     39Specific configuration options 
     40------------------------------ 
     41 
     42Some feature can be altered by using the following trac+darcs specific 
     43options in the ``[darcs]`` section of the configuration: 
     44 
     45command : string 
     46  This is the effective `darcs` executable that will be used. By 
     47  default its ``darcs``, but you could set it to 
     48  ``/usr/local/bin/darcs`` to use a newer version... 
     49 
     50dont_escape_8bit : boolean 
     51  False by default, maps to the `darcs` ``$DARCS_DONT_ESCAPE_8BIT`` 
     52  behaviour. 
     53 
     54possible_encodings : string 
     55  By default 'utf-8,iso8859-1', its a comma-separated-value list of 
     56  possible string encodings to try one after the other, should a 
     57  decode error occur while parsing darcs changesets. 
     58 
     59max_concurrent_darcses : integer 
     60  By default 0 to mean no limits, otherwise it is the maximum number 
     61  of concurrent running darcs processes at the same time. 
     62 
     63eager_annotations : boolean 
     64  False by default, when true the content and the annotation cache of 
     65  each modified file get computed immediately after a changeset gets 
     66  added. This will move the heavy computation at pull time, rather 
     67  than at first visit time. Of course, it will also enlarge the 
     68  trac database... 
     69 
     70Using a postcommit hook 
     71----------------------- 
     72 
     73The recommended way to trigger the sync between the repository and the 
     74Trac instance is by using a darcs `post hook`__ on its ``apply``: in 
     75this way the database will be updated as soon as darcs finish applying 
     76any new changeset. 
     77 
     78This can be accomplished by putting something like the following 
     79setting into the repository ``_darcs/prefs/defaults`` file:: 
     80 
     81  apply posthook trac-admin TRAC_ENV changeset add $(pwd) $(python -m tracdarcs.changesparser) 
     82  apply run-posthook 
     83 
     84where of course you should replace `TRAC_ENV` with the full path of 
     85the related trac instance. 
     86 
     87Btw, ``python -m tracdarcs.changesparser`` is just a quick way of 
     88extracting the list of changeset hashes from the the ``darcs changes 
     89--xml`` format: it accepts the input either as the 
     90``$DARCS_PATCHES_XML`` or from standard input:: 
     91 
     92  $ darcs changes --xml | python -m tracdarcs.changesparser | head -3 
     93  20100611081300-97f81-bc5c1f7acf0c168bbfa9fb911e3cc2a4e71d5eef 
     94  20100610150339-97f81-cd1b73f2ba1b1d98c28542ecbd1d5e2bd9052056 
     95  20100512164420-97f81-de3fbc73d7c401fb92503ef1b25e19e0f48d2ad1 
     96 
     97 
     98__ http://darcs.net/manual/node7.html#SECTION00712000000000000000 
    3899 
    39100Internals 
Note: See TracChangeset for help on using the changeset viewer.