Ignore:
File:
1 edited

Legend:

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

    r16 r24  
    88import time
    99import re
     10import subprocess
    1011
    1112def shell_quote(string):
     
    2425    """Given a log entry split out of svn log, return its revision number"""
    2526    return int(logentry.split()[0][1:])
     27
     28def does_url_exist_14(url):
     29    """Given a subversion url return true if it exists, false otherwise."""
     30    return not subprocess.call(['svn', 'log', '--limit=1', '--non-interactive',
     31                                url],
     32                    stdout=open('/dev/null', 'w'),
     33                    stderr=open('/dev/null', 'w'))
     34
     35def does_url_exist_15(url):
     36    """Given a subversion url return true if it exists, false otherwise."""
     37    return not subprocess.call(['svn', 'ls', '--depth', 'empty',
     38                                '--non-interactive', url],
     39                    stdout=open('/dev/null', 'w'),
     40                    stderr=open('/dev/null', 'w'))
     41
     42does_url_exist=does_url_exist_14 # default to most compatible form for now
    2643
    2744def get_branch_info(url, logfile):
Note: See TracChangeset for help on using the changeset viewer.