Mercurial > hg > fetch
comparison fetch.py @ 40:e103ae19c2a0
get subpaths working for tarballs
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 15 Nov 2011 14:03:48 -0800 |
parents | 8addc3712e75 |
children | 6e978ddf5135 |
comparison
equal
deleted
inserted
replaced
39:8addc3712e75 | 40:e103ae19c2a0 |
---|---|
95 # ensure that for subpaths that only one top level directory exists | 95 # ensure that for subpaths that only one top level directory exists |
96 # XXX needed? | 96 # XXX needed? |
97 assert toppath == split[0], "Multiple top-level archives found" | 97 assert toppath == split[0], "Multiple top-level archives found" |
98 else: | 98 else: |
99 toppath = split[0] | 99 toppath = split[0] |
100 if split and split[1:len(self.subpath)] == self.subpath: | 100 if split and split[1:len(self.subpath)+1] == self.subpath: |
101 import pdb; pdb.set_trace() | 101 member.name = os.path.sep.join(split[1:]) |
102 _members.append(member) | |
102 | 103 |
103 members = _members | 104 members = _members |
104 | 105 |
105 for member in members: | 106 for member in members: |
106 tf.extract(member, dest) | 107 tf.extract(member, dest) |