Mercurial > hg > fetch
comparison README.txt @ 55:2dfdff7549b2
note how example works
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 15 Nov 2011 16:40:31 -0800 |
parents | 81fe0523a078 |
children |
comparison
equal
deleted
inserted
replaced
54:c62e80b8615a | 55:2dfdff7549b2 |
---|---|
25 The ``Type`` of the resource is used to dispatch to the included | 25 The ``Type`` of the resource is used to dispatch to the included |
26 Fetchers that take care of fetching the object. | 26 Fetchers that take care of fetching the object. |
27 | 27 |
28 Manifests are used so that a number of resources may be fetched from a | 28 Manifests are used so that a number of resources may be fetched from a |
29 particular ``fetch`` run. | 29 particular ``fetch`` run. |
30 | |
31 | |
32 Example | |
33 ------- | |
34 | |
35 After you checkout the `repository <http://k0s.org/mozilla/hg/fetch>`_ | |
36 and run ``python setup.py develop``, you should be able to run | |
37 ``fetch`` on the example manifest:: | |
38 | |
39 fetch example.txt | |
40 | |
41 This will create a ``tmp`` directory relative to the manifest and pull | |
42 down several resources to it. | |
30 | 43 |
31 | 44 |
32 Fetchers | 45 Fetchers |
33 -------- | 46 -------- |
34 | 47 |
80 whole manifest, only from certain subpaths of the manifest. You | 93 whole manifest, only from certain subpaths of the manifest. You |
81 should be able to output a subset of what is to be mirrored based | 94 should be able to output a subset of what is to be mirrored based |
82 on destination subpaths. The CLI option ``--dest`` is intended for | 95 on destination subpaths. The CLI option ``--dest`` is intended for |
83 this purpose but currently unused. | 96 this purpose but currently unused. |
84 | 97 |
85 * fetcher options: | 98 * fetcher options: currently ``read_manifests`` reads an unused |
99 column into ``options`` when present in the form of a string like | |
100 ``foo=one,bar=two`` into a dict like | |
101 ``{'foo': 'one', 'bar': 'two'}``. This hasn't been needed yet and | |
102 is unused. If we want to have resource-specific options, we should | |
103 use this and make it work. Otherwise it can be deleted. | |
86 | 104 |
87 * note python 2.5+ specifics: | 105 * python package fetcher: often you will want to fetch a python |
106 package as a resource. This would essentially fetch the object | |
107 (using another fetcher) and take the (untarred) result of | |
108 ``python setup.py sdist`` as a resource. This will strip out files | |
109 that aren't part of the python package. Unknowns include how to | |
110 specify the sub-fetcher. You could also include other | |
111 domain-specific fetchers as needed. | |
112 | |
113 * note python 2.5+ specifics: ``fetch`` currently uses at least | |
114 ``os.path.relpath`` from python 2.5 and perhaps other 2.5+isms as | |
115 well. These should at least be documented and checked for if not | |
116 obviated. One such reimplementation is at | |
117 https://github.com/mozilla/mozbase/blob/master/manifestdestiny/manifestparser.py#L66 | |
118 | |
88 | 119 |
89 Unsolved Problems | 120 Unsolved Problems |
90 ----------------- | 121 ----------------- |
91 | 122 |
92 A common story for ``fetch`` is mirroring files into a VCS repository | 123 A common story for ``fetch`` is mirroring files into a VCS repository |