diff options
| -rw-r--r-- | manifest_xml.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/manifest_xml.py b/manifest_xml.py index 36f8ef87..0664eff9 100644 --- a/manifest_xml.py +++ b/manifest_xml.py | |||
| @@ -65,12 +65,19 @@ class _XmlRemote(object): | |||
| 65 | def _resolveFetchUrl(self): | 65 | def _resolveFetchUrl(self): |
| 66 | url = self.fetchUrl.rstrip('/') | 66 | url = self.fetchUrl.rstrip('/') |
| 67 | manifestUrl = self.manifestUrl.rstrip('/') | 67 | manifestUrl = self.manifestUrl.rstrip('/') |
| 68 | p = manifestUrl.startswith('persistent-http') | ||
| 69 | if p: | ||
| 70 | manifestUrl = manifestUrl[len('persistent-'):] | ||
| 71 | |||
| 68 | # urljoin will get confused if there is no scheme in the base url | 72 | # urljoin will get confused if there is no scheme in the base url |
| 69 | # ie, if manifestUrl is of the form <hostname:port> | 73 | # ie, if manifestUrl is of the form <hostname:port> |
| 70 | if manifestUrl.find(':') != manifestUrl.find('/') - 1: | 74 | if manifestUrl.find(':') != manifestUrl.find('/') - 1: |
| 71 | manifestUrl = 'gopher://' + manifestUrl | 75 | manifestUrl = 'gopher://' + manifestUrl |
| 72 | url = urlparse.urljoin(manifestUrl, url) | 76 | url = urlparse.urljoin(manifestUrl, url) |
| 73 | return re.sub(r'^gopher://', '', url) | 77 | url = re.sub(r'^gopher://', '', url) |
| 78 | if p: | ||
| 79 | url = 'persistent-' + url | ||
| 80 | return url | ||
| 74 | 81 | ||
| 75 | def ToRemoteSpec(self, projectName): | 82 | def ToRemoteSpec(self, projectName): |
| 76 | url = self.resolvedFetchUrl.rstrip('/') + '/' + projectName | 83 | url = self.resolvedFetchUrl.rstrip('/') + '/' + projectName |
