[PATCH] allow http authentication information to be specified in the configuration

Martin Geisler mg at lazybytes.net
Sun May 3 11:59:14 CDT 2009


Sune Foldager <cryo at cyanite.org> writes:

> There is a small bug in the patch with some duplicated lines. They
> don't actually break anything, though.
>
> I fixed it and re-ran the tests. Everything works the same. Patch
> attached.

I guess this is ready to push, without or without my small comments
about the test -- Dirkjan, Benoit, do you guys have more comments?

> +def dumpdict(dict):
> +    print '{' + ', '.join(['%s: %s' % (k, dict[k]) for k in sorted(dict.iterkeys())]) + '}'

pprint.pprint does the same.

> +    def _test(uri):
> +        print 'URI:', uri
> +        try:
> +            pm = url.passwordmgr(ui)
> +            print '    ', pm.find_user_password('test', uri)
> +        except Abort, e:
> +            print 'abort'

Is there a reason for not printing the exception?

> +print '\n*** Test separately configured schemes\n'
> +test({'x.prefix': 'example.org', 'x.schemes': 'http'})

What happens if the user specifies

  x.prefix = http://example.org/
  x.schemes = https

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20090503/c00ea45c/attachment.pgp 


More information about the Mercurial-devel mailing list