~ubuntu-branches/ubuntu/raring/python-pip/raring-proposed

« back to all changes in this revision

Viewing changes to pip/vcs/subversion.py

  • Committer: Package Import Robot
  • Author(s): Barry Warsaw
  • Date: 2013-04-17 10:45:19 UTC
  • mfrom: (1.1.7)
  • Revision ID: package-import@ubuntu.com-20130417104519-cn67sz4camrlkbsb
Tags: 1.3.1-0ubuntu1
* New upstream release.  (LP: #1167351)
  - debian/patches/test_urlparse_uses_fragment.patch: Removed; applied
    upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
import os
2
2
import re
3
3
from pip.backwardcompat import urlparse
4
 
from pip import call_subprocess, InstallationError
 
4
from pip import InstallationError
5
5
from pip.index import Link
6
 
from pip.util import rmtree, display_path
 
6
from pip.util import rmtree, display_path, call_subprocess
7
7
from pip.log import logger
8
8
from pip.vcs import vcs, VersionControl
9
9
 
126
126
            dirurl, localrev = self._get_svn_url_rev(base)
127
127
 
128
128
            if base == location:
129
 
                base_url = dirurl+'/'   # save the root url
 
129
                base_url = dirurl + '/'   # save the root url
130
130
            elif not dirurl or not dirurl.startswith(base_url):
131
131
                dirs[:] = []
132
132
                continue    # not part of the same svn tree, skip it
163
163
            data = list(map(str.splitlines, data.split('\n\x0c\n')))
164
164
            del data[0][0]  # get rid of the '8'
165
165
            url = data[0][3]
166
 
            revs = [int(d[9]) for d in data if len(d)>9 and d[9]]+[0]
 
166
            revs = [int(d[9]) for d in data if len(d) > 9 and d[9]] + [0]
167
167
        elif data.startswith('<?xml'):
168
168
            match = _svn_xml_url_re.search(data)
169
169
            if not match:
170
170
                raise ValueError('Badly formatted data: %r' % data)
171
171
            url = match.group(1)    # get repository URL
172
 
            revs = [int(m.group(1)) for m in _svn_rev_re.finditer(data)]+[0]
 
172
            revs = [int(m.group(1)) for m in _svn_rev_re.finditer(data)] + [0]
173
173
        else:
174
174
            try:
175
175
                # subversion >= 1.7