comparison util.py @ 284:f8f9a2993705

Implement parseurl support (#revision in repository urls) Note: Normally when using parseurl, hg clone will treat the revision after # as if it was passed in as --rev, treats that rev as a head and won't clone beyond that. This wasn't implemented here, hence all the TODO's in the comments. All we do is use the checkout parameter where appropriate to update the wc to the selected revision.
author Martijn Pieters <mj@zopatista.com>
date Mon, 27 Apr 2009 09:39:39 -0500
parents 8ff0b3261b7f
children 33736e2e25f0
comparison
equal deleted inserted replaced
283:521d9c1bb11d 284:f8f9a2993705
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+http'):
28 svnurl = svnurl[4:] 28 svnurl = svnurl[4:]
29 return svnurl.rstrip('/') 29 url, revs, checkout = hg.parseurl(svnurl)
30 url = url.rstrip('/')
31 if checkout:
32 url = '%s#%s' % (url, checkout)
33 return url
30 34
31 35
32 REVMAP_FILE_VERSION = 1 36 REVMAP_FILE_VERSION = 1
33 def parse_revmap(revmap_filename): 37 def parse_revmap(revmap_filename):
34 revmap = {} 38 revmap = {}