comparison wrappers.py @ 326:33736e2e25f0

alternate approach for supporting svn schemes for repository paths We now intercept the operations in the local repo class, and handle the relevant operation ourselves. This frees us from wrapping all relevant commands and replicating their functionality. The implementation is incomplete; only one test has been modified to use the standard Mercurial API with the changed URLs. Once changed, those tests will likely reveal bugs or missing features in the new wrappers. Also, new wrappers will be needed for handling conversion flags such as -A/--authormap.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Thu, 07 May 2009 20:50:53 +0200
parents 1d48d9a34c19
children 235022089da6
comparison
equal deleted inserted replaced
320:1ba8ed29148e 326:33736e2e25f0
241 """ 241 """
242 svn = opts.pop('svn', None) 242 svn = opts.pop('svn', None)
243 svn_stupid = opts.pop('svn_stupid', False) 243 svn_stupid = opts.pop('svn_stupid', False)
244 create_new_dest = opts.pop('create_new_dest', False) 244 create_new_dest = opts.pop('create_new_dest', False)
245 url = ((repo and repo.ui) or ui).expandpath(source) 245 url = ((repo and repo.ui) or ui).expandpath(source)
246 if not (cmdutil.issvnurl(url) or svn or create_new_dest): 246 if orig and not (cmdutil.issvnurl(url) or svn or create_new_dest):
247 return orig(ui, repo, source=source, *args, **opts) 247 return orig(ui, repo, source=source, *args, **opts)
248 svn_url = url 248 svn_url = url
249 svn_url = util.normalize_url(svn_url) 249 svn_url = util.normalize_url(svn_url)
250 # Split off #rev; TODO: implement --rev/#rev support limiting the pulled/cloned revisions 250 # Split off #rev; TODO: implement --rev/#rev support limiting the pulled/cloned revisions
251 svn_url, revs, checkout = hg.parseurl(svn_url, opts.get('rev')) 251 svn_url, revs, checkout = hg.parseurl(svn_url, opts.get('rev'))