diff options
author | Philip Thiem <ptthiem@gmail.com> | 2013-07-04 12:59:35 -0500 |
---|---|---|
committer | Philip Thiem <ptthiem@gmail.com> | 2013-07-04 12:59:35 -0500 |
commit | f553edb0df7c17b81457820e9333adc56b04d8b9 (patch) | |
tree | 6446cae2ad7e653c994e71d25e9044fb3e94ac96 /setuptools/svn_utils.py | |
parent | 0fb7894e8fca0cbd3454fbff2afc45f51cfdd156 (diff) | |
download | external_python_setuptools-f553edb0df7c17b81457820e9333adc56b04d8b9.tar.gz external_python_setuptools-f553edb0df7c17b81457820e9333adc56b04d8b9.tar.bz2 external_python_setuptools-f553edb0df7c17b81457820e9333adc56b04d8b9.zip |
use urlparse for url detection
--HG--
extra : rebase_source : 0c502ce268425d0236072fe11c5631e8282956f0
Diffstat (limited to 'setuptools/svn_utils.py')
-rw-r--r-- | setuptools/svn_utils.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/setuptools/svn_utils.py b/setuptools/svn_utils.py index 657393e2..0f54ba54 100644 --- a/setuptools/svn_utils.py +++ b/setuptools/svn_utils.py @@ -3,8 +3,8 @@ import re import sys
import codecs
from distutils import log
-from xml.sax.saxutils import unescape
import xml.dom.pulldom
+import urlparse
#requires python >= 2.4
from subprocess import Popen as _Popen, PIPE as _PIPE
@@ -82,9 +82,11 @@ def parse_dir_entries(path): else:
return []
+
def _get_entry_name(entry):
return entry.getAttribute('path')
+
def _get_entry_schedule(entry):
schedule = entry.getElementsByTagName('schedule')[0]
return "".join([t.nodeValue for t in schedule.childNodes
@@ -111,14 +113,14 @@ def parse_externals(path): if not line:
continue
- #TODO: urlparse?
- if "://" in line[-1] or ":\\\\" in line[-1]:
+ if urlparse.urlsplit(line[-1])[0]:
externals.append(line[0])
else:
externals.append(line[-1])
return externals
+
def get_svn_tool_version():
_, data = _run_command(['svn', '--version', '--quiet'])
if data:
|