# HG changeset patch # User Patrick Mezard # Date 1271101041 -7200 # Node ID 38f2ef9c134b7c5b243d3929379f902dd1baaeb7 # Parent 4fb1bafd43e7e829dec0886aff8b10f643c54470 localrepo: do not store URL password in undo.desc diff -r 4fb1bafd43e7 -r 38f2ef9c134b mercurial/localrepo.py --- a/mercurial/localrepo.py Sun Apr 11 20:59:55 2010 -0700 +++ b/mercurial/localrepo.py Mon Apr 12 21:37:21 2010 +0200 @@ -14,6 +14,7 @@ import match as matchmod import merge as mergemod import tags as tagsmod +import url as urlmod from lock import release import weakref, stat, errno, os, time, inspect propertycache = util.propertycache @@ -2017,7 +2018,7 @@ cl.delayupdate() oldheads = len(cl.heads()) - tr = self.transaction(",".join([srctype, url])) + tr = self.transaction(",".join([srctype, urlmod.hidepassword(url)])) try: trp = weakref.proxy(tr) # pull off the changeset group diff -r 4fb1bafd43e7 -r 38f2ef9c134b tests/test-pull --- a/tests/test-pull Sun Apr 11 20:59:55 2010 -0700 +++ b/tests/test-pull Mon Apr 12 21:37:21 2010 +0200 @@ -11,13 +11,14 @@ cat hg.pid >> $DAEMON_PIDS cd .. -hg clone --pull http://localhost:$HGPORT/ copy | sed -e "s,:$HGPORT/,:\$HGPORT/," +hg clone --pull http://foo:bar@localhost:$HGPORT/ copy | sed -e "s,:$HGPORT/,:\$HGPORT/," cd copy hg verify hg co cat foo hg manifest --debug hg pull | sed -e "s,:$HGPORT/,:\$HGPORT/," +hg rollback --dry-run --verbose | sed -e "s,:$HGPORT/,:\$HGPORT/," echo % issue 622 cd .. diff -r 4fb1bafd43e7 -r 38f2ef9c134b tests/test-pull.out --- a/tests/test-pull.out Sun Apr 11 20:59:55 2010 -0700 +++ b/tests/test-pull.out Mon Apr 12 21:37:21 2010 +0200 @@ -19,9 +19,10 @@ 0 files updated, 0 files merged, 0 files removed, 0 files unresolved foo 2ed2a3912a0b24502043eae84ee4b279c18b90dd 644 foo -pulling from http://localhost:$HGPORT/ +pulling from http://foo:***@localhost:$HGPORT/ searching for changes no changes found +rolling back pull (http://foo:***@localhost:$HGPORT/) to revision 0 % issue 622 pulling from ../test requesting all changes