# HG changeset patch # User Mads Kiilerich # Date 1276721698 -7200 # Node ID a1e575b48563c49cb5bdf36e86bee7fce08e927d # Parent 0fa4474bdc2ff7738460a4905ef6ad317bc4d03d http push: break infinite recursion on failure with Python 2.6.5 (issue2179) Python 2.6.5 will keep resetting the retry count on redirects, for example when the server returns 401 on failing auth (like google code currently does). We stop the endless recursion by not resetting the count. http://bugs.python.org/issue3819 introduced the regression with Python 2.6.5. http://bugs.python.org/issue8797 discusses a fix which might make it to 2.6.6 and 2.7.0. diff -r 0fa4474bdc2f -r a1e575b48563 mercurial/url.py --- a/mercurial/url.py Sun Jun 20 01:20:12 2010 +0900 +++ b/mercurial/url.py Wed Jun 16 22:54:58 2010 +0200 @@ -556,6 +556,13 @@ return raise + # Python 2.6.5 will keep resetting the retry count on redirects, for + # example when the server returns 401 on failing auth (like google code + # currently does). We stop the endless recursion by not resetting the + # count. + def reset_retry_count(self): + pass + def getauthinfo(path): scheme, netloc, urlpath, query, frag = urlparse.urlsplit(path) if not urlpath: