Changeset 23 for mergebot


Ignore:
Timestamp:
Sep 19, 2009 3:47:22 PM (15 years ago)
Author:
retracile
Message:

Ticket #2: Use svn 1.4 compatible method for detecting URL existance.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mergebot/branches/ticket-2/mergebot/SvnOps.py

    r21 r23  
    2626    return int(logentry.split()[0][1:])
    2727
    28 def does_url_exist(url):
     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):
    2936    """Given a subversion url return true if it exists, false otherwise."""
    3037    return not subprocess.call(['svn', 'ls', '--depth', 'empty',
     
    3239                    stdout=open('/dev/null', 'w'),
    3340                    stderr=open('/dev/null', 'w'))
     41
     42does_url_exist=does_url_exist_14 # default to most compatible form for now
    3443
    3544def get_branch_info(url, logfile):
Note: See TracChangeset for help on using the changeset viewer.