Mercurial > public > mercurial-scm > hg
diff mercurial/hg.py @ 15552:62c9183a0bbb stable
clone: don't save user's password in .hg/hgrc (Issue3122)
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Tue, 22 Nov 2011 12:06:42 -0600 |
parents | c519cd8f0169 |
children | dbdb8aa70503 |
line wrap: on
line diff
--- a/mercurial/hg.py Tue Nov 22 17:26:32 2011 -0600 +++ b/mercurial/hg.py Tue Nov 22 12:06:42 2011 -0600 @@ -356,10 +356,13 @@ if destrepo.local(): fp = destrepo.opener("hgrc", "w", text=True) fp.write("[paths]\n") - fp.write("default = %s\n" % abspath) + u = util.url(abspath) + u.passwd = None + defaulturl = str(u) + fp.write("default = %s\n" % defaulturl) fp.close() - destrepo.ui.setconfig('paths', 'default', abspath) + destrepo.ui.setconfig('paths', 'default', defaulturl) if update: if update is not True: