Changeset 36 for mergebot/trunk
- Timestamp:
- Feb 22, 2010 6:19:26 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mergebot/trunk/mergebot/svn.py
r35 r36 20 20 """A library to provide a higher-level set of subversion operations.""" 21 21 def __init__(self): 22 pass22 self.svn_version = self.get_svn_version() 23 23 24 def get_svn_version(self): 25 svn = subprocess.Popen(['svn', '--version', '--quiet'], stdout=subprocess.PIPE) 26 svn.stdin.close() 27 version_string, _stderr = svn.stdout.communicate() 28 return [int(x) for x in version_string.split('.')] 29 24 30 def logcmd(self, cmd, logfile): 25 31 """Log the cmd string, then execute it, appending its stdout and stderr … … 46 52 stderr=open('/dev/null', 'w')) 47 53 48 does_url_exist = does_url_exist_14 # default to most compatible form for now 54 def does_url_exist(self, url): 55 if self.svn_version[:2] == (1,4): 56 return self.does_url_exist_14(url) 57 return self.does_url_exist_15(url) 49 58 50 59 def get_branch_info(self, url, logfile):
Note: See TracChangeset
for help on using the changeset viewer.