comparison mercurial/util.py @ 5802:d852151fb8d4

util: drop params added during experimentation
author Bryan O'Sullivan <bos@serpentine.com>
date Fri, 04 Jan 2008 13:56:31 -0800
parents 86f5d8f608b7
children 83c354c4d529
comparison
equal deleted inserted replaced
5798:86f5d8f608b7 5802:d852151fb8d4
1705 1705
1706 def uirepr(s): 1706 def uirepr(s):
1707 # Avoid double backslash in Windows path repr() 1707 # Avoid double backslash in Windows path repr()
1708 return repr(s).replace('\\\\', '\\') 1708 return repr(s).replace('\\\\', '\\')
1709 1709
1710 def hidepassword(url, user=True, password=True): 1710 def hidepassword(url):
1711 '''hide user credential in a url string''' 1711 '''hide user credential in a url string'''
1712 scheme, netloc, path, params, query, fragment = urlparse.urlparse(url) 1712 scheme, netloc, path, params, query, fragment = urlparse.urlparse(url)
1713 netloc = re.sub('([^:]*):([^@]*)@(.*)', r'\1:***@\3', netloc) 1713 netloc = re.sub('([^:]*):([^@]*)@(.*)', r'\1:***@\3', netloc)
1714 return urlparse.urlunparse((scheme, netloc, path, params, query, fragment)) 1714 return urlparse.urlunparse((scheme, netloc, path, params, query, fragment))
1715 1715