Proof of concept password caching extension

David Glasser glasser at mit.edu
Wed Jun 6 10:31:08 CDT 2007


The attached Mercurial extension caches http passwords.  It does this
by replacing the httprepo.passwordmgr class with one that caches to
~/.hgpwcache/cache. (I put it in a subdirectory for folks who use
filesystems like AFS that make it easier to set permissions on
directories than on files.)  Downsides: it doesn't set permissions on
the cache file, and if the cache entry is *wrong*, it will try it
anyway and die, instead of giving the user another chance.  (This is
similar to the annoying behavior that in general, if you get the
password wrong, it dies rather than giving a few chances.)

I don't think it's in good enough shape to really be used, but maybe
somebody who's been using Mercurial for a little longer than I have
can polish it up...

--dave

-- 
David Glasser | glasser at mit.edu | http://www.davidglasser.net/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pwcache.py
Type: text/x-python
Size: 1152 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20070606/8ccc50d1/attachment.py 


More information about the Mercurial-devel mailing list