Mercurial > hg > fetch
changeset 5:5b78d1411cdd
typo; this now works
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Sun, 18 Sep 2011 10:48:19 -0700 |
parents | a984091d681a |
children | 86f6f99e421b |
files | fetch/main.py |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/fetch/main.py Sun Sep 18 10:46:10 2011 -0700 +++ b/fetch/main.py Sun Sep 18 10:48:19 2011 -0700 @@ -24,7 +24,7 @@ import urllib2 -class FileFetcher(object): +class FileFetcher(Fetcher): """fetch a single file""" type = 'file' @@ -35,21 +35,21 @@ def __call__(self, dest): if os.path.isdir(dest): - filename = url.rsplit('/', 1)[-1] + filename = self.url.rsplit('/', 1)[-1] dest = os.path.join(dest, filename) f = file(dest, 'w') f.write(self.download(self.url)) f.close() -class TarballFetcher(object): +class TarballFetcher(FileFetcher): """fetch and extract a tarball""" type = 'tar' -class HgFetcher(object): +class HgFetcher(Fetcher): """checkout a mercurial repository""" -class GitFetcher(object): +class GitFetcher(Fetcher): """checkout a git repository""" fetchers = [FileFetcher] @@ -84,7 +84,7 @@ for item in items: # fix up relative paths - dest = item['destination'] + dest = item['dest'] if not os.path.isabs(dest): if self.relative_to: dest = os.path.join(self.relative_to, dest)