bzr-git broken ?
Russel Winder
russel.winder at concertant.com
Sun Mar 14 10:52:54 GMT 2010
On Sun, 2010-03-14 at 19:02 +0900, INADA Naoki wrote:
> > Can you try the following in a Python interpreter and let me know what it
> > outputs:
> > import urllib
> > urllib.urlsplit("git://git.gnome.org/postr")
> > urllib.splithost(urllib.urlsplit("git://git.gnome.org/postr")[2])
>
> urlsplit is in urlparse module.
>
> >>> import urllib
> >>> import urlparse
> >>> urlparse.urlsplit('git://git.gnome.org/postr')
> SplitResult(scheme='git', netloc='', path='//git.gnome.org/postr',
> query='', fragment='')
> >>> urllib.splithost(_[2])
> ('git.gnome.org', '/postr')
Indeed:
|> python
Python 2.6.5rc2 (r265rc2:78822, Mar 11 2010, 20:47:08)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib
>>> import urlparse
>>> urlparse.urlsplit('git://git.gnome.org/postr')
SplitResult(scheme='git', netloc='git.gnome.org', path='/postr', query='', fragment='')
>>> urllib.splithost(urllib.urlsplit("git://git.gnome.org/postr")[2])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'urlsplit'
>>> urlparse.splithost(urllib.urlsplit("git://git.gnome.org/postr")[2])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'splithost'
>>> urlparse.splithost(urlparse.urlsplit("git://git.gnome.org/postr")[2])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'splithost'
>>> urllib.splithost(urlparse.urlsplit("git://git.gnome.org/postr")[2])
(None, '/postr')
>>>
On the other hand:
|> grep urlsplit *.py */*.py
remote.py: (scheme, _, loc, _, _) = urlparse.urlsplit(url)
So I guess this is not the problem per se.
--
Russel.
=============================================================================
Dr Russel Winder Partner
xmpp: russel at russel.org.uk
Concertant LLP t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road, f: +44 8700 516 084 voip: sip:russel.winder at ekiga.net
London SW11 1EN, UK m: +44 7770 465 077 skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20100314/8efafd0d/attachment.pgp
More information about the bazaar
mailing list