Changeset 488 in tailor


Ignore:
Timestamp:
08/05/05 02:30:58 (8 years ago)
Author:
lele@…
Hash name:
20050805003058-97f81-dc817d2034792b99e9c2bbe75a27e48f6866aa80
Message:

Example and some details on new configuration

File:
1 edited

Legend:

Unmodified
Added
Removed
  • README

    r476 r488  
    5252.. _arx: http://www.nongnu.org/arx/ 
    5353 
     54 
    5455Installation 
    5556============ 
     
    166167    /tmp/wc $ svn add --quiet --no-auto-props --non-recursive tailor [Ok] 
    167168    ... 
    168      
     169 
     1709. Given the configuration file shown below in `Config file format`_, 
     171   the following command:: 
     172 
     173    $ tailor --configfile example.tailor --bootstrap 
     174 
     175   is equivalent to this one:: 
     176 
     177    $ tailor --configfile example.tailor --bootstrap tailor 
     178 
     179   in that they bootstrap respectively the default project(s) or 
     180   the ones specified on the command line (and in this case there 
     181   is just a single default project, tailor). 
     182 
     183   This one instead:: 
     184 
     185    $ tailor --configfile example.tailor tailor tailor-reverse 
     186 
     187   executes an update on both projects. 
     188 
     189 
    169190Resolving conflicts 
    170191=================== 
     
    202223 
    203224 
    204 Tailor's metadata 
    205 ================= 
    206  
    207 To do its work, tailor needs some information about your source tree, 
    208 such as the upstream repository URL and the current revision of the 
    209 sources on your harddisk. 
    210  
    211 In the simpler case, tailor keeps this information in a file called 
    212 `tailor.info`, one for each tailored project, that is a very simple 
    213 text document, with the following information, one per line: 
    214  
    215 1. Upstream repository kind (either "cvs", "darcs" or "svn) 
    216 2. Target repository kind (the same as above) 
    217 3. The name of the "module" that's been tailored 
    218 4. The URL of the upstream repository (that may not be an URL, for cvs...) 
    219 5. The current revision, from the upstream point of view, of the sources 
    220 6. The subdirectory that contains the checked out upstream tree, 
    221    either that given with with the `--subdir` option or computed 
    222    taking the last part of the module name.  
    223  
    224 This is everything tailor needs, to be able to keep going from where it 
    225 left last time. 
    226  
    227  
    228225Config file format 
    229 ------------------ 
     226================== 
    230227 
    231228When your project is composed by multiple upstream modules, it is 
    232229easier to collect such information in a single file. This is done by 
    233230specifying the `--configfile` option with a file name as argument. In 
    234 this case, tailor will read/write the above information from a 
    235 standard Python dictionary stored in the given file.  
    236  
    237 The dictionary is keyed on the relative position of each project, and 
    238 each entry carries the same information described above. 
    239  
    240 Here's an example config file entry:: 
    241  
    242  {'plone/atcontenttypes': {'module': 'ATContentTypes', 
    243                            'source_kind': 'cvs', 
    244                            'subdir': 'ATContentTypes', 
    245                            'target_kind': 'darcs', 
    246                            'upstream_repos': ':ext:cvs.sourceforge.net:/cvsroot/collective', 
    247                            'upstream_revision': '2004-11-24 19:42:06 by ctheune'}} 
    248  
    249 By convention, config files are named with the extension ".tailor", 
    250 but this is not enforced. 
    251  
    252 In the example above, 'plone/atcontenttypes' is a directory where the 
    253 target source will be stored. The keys such 'module', 'source_kind', 
    254 etc correspond to options of the same name. 
    255  
    256 When using a config file, tailor will perform its job on each project 
    257 contained in the dictionary. 
    258  
     231this case, tailor will read the above information from a 
     232standard Python ConfigParser file.  
     233 
     234For example:: 
     235 
     236    [DEFAULT] 
     237    verbose = Yes 
     238    target-module = None 
     239    projects = tailor 
     240 
     241    [tailor] 
     242    root = /tmp/n9 
     243    source = darcs:tailor 
     244    target = svn:tailor 
     245    refill-changelogs = Yes 
     246    state-file = tailor.state 
     247 
     248    [tailor-reverse] 
     249    root = /tmp/n9 
     250    source = svn:tailor 
     251    target = darcs:tailor 
     252    refill-changelogs = Yes 
     253    state-file = reverse.state 
     254     
     255    [svn:tailor] 
     256    repository = file:///tmp/testtai 
     257    module = /project1 
     258 
     259    [darcs:tailor] 
     260    repository = /home/lele/WiP/cvsync 
     261 
     262.. hint:: If you execute the examples above with ``--verbose --debug`` 
     263          **and without** ``--configfile``, tailor will write a 
     264          template config filled with the values specified by the 
     265          other options. You can redirect  
     266 
     267State file 
     268---------- 
     269 
     270The state file stores two things: the last upstream revision that 
     271has been applied to the tree, and a sequence of pending (not yet 
     272applied) changesets, that may be empty. In the latter case, tailor 
     273will fetch latest changes from the upstream repository. 
    259274 
    260275Interactive sessions 
Note: See TracChangeset for help on using the changeset viewer.