DISQUS

toxicsoftware.com: Making Mercurial use the Mac OS X Keychain

  • keramida · 1 year ago
    This seems like an extension that would be very useful to have in the main Mercurial distribution. Can we hope to lure you into submitting it to `mercurial-devel (at) selenic.com' as a patch?

    Cheers,
    Giorgos
  • schwa · 1 year ago
    Giorgos, yeah I would love it to be part of the distribution however:

    1 It disables Mercurial's demandimport module. I couldn't get demandimport to work with my imports. And after a quick google I found it easier to disable the module than to fix things. Hopefully an hg expert can help me with this.

    2 it uses a Mac OS specific compiled C module.

    3 It monkey patches mercurial to override the password manager. I had to do this because I couldn't see how to access the password manager legitimately.

    I don't think this extension is suitable to be included with mercurial. But I will look into the idea of creating a patch that will provide this functionality in a less hacky manner.
  • TeemuAP · 1 year ago
    One thing I toyed around with: adding bonjour to 'hg serve'. That way guys around the table can find and access each other's repos without bothering with IPs/ports.

    Not knowing python I did not end up with anything publishable, just a ruby wrapper.
  • schwa · 1 year ago
    @TeemuAP, yeah that might be interesting. The guys at turbogears do the same for their built-in server. I think they do it just by spawning the "dns-sd" tool. That should be relatively easy I'd imagine. Of course that would be Mac OS X only (again).
  • Andreas · 8 months ago
    Three things: www.bitbucket.org causes a certificate problem because of the "www" subdomain.

    Pure python keychain access: http://muffinresearch.co.uk/archives/2008/02/05... has a module for keychain access, without a .so required.Maybe this is interesting for you.

    Python conventions: Your code looks quite Ruby-like, you can monkey-patch (if you must) in a small scale without that __metaclass__ voodoo, by simply defining a method outside the class and assigning it:

    >>> class Foo(object):
    ... def bar(self):
    ... print "FooBar"
    ...
    >>> _baseFooBar = Foo.bar
    >>> def newBar(self):
    ... print "NewBar"
    ... _baseFooBar(self)
    ...
    >>> Foo.bar = newBar
    >>> Foo().bar()
    NewBar
    FooBar
  • Alexander Mikhalev · 4 months ago
    Thank you. I find it extremely useful.