util: wrap lines with multi-byte characters correctly (
issue2943)
This re-introduces the unicode conversion what was lost in
d320e70442a5 5 years
ago and had the comment:
To avoid corrupting multi-byte characters in line, we must wrap
a Unicode string instead of a bytestring.
match: remove unused assignment
The field is assigned again below with the constructor argument.
http: explain why the host is passed to urllib2 password manager
The original comment was in url.getauthinfo() and was lost in
bf6156bab41b.
test-http: test http authentication
The extension hack is based on Henrik Stuart's hg-textauth.
http: pass user to readauthforuri() (fix
4a43e23b8c55)
urllib2 never handles URIs with credentials, we have to extract them and store
them in the password manager before handing the stripped URI. Half of the
changes deducing the username from the URI in
4a43e23b8c55 were incorrect.
Instead, we retrieve the username from the password manager before passing to
readauthforuri().
test-hgweb-auth.py was passing because the test itself was flawed: it was
passing URIs with credentials to find_password(), which never happens.
http: strip credentials from urllib2 manager URIs (
issue2885)
urllib2 password manager does not strip credentials from URIs registered with
add_password() and compare them with stripped URIs in find_password(). Remove
credentials from URIs returned by util.url.authinfo(). It sometimes works when
no port was specified as the URI host is registered too.
help: drop with_version
If --version is specified, we print the version and exit (as documented).