summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/fetch/__init__.py33
1 files changed, 0 insertions, 33 deletions
diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py
index b566da4311..15292c6b7b 100644
--- a/bitbake/lib/bb/fetch/__init__.py
+++ b/bitbake/lib/bb/fetch/__init__.py
@@ -53,24 +53,6 @@ class InvalidSRCREV(Exception):
53def decodeurl(url): 53def decodeurl(url):
54 """Decodes an URL into the tokens (scheme, network location, path, 54 """Decodes an URL into the tokens (scheme, network location, path,
55 user, password, parameters). 55 user, password, parameters).
56
57 >>> decodeurl("http://www.google.com/index.html")
58 ('http', 'www.google.com', '/index.html', '', '', {})
59
60 >>> decodeurl("file://gas/COPYING")
61 ('file', '', 'gas/COPYING', '', '', {})
62
63 CVS url with username, host and cvsroot. The cvs module to check out is in the
64 parameters:
65
66 >>> decodeurl("cvs://anoncvs@cvs.handhelds.org/cvs;module=familiar/dist/ipkg")
67 ('cvs', 'cvs.handhelds.org', '/cvs', 'anoncvs', '', {'module': 'familiar/dist/ipkg'})
68
69 Dito, but this time the username has a password part. And we also request a special tag
70 to check out.
71
72 >>> decodeurl("cvs://anoncvs:anonymous@cvs.handhelds.org/cvs;module=familiar/dist/ipkg;tag=V0-99-81")
73 ('cvs', 'cvs.handhelds.org', '/cvs', 'anoncvs', 'anonymous', {'tag': 'V0-99-81', 'module': 'familiar/dist/ipkg'})
74 """ 56 """
75 57
76 m = re.compile('(?P<type>[^:]*)://((?P<user>.+)@)?(?P<location>[^;]+)(;(?P<parm>.*))?').match(url) 58 m = re.compile('(?P<type>[^:]*)://((?P<user>.+)@)?(?P<location>[^;]+)(;(?P<parm>.*))?').match(url)
@@ -111,21 +93,6 @@ def decodeurl(url):
111def encodeurl(decoded): 93def encodeurl(decoded):
112 """Encodes a URL from tokens (scheme, network location, path, 94 """Encodes a URL from tokens (scheme, network location, path,
113 user, password, parameters). 95 user, password, parameters).
114
115 >>> encodeurl(['http', 'www.google.com', '/index.html', '', '', {}])
116 'http://www.google.com/index.html'
117
118 CVS with username, host and cvsroot. The cvs module to check out is in the
119 parameters:
120
121 >>> encodeurl(['cvs', 'cvs.handhelds.org', '/cvs', 'anoncvs', '', {'module': 'familiar/dist/ipkg'}])
122 'cvs://anoncvs@cvs.handhelds.org/cvs;module=familiar/dist/ipkg'
123
124 Dito, but this time the username has a password part. And we also request a special tag
125 to check out.
126
127 >>> encodeurl(['cvs', 'cvs.handhelds.org', '/cvs', 'anoncvs', 'anonymous', {'tag': 'V0-99-81', 'module': 'familiar/dist/ipkg'}])
128 'cvs://anoncvs:anonymous@cvs.handhelds.org/cvs;tag=V0-99-81;module=familiar/dist/ipkg'
129 """ 96 """
130 97
131 (type, host, path, user, pswd, p) = decoded 98 (type, host, path, user, pswd, p) = decoded