Mercurial > hg > fetch
comparison fetch.py @ 38:645d02834042
extract....correctly?
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 15 Nov 2011 12:56:35 -0800 |
parents | f30fe9183e64 |
children | 8addc3712e75 |
comparison
equal
deleted
inserted
replaced
37:f30fe9183e64 | 38:645d02834042 |
---|---|
82 raise NotImplementedError("should extract only a subpath of a tarball but I haven't finished it yet") | 82 raise NotImplementedError("should extract only a subpath of a tarball but I haven't finished it yet") |
83 buffer = StringIO() | 83 buffer = StringIO() |
84 buffer.write(self.download(self.url)) | 84 buffer.write(self.download(self.url)) |
85 buffer.seek(0) | 85 buffer.seek(0) |
86 tf = tarfile.open(mode='r', fileobj=buffer) | 86 tf = tarfile.open(mode='r', fileobj=buffer) |
87 tf.extract(dest) | 87 members = tf.getmembers() |
88 for member in members: | |
89 tf.extract(member, dest) | |
88 | 90 |
89 fetchers = [FileFetcher, TarballFetcher] | 91 fetchers = [FileFetcher, TarballFetcher] |
90 | 92 |
91 ### VCS fetchers | 93 ### VCS fetchers |
92 | 94 |