# HG changeset patch # User Jeff Hammel # Date 1320897315 28800 # Node ID 738d84b4de52900b1ff6e95111802e7e0fbc94d9 # Parent d69041957c0e24f89b1259dc099a2802c0095e6f start documenting diff -r d69041957c0e -r 738d84b4de52 README.txt --- a/README.txt Wed Nov 09 17:06:02 2011 -0800 +++ b/README.txt Wed Nov 09 19:55:15 2011 -0800 @@ -1,14 +1,46 @@ fetch -=========== +===== fetch stuff from the interwebs + Format ------ -`fetch` fetches from a manifest of the format +`fetch` fetches from a manifest of the format:: + + [URL] [Destination] [Type] + +A URL can contain a hash tag (e.g. http://example.com/foo#bar/fleem) +which is used to extract the subdirectories from a multi-directory +resource. + +The `Type` of the resource is used to dispatch to the included +Fetchers that take care of fetching the object. + + +Fetchers +-------- + +`fetch` includes several objects for fetching resources:: -[URL] [Destination] [Type] + file : fetch a single file + tar : fetch and extract a tarball + hg : checkout a mercurial repository + git : checkout a git repository + +The `file` fetcher cannot have a hash tag subpath since it is a single +resource. + +Though `fetch` has a set of fetchers included, you can pass an +arbitrary list into `fetch.Fetch`'s constructor. + + +Version Control +--------------- + +The `hg` and the `git` fetchers fetch from version control systems and +have additional options. ---- diff -r d69041957c0e -r 738d84b4de52 fetch.py --- a/fetch.py Wed Nov 09 17:06:02 2011 -0800 +++ b/fetch.py Wed Nov 09 19:55:15 2011 -0800 @@ -124,7 +124,11 @@ """checkout a git repository""" type = 'git' - fetchers + def __init__(self, url, export=True): + VCSFetcher.__init__(self, url, export=True) + self.hg = which('git') + + fetchers.append(GitFetcher) __all__ += [i.__name__ for i in fetchers] diff -r d69041957c0e -r 738d84b4de52 tests/test.py --- a/tests/test.py Wed Nov 09 17:06:02 2011 -0800 +++ b/tests/test.py Wed Nov 09 19:55:15 2011 -0800 @@ -9,7 +9,6 @@ import sys from optparse import OptionParser - def run_tests(raise_on_error=False, report_first=False): # add results here