Changeset 48 for mergebot


Ignore:
Timestamp:
Feb 23, 2010 6:12:09 PM (15 years ago)
Author:
retracile
Message:

Mergebot: convert an os.popen call to a subprocess call

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mergebot/trunk/mergebot/svn.py

    r39 r48  
    6060        """Given a subversion url and a logfile, return (start_revision,
    6161        end_revision) or None if it does not exist."""
    62         svncmd = os.popen("svn log --stop-on-copy --non-interactive %s 2>>%s" \
    63             % (url, logfile), "r")
    64         branchlog = svncmd.read()
    65         returnval = svncmd.close()
     62        svncmd = subprocess.Popen(['svn', 'log', '--stop-on-copy', '--non-interactive', url], stdout=subprocess.PIPE, stderr=open(logfile, 'a'))
     63        branchlog, stderr = svncmd.communicate()
     64        returnval = svncmd.wait()
    6665        if returnval:
    6766            # This branch apparently doesn't exist
Note: See TracChangeset for help on using the changeset viewer.