comparison __init__.py @ 241:4950b18cf949

Move fetch_command.fetch_revisions() to svncommands.pull().
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Wed, 08 Apr 2009 17:49:30 +0200
parents 33e885f5f86a
children 1272e87546ed
comparison
equal deleted inserted replaced
240:1aa1d2d406d9 241:4950b18cf949
19 from mercurial import util as mutil 19 from mercurial import util as mutil
20 20
21 from svn import core 21 from svn import core
22 22
23 import svncommand 23 import svncommand
24 import fetch_command 24 import svncommands
25 import tag_repo 25 import tag_repo
26 import util 26 import util
27 27
28 def reposetup(ui, repo): 28 def reposetup(ui, repo):
29 if not util.is_svn_repo(repo): 29 if not util.is_svn_repo(repo):
56 hg_repo_path = hg.defaultdest(svn_url) + "-hg" 56 hg_repo_path = hg.defaultdest(svn_url) + "-hg"
57 ui.status("Assuming destination %s\n" % hg_repo_path) 57 ui.status("Assuming destination %s\n" % hg_repo_path)
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 = svncommands.pull(ui, svn_url, hg_repo_path, **opts)
62 except core.SubversionException, e: 62 except core.SubversionException, e:
63 if e.apr_err == core.SVN_ERR_RA_SERF_SSL_CERT_UNTRUSTED: 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