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 | fd74f8c9f7c50105c34c465933dce3f8a985625a (patch) | |
| tree | 06f53e6b84fde52e971fae3d0b88dce5ee4dbced /setuptools/svn_utils.py | |
| parent | eae24076512070377eac957c0b760bc0fc2e78cf (diff) | |
| download | python-setuptools-bitbucket-fd74f8c9f7c50105c34c465933dce3f8a985625a.tar.gz | |
use urlparse for url detection
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:
|
