Mercurial > hg > fetch
changeset 31:60e0e932570e
fix one error but not the one i was aiming for
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 15 Nov 2011 11:45:46 -0800 |
parents | 0d3c1c78ff0a |
children | 46d5bd33311d |
files | example.txt fetch.py |
diffstat | 2 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/example.txt Tue Nov 15 10:18:56 2011 -0800 +++ b/example.txt Tue Nov 15 11:45:46 2011 -0800 @@ -2,4 +2,4 @@ # URL DESTINATION TYPE http://k0s.org/geekcode . file -https://github.com/mozilla/mozbase/tarball/master . tar +# https://github.com/mozilla/mozbase/tarball/master . tar
--- a/fetch.py Tue Nov 15 10:18:56 2011 -0800 +++ b/fetch.py Tue Nov 15 11:45:46 2011 -0800 @@ -264,8 +264,13 @@ # fix up relative paths dest = item['dest'] if not os.path.isabs(dest): - relative_to = self.relative_to or os.path.dirname(os.path.abspath(item['manifest'])) - dest = os.path.join(relative_to, dest) + relative_to = self.relative_to + if not relative_to: + if isinstance(item['manifest'], basestring): + relative_to = os.path.dirname(os.path.abspath(item['manifest'])) + else: + relative_to = os.getcwd() + dest = os.path.normpath(os.path.join(relative_to, dest)) # fetch the items self(item['url'], destination=dest, type=item['type'], **item['options'])