mercurial/util.py
changeset 5760 0145f9afb0e7
parent 5759 027264e720aa
child 5798 86f5d8f608b7
equal deleted inserted replaced
5759:027264e720aa 5760:0145f9afb0e7
  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):
  1710 def hidepassword(url):
  1711     '''replaces the password in the url string by three asterisks (***)
  1711     '''replaces the password in the url string by three asterisks (***)
  1712     
  1712 
  1713     >>> hidepassword('http://www.example.com/some/path#fragment')
  1713     >>> hidepassword('http://www.example.com/some/path#fragment')
  1714     'http://www.example.com/some/path#fragment'
  1714     'http://www.example.com/some/path#fragment'
  1715     >>> hidepassword('http://me@www.example.com/some/path#fragment')
  1715     >>> hidepassword('http://me@www.example.com/some/path#fragment')
  1716     'http://me@www.example.com/some/path#fragment'
  1716     'http://me@www.example.com/some/path#fragment'
  1717     >>> hidepassword('http://me:simplepw@www.example.com/path#frag')
  1717     >>> hidepassword('http://me:simplepw@www.example.com/path#frag')