comparison util.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 f8f9a2993705
children
comparison
equal deleted inserted replaced
320:1ba8ed29148e 326:33736e2e25f0
22 ver = repo.dirstate.parents()[0] 22 ver = repo.dirstate.parents()[0]
23 return node.hex(ver)[:12] 23 return node.hex(ver)[:12]
24 24
25 25
26 def normalize_url(svnurl): 26 def normalize_url(svnurl):
27 if svnurl.startswith('svn+http'): 27 if svnurl.startswith('svn+') and not svnurl.startswith('svn+ssh'):
28 svnurl = svnurl[4:] 28 svnurl = svnurl[4:]
29 url, revs, checkout = hg.parseurl(svnurl) 29 url, revs, checkout = hg.parseurl(svnurl)
30 url = url.rstrip('/') 30 url = url.rstrip('/')
31 if checkout: 31 if checkout:
32 url = '%s#%s' % (url, checkout) 32 url = '%s#%s' % (url, checkout)