Mercurial > hgsubversion
comparison __init__.py @ 224:2165461d2dd8
Exception clean-ups; use symbolic names & avoid Python 2.6 deprecations.
| author | Dan Villiom Podlaski Christiansen <danchr@gmail.com> |
|---|---|
| date | Thu, 19 Mar 2009 21:27:39 +0100 |
| parents | d06572495c5e |
| children | 33e885f5f86a 79440ed81011 |
comparison
equal
deleted
inserted
replaced
| 212:a421aca2b0f5 | 224:2165461d2dd8 |
|---|---|
| 35 def svn(ui, repo, subcommand, *args, **opts): | 35 def svn(ui, repo, subcommand, *args, **opts): |
| 36 '''see detailed help for list of subcommands''' | 36 '''see detailed help for list of subcommands''' |
| 37 try: | 37 try: |
| 38 return svncommand.svncmd(ui, repo, subcommand, *args, **opts) | 38 return svncommand.svncmd(ui, repo, subcommand, *args, **opts) |
| 39 except core.SubversionException, e: | 39 except core.SubversionException, e: |
| 40 if e.apr_err == 230001: | 40 if e.apr_err == core.SVN_ERR_RA_SERF_SSL_CERT_UNTRUSTED: |
| 41 raise mutil.Abort('It appears svn does not trust the ssl cert for this site.\n' | 41 raise mutil.Abort('It appears svn does not trust the ssl cert for this site.\n' |
| 42 'Please try running svn ls on that url first.') | 42 'Please try running svn ls on that url first.') |
| 43 raise | 43 raise |
| 44 | 44 |
| 45 | 45 |
| 58 should_update = not os.path.exists(hg_repo_path) | 58 should_update = not os.path.exists(hg_repo_path) |
| 59 svn_url = util.normalize_url(svn_url) | 59 svn_url = util.normalize_url(svn_url) |
| 60 try: | 60 try: |
| 61 res = fetch_command.fetch_revisions(ui, svn_url, hg_repo_path, **opts) | 61 res = fetch_command.fetch_revisions(ui, svn_url, hg_repo_path, **opts) |
| 62 except core.SubversionException, e: | 62 except core.SubversionException, e: |
| 63 if e.apr_err == 230001: | 63 if e.apr_err == core.SVN_ERR_RA_SERF_SSL_CERT_UNTRUSTED: |
| 64 raise mutil.Abort('It appears svn does not trust the ssl cert for this site.\n' | 64 raise mutil.Abort('It appears svn does not trust the ssl cert for this site.\n' |
| 65 'Please try running svn ls on that url first.') | 65 'Please try running svn ls on that url first.') |
| 66 raise | 66 raise |
| 67 if (res is None or res == 0) and should_update: | 67 if (res is None or res == 0) and should_update: |
| 68 repo = hg.repository(ui, hg_repo_path) | 68 repo = hg.repository(ui, hg_repo_path) |
