diff options
Diffstat (limited to 'manifest_xml.py')
-rw-r--r-- | manifest_xml.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/manifest_xml.py b/manifest_xml.py index bd1ab69b..890c954d 100644 --- a/manifest_xml.py +++ b/manifest_xml.py | |||
@@ -86,16 +86,20 @@ class _XmlRemote(object): | |||
86 | # about here are: | 86 | # about here are: |
87 | # * no scheme in the base url, like <hostname:port> | 87 | # * no scheme in the base url, like <hostname:port> |
88 | # * persistent-https:// | 88 | # * persistent-https:// |
89 | # * rpc:// | ||
89 | # We handle this by replacing these with obscure protocols | 90 | # We handle this by replacing these with obscure protocols |
90 | # and then replacing them with the original when we are done. | 91 | # and then replacing them with the original when we are done. |
91 | # gopher -> <none> | 92 | # gopher -> <none> |
92 | # wais -> persistent-https | 93 | # wais -> persistent-https |
94 | # nntp -> rpc | ||
93 | if manifestUrl.find(':') != manifestUrl.find('/') - 1: | 95 | if manifestUrl.find(':') != manifestUrl.find('/') - 1: |
94 | manifestUrl = 'gopher://' + manifestUrl | 96 | manifestUrl = 'gopher://' + manifestUrl |
95 | manifestUrl = re.sub(r'^persistent-https://', 'wais://', manifestUrl) | 97 | manifestUrl = re.sub(r'^persistent-https://', 'wais://', manifestUrl) |
98 | manifestUrl = re.sub(r'^rpc://', 'nntp://', manifestUrl) | ||
96 | url = urllib.parse.urljoin(manifestUrl, url) | 99 | url = urllib.parse.urljoin(manifestUrl, url) |
97 | url = re.sub(r'^gopher://', '', url) | 100 | url = re.sub(r'^gopher://', '', url) |
98 | url = re.sub(r'^wais://', 'persistent-https://', url) | 101 | url = re.sub(r'^wais://', 'persistent-https://', url) |
102 | url = re.sub(r'^nntp://', 'rpc://', url) | ||
99 | return url | 103 | return url |
100 | 104 | ||
101 | def ToRemoteSpec(self, projectName): | 105 | def ToRemoteSpec(self, projectName): |
@@ -264,6 +268,8 @@ class XmlManifest(object): | |||
264 | revision = self.remotes[remoteName].revision or d.revisionExpr | 268 | revision = self.remotes[remoteName].revision or d.revisionExpr |
265 | if not revision or revision != p.revisionExpr: | 269 | if not revision or revision != p.revisionExpr: |
266 | e.setAttribute('revision', p.revisionExpr) | 270 | e.setAttribute('revision', p.revisionExpr) |
271 | if p.upstream and p.upstream != p.revisionExpr: | ||
272 | e.setAttribute('upstream', p.upstream) | ||
267 | 273 | ||
268 | for c in p.copyfiles: | 274 | for c in p.copyfiles: |
269 | ce = doc.createElement('copyfile') | 275 | ce = doc.createElement('copyfile') |