Mercurial > hg
comparison mercurial/cmdutil.py @ 10025:fb45c1e4396f stable
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.
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Thu, 10 Dec 2009 12:31:21 +0100 |
parents | 2c2f7593ffc4 |
children | 0b0a46607ac9 8ebb34b0f6f7 |
comparison
equal
deleted
inserted
replaced
10022:585f51f8b5f0 | 10025:fb45c1e4396f |
---|---|
109 # copy ssh-specific options | 109 # copy ssh-specific options |
110 for o in 'ssh', 'remotecmd': | 110 for o in 'ssh', 'remotecmd': |
111 v = opts.get(o) or src.config('ui', o) | 111 v = opts.get(o) or src.config('ui', o) |
112 if v: | 112 if v: |
113 dst.setconfig("ui", o, v) | 113 dst.setconfig("ui", o, v) |
114 | |
114 # copy bundle-specific options | 115 # copy bundle-specific options |
115 r = src.config('bundle', 'mainreporoot') | 116 r = src.config('bundle', 'mainreporoot') |
116 if r: | 117 if r: |
117 dst.setconfig('bundle', 'mainreporoot', r) | 118 dst.setconfig('bundle', 'mainreporoot', r) |
119 | |
120 # copy auth section settings | |
121 for key, val in src.configitems('auth'): | |
122 dst.setconfig('auth', key, val) | |
118 | 123 |
119 return dst | 124 return dst |
120 | 125 |
121 def revpair(repo, revs): | 126 def revpair(repo, revs): |
122 '''return pair of nodes, given list of revisions. second item can | 127 '''return pair of nodes, given list of revisions. second item can |