source: tailor/README @ 176

Revision 176, 4.2 KB checked in by Mark Stosberg <mark@…>, 8 years ago (diff)

further clarify RST

Line 
1About
2=====
3
4tailor.py is a tool to migrate changesets between CVS, Subversion, and
5darcs repositories.
6
7This script makes it easier to keep the upstream changes merged in
8a branch of a product, storing needed information such as the upstream
9URI and revision in special properties on the branched directory.
10
11
12Installation
13============
14
15tailor.py is written in Python, and thus Python must be installed on your
16system to use it.
17
18Make tailor.py executable::
19
20 $ chmod +x tailor.py
21
22You can either run tailor.py where it is currently located, or move it
23along with the vcpx directory to a location in your PATH.
24
25
26Examples
27========
28
29Bootstrap a new taylored project, starting at upstream revision 10::
30
31  $ tailor.py -b -s svn -R http://svn.server/Product -r 10 ~/darcs/MyProduct
32
33Bootstrap a new product, fetching from CVS and storing under SVN: this
34will create the directory "~/svnwc/cmfcore"; "~/svnwc" must be already
35under SVN::
36
37  $ tailor.py --source-kind cvs --target-kind svn --bootstrap \
38              --repository :pserver:cvs.zope.org:/cvs-repository \
39              --module CMF/CMFCore ~/svnwc/cmfcore
40 
41Showing each command bootstrap a new DARCS repos in "~/darcs/cmftopic"
42under which the upstream module will be extracted as "CMFTopic" (ie, the
43last component of the module name)::
44
45  $ tailor.py -D -b -R :pserver:anonymous@cvs.zope.org:/cvs-repository/ \
46              -m CMF/CMFTopic ~/darcs/cmftopic
47             
48Merge upstream changes since last update/bootstrap::
49
50  $ tailor.py ~/svnwc/MyProduct
51
52
53Tailor's metadata
54=================
55
56To do its work, tailor needs some information about your source tree,
57such as the upstream repository URL and the current revision of the
58sources on your harddisk.
59
60In the simpler case, tailor keeps this information in a file called
61`tailor.info`, one for each tailored project, that is a very simple
62text document, with the following information, one per line:
63
641. Upstream repository kind (either "cvs", "darcs" or "svn)
652. Target repository kind (the same as above)
663. The name of the "module" that's been tailored
674. The URL of the upstream repository (that may not be an URL, for cvs...)
685. The current revision, from the upstream point of view, of the sources
69
70This is everything tailor needs, to be able to keep going from where it
71left last time.
72
73Config file format
74==================
75
76When your project is composed by multiple upstream modules, it is
77easier to collect such information in a single file. This is done by
78specifying the `--configfile` option with a file name as argument. In
79this case, tailor will read/write the above information from a
80standard Python dictionary stored in the given file.
81
82The dictionary is keyed on the relative position of each project, and
83each entry carries the same information described above.
84
85Here's an example config file entry::
86
87 {'plone/atcontenttypes': {'module': 'ATContentTypes',
88                           'source_kind': 'cvs',
89                           'subdir': 'ATContentTypes',
90                           'target_kind': 'darcs',
91                           'upstream_repos': ':ext:cvs.sourceforge.net:/cvsroot/collective',
92                           'upstream_revision': '2004-11-24 19:42:06 by ctheune'}}
93
94By convention, config files are named with the extension ".tailor",
95but this is not enforced.
96
97In the example above, 'plone/atcontenttypes' is a directory where the
98target source will be stored. The keys such 'module', 'source_kind',
99etc correspond to options of the same name.
100
101When using a config file, tailor will perform its job on each project
102contained in the dictionary.
103
104
105Further help
106============
107
108See the output of tailor.py -h for some further tips. I will be more
109than happy to answer any doubt, question or suggestion you may have on
110it. I'm usually hanging as "lelit" on the IRC channel devoted to darcs
111on the freenode.net network. Do not hesitate to contact me either by
112email or chatting there.
113
114
115Author
116======
117
118Lele Gaifax <lele@nautilus.homeip.net>
119
120About this document
121===================
122
123This document uses the reStructuredText format so that it can be easily
124converted into other formats, such as HTML. For more information about this,
125please see:
126http://docutils.sourceforge.net/rst.html
127
128
129.. vim:ft=rest
130.. Local Variables:
131.. mode: rst
132.. End:
Note: See TracBrowser for help on using the repository browser.