Mercurial > hg
diff hgext/largefiles/basestore.py @ 19950:cce7ab960312 stable
largefiles: hide passwords in URLs in ui messages
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Thu, 17 Oct 2013 16:13:15 +0800 |
parents | ae65192fd6b4 |
children | 164bd5218ddb |
line wrap: on
line diff
--- a/hgext/largefiles/basestore.py Thu Oct 24 01:49:56 2013 +0800 +++ b/hgext/largefiles/basestore.py Thu Oct 17 16:13:15 2013 +0800 @@ -26,10 +26,11 @@ def longmessage(self): return (_("error getting id %s from url %s for file %s: %s\n") % - (self.hash, self.url, self.filename, self.detail)) + (self.hash, util.hidepassword(self.url), self.filename, + self.detail)) def __str__(self): - return "%s: %s" % (self.url, self.detail) + return "%s: %s" % (util.hidepassword(self.url), self.detail) class basestore(object): def __init__(self, ui, repo, url): @@ -69,7 +70,7 @@ if not available.get(hash): ui.warn(_('%s: largefile %s not available from %s\n') - % (filename, hash, self.url)) + % (filename, hash, util.hidepassword(self.url))) missing.append(filename) continue @@ -214,4 +215,5 @@ except lfutil.storeprotonotcapable: pass - raise util.Abort(_('%s does not appear to be a largefile store') % path) + raise util.Abort(_('%s does not appear to be a largefile store') % + util.hidepassword(path))