Changeset 2276


Ignore:
Timestamp:
Feb 6, 2010 3:46:46 PM (10 years ago)
Author:
wehart
Message:

Updating coopr_install due to recent changes in pyutilib.virtualenv.
With this change, the --coin option works as expected.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • coopr.misc/trunk/util/coopr_install

    r2273 r2276  
    26062606#
    26072607
     2608import commands
    26082609import re
    26092610import urllib2
     
    26162617import errno
    26172618import stat
     2619
     2620using_subversion = True
    26182621
    26192622#
     
    26912694#
    26922695def guess_release(svndir):
    2693     output = urllib2.urlopen(svndir, timeout=30).read()
    2694     if output=="":
    2695        return None
    2696     links = re.findall('\<li>\<a href[^>]+>[^\<]+\</a>',output)
    2697     versions = []
    2698     for link in links:
    2699         versions.append( re.split('>', link[:-5])[-1] )
     2696    if using_subversion:
     2697        output = commands.getoutput('svn ls '+svndir)
     2698        if output=="":
     2699            return None
     2700        print output
     2701        versions = []
     2702        for link in re.split('/',output.strip()):
     2703            tmp = link.strip()
     2704            if tmp != '':
     2705                versions.append( tmp )
     2706        print versions
     2707    else:
     2708        output = urllib2.urlopen(svndir, timeout=30).read()
     2709        if output=="":
     2710            return None
     2711        links = re.findall('\<li>\<a href[^>]+>[^\<]+\</a>',output)
     2712        versions = []
     2713        for link in links:
     2714            versions.append( re.split('>', link[:-5])[-1] )
    27002715    latest = None
    27012716    latest_str = None
     
    28182833    def guess_versions(self, offline=False):
    28192834        if not self.config.root is None:
    2820             rootdir_output = urllib2.urlopen(self.config.root, timeout=30).read()
     2835            if using_subversion:
     2836                rootdir_output = commands.getoutput('svn ls ' + self.config.root)
     2837            else:
     2838                rootdir_output = urllib2.urlopen(self.config.root, timeout=30).read()
    28212839            try:
    28222840                self.trunk = self.config.root+'/trunk'
Note: See TracChangeset for help on using the changeset viewer.