[PATCH] fix bug in https url handling
Dominique Quatravaux
dominique at quatravaux.org
Thu Nov 8 08:56:04 CST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Here are my observations. I tried the following on several machines:
hg up -r 0.9.5
make clean
make local
./hg clone https://domq:domq@myrepo/path/
OK means that the cloning proceeds without further interactive
questions; ASK means that the username and password gets asked again.
OK on: Ubuntu Gutsy i386, Python 2.5.1
ASK on: Fedora Core 3 i386, Python 2.3.4
OK on: CentOS 4 i386, Python 2.4.3
On Fedora Core 3, applying the suggested one-line patch to
mercurial/httprepo.py turns ASK into OK.
How about storing the password under *both* URLs?
if user:
ui.debug(_('http auth: user %s, password %s\n') %
(user, passwd and '*' * len(passwd) or 'not set'))
passmgr.add_password(None, self._url, user, passwd or '')
passmgr.add_password(None, host, user, passwd or '')
handlers.extend((urllib2.HTTPBasicAuthHandler(passmgr),
httpdigestauthhandler(passmgr)))
Probably could use some fairly trivial refactoring :-) but you get the
idea.
- --
<< Tout n'y est pas parfait, mais on y honore certainement les
jardiniers >>
Dominique Quatravaux <dominique at quatravaux.org>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iQCVAwUBRzMjhPTYH7KfeIIFAQLSDwP/Y4C7bUQAhmUbwGWq/6LLJD0NJdgkvUo5
ZTVqFOTW9+stHnuBYKKYyzX5BinmcSl0gf16pVuO5fxlM1aGX6Lkr77t2gDe7t6J
s6f0hTPyKCPylmwtQdn58EeQO0ErhPmNjhK6yFa3d04PTQRQjntOnEBarY0jEg41
wJ6o35paGSI=
=NRWu
-----END PGP SIGNATURE-----
More information about the Mercurial-devel
mailing list