~jelmer/bzr-svn/svn-1.5

« back to all changes in this revision

Viewing changes to transport.py

  • Committer: Jelmer Vernooij
  • Date: 2008-07-07 11:29:11 UTC
  • mfrom: (1196.1.245 0.4)
  • Revision ID: jelmer@samba.org-20080707112911-fca6wpxr457n690x
MergeĀ 0.4.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
from bzrlib import debug, urlutils
20
20
from bzrlib.errors import (NoSuchFile, TransportNotPossible, 
21
21
                           FileExists, NotLocalUrl, InvalidURL)
22
 
from bzrlib.trace import mutter
 
22
from bzrlib.trace import mutter, warning
23
23
from bzrlib.transport import Transport
24
24
 
25
25
import bzrlib.plugins.svn
68
68
    return urlparse.urlunsplit((scheme, netloc, path, query, fragment))
69
69
 
70
70
 
 
71
svnplus_warning_showed = False
 
72
 
 
73
def warn_svnplus(url):
 
74
    global svnplus_warning_showed
 
75
    if not svnplus_warning_showed:
 
76
        warning("The svn+ syntax is deprecated, use %s instead.", url)
 
77
        svnplus_warning_showed = True
 
78
 
 
79
 
71
80
def bzr_to_svn_url(url):
72
81
    """Convert a Bazaar URL to a URL understood by Subversion.
73
82
 
77
86
        url.startswith("svn+file://") or
78
87
        url.startswith("svn+https://")):
79
88
        url = url[len("svn+"):] # Skip svn+
 
89
        warn_svnplus(url)
80
90
 
81
91
    if url.startswith("http"):
82
92
        # Without this, URLs with + in them break