summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb/fetch
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-04-09 11:49:36 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-07-02 15:41:31 +0100
commita21841fb75c13d111b3039a4227e92c03ade8cbe (patch)
tree2fd8cf45730e1445b3490cdbb3e1ecd22271e34c /bitbake/lib/bb/fetch
parentca9a956abc6b9b20bc7616c9e9bb2341be2bf5bb (diff)
downloadopenembedded-core-a21841fb75c13d111b3039a4227e92c03ade8cbe.tar.gz
openembedded-core-a21841fb75c13d111b3039a4227e92c03ade8cbe.tar.bz2
openembedded-core-a21841fb75c13d111b3039a4227e92c03ade8cbe.tar.xz
openembedded-core-a21841fb75c13d111b3039a4227e92c03ade8cbe.zip
Drop doctest, as we aren't utilizing it
We should add back in some proper unit testing. Doctest is rather limited, and we haven't actually made use of it since the original implementation of the datastore when the project started, as far as I'm aware. (Bitbake rev: 3a11c2807972bbbddffde2fa67fc380d159da467) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/fetch')
-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 b566da431..15292c6b7 100644
--- a/bitbake/lib/bb/fetch/__init__.py
+++ b/bitbake/lib/bb/fetch/__init__.py
@@ -53,24 +53,6 @@ class InvalidSRCREV(Exception):
def decodeurl(url):
"""Decodes an URL into the tokens (scheme, network location, path,
user, password, parameters).
-
- >>> decodeurl("http://www.google.com/index.html")
- ('http', 'www.google.com', '/index.html', '', '', {})
-
- >>> decodeurl("file://gas/COPYING")
- ('file', '', 'gas/COPYING', '', '', {})
-
- CVS url with username, host and cvsroot. The cvs module to check out is in the
- parameters:
-
- >>> decodeurl("cvs://anoncvs@cvs.handhelds.org/cvs;module=familiar/dist/ipkg")
- ('cvs', 'cvs.handhelds.org', '/cvs', 'anoncvs', '', {'module': 'familiar/dist/ipkg'})
-
- Dito, but this time the username has a password part. And we also request a special tag
- to check out.
-
- >>> decodeurl("cvs://anoncvs:anonymous@cvs.handhelds.org/cvs;module=familiar/dist/ipkg;tag=V0-99-81")
- ('cvs', 'cvs.handhelds.org', '/cvs', 'anoncvs', 'anonymous', {'tag': 'V0-99-81', 'module': 'familiar/dist/ipkg'})
"""
m = re.compile('(?P<type>[^:]*)://((?P<user>.+)@)?(?P<location>[^;]+)(;(?P<parm>.*))?').match(url)
@@ -111,21 +93,6 @@ def decodeurl(url):
def encodeurl(decoded):
"""Encodes a URL from tokens (scheme, network location, path,
user, password, parameters).
-
- >>> encodeurl(['http', 'www.google.com', '/index.html', '', '', {}])
- 'http://www.google.com/index.html'
-
- CVS with username, host and cvsroot. The cvs module to check out is in the
- parameters:
-
- >>> encodeurl(['cvs', 'cvs.handhelds.org', '/cvs', 'anoncvs', '', {'module': 'familiar/dist/ipkg'}])
- 'cvs://anoncvs@cvs.handhelds.org/cvs;module=familiar/dist/ipkg'
-
- Dito, but this time the username has a password part. And we also request a special tag
- to check out.
-
- >>> encodeurl(['cvs', 'cvs.handhelds.org', '/cvs', 'anoncvs', 'anonymous', {'tag': 'V0-99-81', 'module': 'familiar/dist/ipkg'}])
- 'cvs://anoncvs:anonymous@cvs.handhelds.org/cvs;tag=V0-99-81;module=familiar/dist/ipkg'
"""
(type, host, path, user, pswd, p) = decoded