cmdutil: copy auth section in remoteui stable
authorDirkjan Ochtman <dirkjan@ochtman.nl>
Thu, 10 Dec 2009 12:31:21 +0100
branchstable
changeset 10025 fb45c1e4396f
parent 10022 585f51f8b5f0
child 10026 0b0a46607ac9
child 10042 7cdd2a7db2c2
cmdutil: copy auth section in remoteui This allows me to specify an auth section in a .hg/hgrc instead of just a global or user-level hgrc.
mercurial/cmdutil.py
--- a/mercurial/cmdutil.py	Tue Dec 08 23:23:59 2009 +0100
+++ b/mercurial/cmdutil.py	Thu Dec 10 12:31:21 2009 +0100
@@ -111,11 +111,16 @@
         v = opts.get(o) or src.config('ui', o)
         if v:
             dst.setconfig("ui", o, v)
+
     # copy bundle-specific options
     r = src.config('bundle', 'mainreporoot')
     if r:
         dst.setconfig('bundle', 'mainreporoot', r)
 
+    # copy auth section settings
+    for key, val in src.configitems('auth'):
+        dst.setconfig('auth', key, val)
+
     return dst
 
 def revpair(repo, revs):