aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/svn.py
diff options
context:
space:
mode:
authorGravatar epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-07 16:05:34 +0000
committerGravatar epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-07 16:05:34 +0000
commitf5ad077741427df305fadba9e6380103902bc266 (patch)
tree2f99b5878bb04a116ff3590129423d3ea96af94f /tools/svn.py
parentd62f1b017102b92db2ad6d9f9794495f09c02040 (diff)
download_baselines: allow user to select which builder's images to download
BUG=806 Review URL: https://codereview.appspot.com/6492091 git-svn-id: http://skia.googlecode.com/svn/trunk@5435 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tools/svn.py')
-rw-r--r--tools/svn.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/svn.py b/tools/svn.py
index b9ef618757..9bac8e11c8 100644
--- a/tools/svn.py
+++ b/tools/svn.py
@@ -52,6 +52,19 @@ class Svn:
"""
return self._RunCommand(['svn', 'checkout', url, path])
+ def ListSubdirs(self, url):
+ """Returns a list of all subdirectories (not files) within a given SVN
+ url.
+
+ @param url remote directory to list subdirectories of
+ """
+ subdirs = []
+ filenames = self._RunCommand(['svn', 'ls', url]).split('\n')
+ for filename in filenames:
+ if filename.endswith('/'):
+ subdirs.append(filename.strip('/'))
+ return subdirs
+
def GetNewFiles(self):
"""Return a list of files which are in this directory but NOT under
SVN control.