Mercurial > hgsubversion
changeset 229:7f20914e52e8
Better 502 logic that does not catch non-502 errors.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Tue, 31 Mar 2009 15:53:41 -0500 |
parents | f71af18c4379 |
children | 4c3bad24f950 |
files | fetch_command.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/fetch_command.py +++ b/fetch_command.py @@ -77,7 +77,7 @@ def fetch_revisions(ui, svn_url, hg_repo # got a 502? Try more than once! tries = 0 converted = False - while not converted and tries < 3: + while not converted: try: util.describe_revision(ui, r) if have_replay: @@ -92,7 +92,9 @@ def fetch_revisions(ui, svn_url, hg_repo stupid_svn_server_pull_rev(ui, svn, hg_editor, r) converted = True except core.SubversionException, e: #pragma: no cover - if e.apr_err == core.SVN_ERR_RA_DAV_REQUEST_FAILED: + if (e.apr_err == core.SVN_ERR_RA_DAV_REQUEST_FAILED + and '502' in str(e) + and tries < 3): tries += 1 ui.status('Got a 502, retrying (%s)\n' % tries) else: