Mercurial > public > mercurial-scm > hg
diff mercurial/cmdutil.py @ 11273:d1908cb95a82
remoteui: move from cmdutil to hg
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 01 Jun 2010 11:18:57 -0500 |
parents | 1107888a1ad1 |
children | 2698a95f3f1b |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Thu Jun 03 21:38:30 2010 +0200 +++ b/mercurial/cmdutil.py Tue Jun 01 11:18:57 2010 -0500 @@ -111,32 +111,6 @@ limit = None return limit -def remoteui(src, opts): - 'build a remote ui from ui or repo and opts' - if hasattr(src, 'baseui'): # looks like a repository - dst = src.baseui.copy() # drop repo-specific config - src = src.ui # copy target options from repo - else: # assume it's a global ui object - dst = src.copy() # keep all global options - - # copy ssh-specific options - for o in 'ssh', 'remotecmd': - 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 and http_proxy section settings - for sect in ('auth', 'http_proxy'): - for key, val in src.configitems(sect): - dst.setconfig(sect, key, val) - - return dst - def revpair(repo, revs): '''return pair of nodes, given list of revisions. second item can be None, meaning use working dir.'''