Patchwork [3,of,6] factotum: clean up keychain for multiple hg repository authentication

login
register
mail settings
Submitter jas@corpus-callosum.com
Date Aug. 12, 2013, 11:01 p.m.
Message ID <c92381647a5b63b85355.1376348469@acme.buf.io>
Download mbox | patch
Permalink /patch/2169/
State Accepted
Headers show

Comments

jas@corpus-callosum.com - Aug. 12, 2013, 11:01 p.m.
# HG changeset patch
# User Jeff Sickel <jas@corpus-callosum.com>
# Date 1376347471 18000
#      Mon Aug 12 17:44:31 2013 -0500
# Branch stable
# Node ID c92381647a5b63b85355bf62a60df8d13fc5f858
# Parent  c0fa3b1baa4c1fc968390c37400b08314808d115
factotum: clean up keychain for multiple hg repository authentication
Augie Fackler - Aug. 13, 2013, 9 p.m.
On Mon, Aug 12, 2013 at 06:01:09PM -0500, Jeff Sickel wrote:
> # HG changeset patch
> # User Jeff Sickel <jas@corpus-callosum.com>
> # Date 1376347471 18000
> #      Mon Aug 12 17:44:31 2013 -0500
> # Branch stable
> # Node ID c92381647a5b63b85355bf62a60df8d13fc5f858
> # Parent  c0fa3b1baa4c1fc968390c37400b08314808d115
> factotum: clean up keychain for multiple hg repository authentication

queued this one and the first one, thanks

>
> diff -r c0fa3b1baa4c -r c92381647a5b hgext/factotum.py
> --- a/hgext/factotum.py	Mon Aug 12 17:39:55 2013 -0500
> +++ b/hgext/factotum.py	Mon Aug 12 17:44:31 2013 -0500
> @@ -101,7 +101,7 @@
>          user, passwd = auth.get('username'), auth.get('password')
>      if not user or not passwd:
>          if not prefix:
> -            prefix = '*'
> +            prefix = realm.split(' ')[0].lower()
>          params = 'service=%s prefix=%s' % (_service, prefix)
>          if user:
>              params = '%s user=%s' % (params, user)
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel

Patch

diff -r c0fa3b1baa4c -r c92381647a5b hgext/factotum.py
--- a/hgext/factotum.py	Mon Aug 12 17:39:55 2013 -0500
+++ b/hgext/factotum.py	Mon Aug 12 17:44:31 2013 -0500
@@ -101,7 +101,7 @@ 
         user, passwd = auth.get('username'), auth.get('password')
     if not user or not passwd:
         if not prefix:
-            prefix = '*'
+            prefix = realm.split(' ')[0].lower()
         params = 'service=%s prefix=%s' % (_service, prefix)
         if user:
             params = '%s user=%s' % (params, user)